big refactoring and features added
This commit is contained in:
33
App/Devices/board_io.h
Normal file
33
App/Devices/board_io.h
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @file board_io.h
|
||||
* @brief Board-specific GPIO and low-level control helpers.
|
||||
*
|
||||
* Architectural note:
|
||||
* This module groups direct GPIO manipulations that are shared across several
|
||||
* devices and services. Doing so keeps register-driving code localised and
|
||||
* prevents high-level services from depending on scattered pin knowledge.
|
||||
*/
|
||||
|
||||
#ifndef BOARD_IO_H
|
||||
#define BOARD_IO_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "main.h"
|
||||
|
||||
void board_io_enable_uart_rx_irq(void);
|
||||
void board_io_init_standalone_ui(void);
|
||||
void board_io_reset_runtime_outputs(void);
|
||||
void board_io_configure_spi2_mode(uint32_t polarity, uint32_t phase);
|
||||
bool board_io_is_usb_connected(void);
|
||||
bool board_io_is_sd_card_present(void);
|
||||
bool board_io_is_standalone_ui_button_pressed(void);
|
||||
void board_io_set_supply_enabled(uint8_t supply_index, bool enabled);
|
||||
void board_io_set_laser_enabled(uint8_t laser_index, bool enabled);
|
||||
void board_io_set_reference_enabled(uint8_t reference_index, bool enabled);
|
||||
void board_io_set_tec_channel_enabled(uint8_t tec_index, bool enabled);
|
||||
void board_io_toggle_debug_pin(void);
|
||||
void board_io_write_signal(GPIO_TypeDef *port, uint16_t pin, bool level_high);
|
||||
|
||||
#endif /* BOARD_IO_H */
|
||||
Reference in New Issue
Block a user