51 lines
801 B
C
51 lines
801 B
C
|
/*
|
||
|
* config.h
|
||
|
*
|
||
|
* Created on: Jul 27, 2024
|
||
|
* Author: true
|
||
|
*/
|
||
|
|
||
|
#ifndef USER_SRC_CONFIG_H_
|
||
|
#define USER_SRC_CONFIG_H_
|
||
|
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
|
|
||
|
|
||
|
#define CONF_CURSOR_WHITE 0
|
||
|
#define CONF_CURSOR_GREEN 1
|
||
|
#define CONF_CURSOR_ORANGE 2
|
||
|
#define CONF_CURSOR_OFF 3
|
||
|
|
||
|
#define CONF_CURSOR_SELECT_MASK 0x03
|
||
|
#define CONF_CURSOR_FLASH_MASK 0x70
|
||
|
#define CONF_CURSOR_FLASH_SHIFT 4
|
||
|
|
||
|
#define CHECKVAL 0x2024dc32
|
||
|
|
||
|
|
||
|
|
||
|
typedef struct UserConf {
|
||
|
uint8_t cursor_color;
|
||
|
uint8_t cursor_flash;
|
||
|
uint8_t padding8;
|
||
|
uint8_t ledprog_ena_mask;
|
||
|
uint8_t ledprog_setting[5][2];
|
||
|
uint16_t checksum;
|
||
|
uint32_t checkval;
|
||
|
} UserConf; // 20 bytes
|
||
|
|
||
|
|
||
|
|
||
|
extern struct UserConf userconf;
|
||
|
|
||
|
|
||
|
|
||
|
void userconf_load();
|
||
|
void userconf_save();
|
||
|
|
||
|
|
||
|
|
||
|
#endif /* USER_SRC_CONFIG_H_ */
|