Initial commit
This commit is contained in:
43
platform.h
Normal file
43
platform.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// Created by vlad on 17.08.22.
|
||||
//
|
||||
|
||||
#ifndef SDP_DRY_SENSOR_PLATFORM_H
|
||||
#define SDP_DRY_SENSOR_PLATFORM_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
extern uint16_t sensor_1;
|
||||
extern uint16_t sensor_2;
|
||||
|
||||
void platform_read_sensors();
|
||||
|
||||
/**
|
||||
* Инициализация модуля
|
||||
*/
|
||||
void platform_init();
|
||||
|
||||
/**
|
||||
* Переводит камень в режим ожидания, выход из ожидания по прерыванию
|
||||
*/
|
||||
void platform_wait_for_interrupt();
|
||||
|
||||
/**
|
||||
* Ожидание прерывания по таймеру, то есть выравнивание исполнения программы по секундам.
|
||||
* Задержит исполнение программы на время от 1 ... 0 секунд, вернет управление когда таймер даст прерывание
|
||||
*/
|
||||
void systick_sync();
|
||||
|
||||
void uart_init();
|
||||
void uart_deinit();
|
||||
|
||||
void uart_write_char(char c);
|
||||
void uart_write_str(const char* str);
|
||||
void uart_write_fstr(PGM_P str);
|
||||
|
||||
char uart_read_char();
|
||||
void uart_discard_input();
|
||||
|
||||
|
||||
#endif //SDP_DRY_SENSOR_PLATFORM_H
|
||||
Reference in New Issue
Block a user