12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #pragma once
- #ifndef __MAIN_H__
- #define __MAIN_H__
- #include "buttons.h"
- /* Private defines */
- #define TOP_INFO_1_X 0
- #define TOP_INFO_1_Y 0
- #define TOP_INFO_2_X 120
- #define TOP_INFO_2_Y 0
- #define LCD_LINE_1 23
- #define LCD_LINE_2 33
- #define LCD_LINE_3 43
- #define LCD_LINE_4 53
- #define LCD_LINE_5 63
- #define LCD_LINE_6 73
- #define LCD_LINE_7 83
- #define LCD_LINE_8 93
- #define LCD_LINE_9 103
- /* Private variables */
- /*
- * SPI configuration structure.
- * Speed 12 MHz, CPHA=0, CPOL=0, 8bits frames, MSb transmitted first.
- * Soft slave select.
- */
- static const SPIConfig spi1cfg = {
- .circular = false,
- .slave = false,
- .data_cb = NULL,
- .error_cb = NULL,
- .cr1 = 0U,
- .cr2 = 0U
- };
- /* Private function prototypes */
- static void btn1_handler(const button_state_t);
- static void btn2_handler(const button_state_t);
- static void btn3_handler(const button_state_t);
- static void btn4_handler(const button_state_t);
- static btn_hndlr bha[Button_Num] = {
- btn1_handler,
- btn2_handler,
- btn3_handler,
- btn4_handler
- };
- static void lcd_MainScreen(void);
- static void lcd_ClearMain(void);
- static uint8_t X_centered(const uint8_t len, const uint8_t pix);
- #endif /* __MAIN_H__ */
|