diff options
author | Alexander <trotsenkoa@gmail.com> | 2022-06-29 11:03:02 +0300 |
---|---|---|
committer | Alexander <trotsenkoa@gmail.com> | 2022-06-29 11:03:02 +0300 |
commit | 1702ce6ce430a66bb7af51644b91b7c196e719d9 (patch) | |
tree | 6039acbdf047873d32aaf55969286c5f0d55958f /Libraries/NixieDriver/nixie_driver_process.h |
Создаю новый репозиторий. Программа для версии NixieClock_v2. Работает, часы тикают. Есть проблема, что скачет вторая сеносрная кнопка (она в другом канале). Поэтому на нее собираюсь сделать антидребезг.
Diffstat (limited to 'Libraries/NixieDriver/nixie_driver_process.h')
-rw-r--r-- | Libraries/NixieDriver/nixie_driver_process.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Libraries/NixieDriver/nixie_driver_process.h b/Libraries/NixieDriver/nixie_driver_process.h new file mode 100644 index 0000000..00f08f5 --- /dev/null +++ b/Libraries/NixieDriver/nixie_driver_process.h @@ -0,0 +1,67 @@ +#ifndef NIXIE_DRIVER_PROCESS_INCLUDED +#define NIXIE_DRIVER_PROCESS_INCLUDED + +#include <stdint.h> +#include "FreeRTOS.h" +#include "queue.h" + +// 8- . +// , + +#define MAX_TUBES 6 +#define MAX_DIGITS 13//11 + +// tube_digit [] 16- +#define TUBE_DIGIT_0 8192 //0010 0000 0000 0000 +#define TUBE_DIGIT_1 128 //0000 0000 1000 0000 +#define TUBE_DIGIT_2 64 //0000 0000 0100 0000 +#define TUBE_DIGIT_3 32 //0000 0000 0010 0000 +#define TUBE_DIGIT_4 16 //0000 0000 0001 0000 +#define TUBE_DIGIT_5 8 //0000 0000 0000 1000 +#define TUBE_DIGIT_6 4 //0000 0000 0000 0100 +#define TUBE_DIGIT_7 2 //0000 0000 0000 0010 +#define TUBE_DIGIT_8 32768 //1000 0000 0000 0000 +#define TUBE_DIGIT_9 16384 //0100 0000 0000 0000 +#define TUBE_DIGIT_DP1 1 //0000 0000 0000 0001 , .. GPIO +#define TUBE_DIGIT_DP2 256 //0000 0001 0000 0000 , .. GPIO +#define TUBE_DIGIT_EMPTY 0 + +#define TUBE_EMPTY_VALUE 0 // "10". , + // , + // + +// tube_num [ MAX_TUBES ] +#define TUBE_NUM_6 1 +#define TUBE_NUM_5 256 +#define TUBE_NUM_4 512 +#define TUBE_NUM_3 1024 +#define TUBE_NUM_2 2048 +#define TUBE_NUM_1 4096 + +// +// +typedef struct { + + uint8_t indic_1; + uint8_t indic_2; + uint8_t indic_3; + uint8_t indic_4; + uint8_t indic_5; + uint8_t indic_6; + +} DataToIndicate_t; + + +void NixieDriver_SendValue ( uint8_t *value_arr ); + +extern QueueHandle_t queue_new_data; + +#define send(X) xQueueSend ( queue_new_data, &X, 0 ) +#define NixieDriver_SendValue2(X) send(X) + +void ProcessNixieDriverFromISR ( void ); +//uint8_t NixieDriverProcessCheckIsFirstByte (void); +//void NixieDriverCheckDPPins (void); +//void NixieDriverProcessSendSecondByte (void); + +#endif //NIXIE_DRIVER_PROCESS_INCLUDED
\ No newline at end of file |