Start onewire interface. But probably won't finish it
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
/* Reflow Oven Controller
|
||||
*
|
||||
* Copyright (C) 2020 Mario Hüttel <mario.huettel@gmx.net>
|
||||
*
|
||||
* This file is part of the Reflow Oven Controller Project.
|
||||
*
|
||||
* The reflow oven controller is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* The Reflow Oven Control Firmware is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with the reflow oven controller project.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __ONEWIRE_IF_H__
|
||||
#define __ONEWIRE_IF_H__
|
||||
|
||||
#include <stm-periph/uart.h>
|
||||
|
||||
int onewire_if_init_uart(struct stm_uart *uart, uint32_t brr_val, USART_TypeDef *onewire_uart, volatile uint32_t *rcc_reg, uint8_t rcc_bit_num);
|
||||
|
||||
void onewire_if_disable(struct stm_uart *uart);
|
||||
|
||||
int onewire_if_send_byte(struct stm_uart *uart);
|
||||
|
||||
int onewire_if_receive_byte(struct stm_uart *uart);
|
||||
|
||||
#endif /* __ONEWIRE_IF_H__ */
|
@@ -32,6 +32,8 @@
|
||||
|
||||
#define ONEWIRE_UART_DEV USART3
|
||||
|
||||
enum onewire_temp_resolution {RES_8BIT, RES_12BIT};
|
||||
|
||||
void onewire_temp_sensors_setup_hw();
|
||||
|
||||
/**
|
||||
@@ -40,8 +42,10 @@ void onewire_temp_sensors_setup_hw();
|
||||
* @param list_len
|
||||
* @return Negative: error, >= 0: amount of discovered sensors
|
||||
*/
|
||||
int onewire_temp_sensors_discover(uint32_t *id_list, size_t list_len);
|
||||
int onewire_temp_sensors_discover(uint64_t *id_list, size_t list_len);
|
||||
|
||||
float onewire_temp_sensor_read_temp(uint32_t id);
|
||||
int onewire_temp_sensor_config(uint64_t id, enum onewire_temp_resolution resolution);
|
||||
|
||||
float onewire_temp_sensor_read_temp(uint64_t id);
|
||||
|
||||
#endif /* __ONEWIRE_TEMP_SENSORS_H__ */
|
||||
|
@@ -63,5 +63,6 @@ void systick_setup(void);
|
||||
*/
|
||||
void systick_wait_ms(uint32_t ms);
|
||||
|
||||
uint64_t systick_get_global_tick();
|
||||
|
||||
#endif /* __SYSTICK_H__ */
|
||||
|
Reference in New Issue
Block a user