mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
加入屏幕翻转的功能
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
#include "BL24C02.h"
|
||||
#include "i2c.h"
|
||||
|
||||
SysSettings_T sys_settings = {
|
||||
.backlight_level = 80,
|
||||
.key_sound_enable = 1,
|
||||
.language_select = 0,
|
||||
.rotation = 0
|
||||
};
|
||||
|
||||
static void BL24C02_Write(uint8_t addr, uint16_t length, uint8_t buff[])
|
||||
{
|
||||
HAL_I2C_Mem_Write(&hi2c1, BL24C02_ADDRESS<<1, addr, I2C_MEMADD_SIZE_8BIT, buff, length, 10);
|
||||
|
||||
@@ -5,6 +5,15 @@
|
||||
|
||||
#define BL24C02_ADDRESS 0x50
|
||||
|
||||
typedef struct {
|
||||
uint8_t backlight_level; // 0-100
|
||||
uint8_t key_sound_enable; // 0:disable, 1:enable
|
||||
uint8_t language_select; // 0:English, 1:Chinese
|
||||
uint16_t rotation; // 0, 90, 180, 270
|
||||
} SysSettings_T;
|
||||
|
||||
extern SysSettings_T sys_settings;
|
||||
|
||||
uint8_t EEPROM_Check(void);
|
||||
uint8_t SettingSave(uint8_t *buf, uint8_t addr, uint8_t lenth);
|
||||
uint8_t SettingGet(uint8_t *buf, uint8_t addr, uint8_t lenth);
|
||||
|
||||
Reference in New Issue
Block a user