feat: 添加参数存储管理
feat: 添加参数菜单
This commit is contained in:
72
app/jj_param.c
Normal file
72
app/jj_param.c
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
#include "jj_param.h"
|
||||||
|
#include "./page/page_ui_widget.h"
|
||||||
|
#include "./page/page.h"
|
||||||
|
|
||||||
|
PARAM_INFO Param_Data[DATA_NUM];
|
||||||
|
soft_iic_info_struct eeprom_param;
|
||||||
|
TYPE_UNION iic_buffer[DATA_IN_FLASH_NUM];
|
||||||
|
|
||||||
|
float data0 = 10.0f;
|
||||||
|
float data1 = 10.0f;
|
||||||
|
float data2 = 15;
|
||||||
|
float data3 = 100.01f;
|
||||||
|
float data4 = 1.04f;
|
||||||
|
float data5 = 4.0f;
|
||||||
|
float data6 = 5.1f;
|
||||||
|
void jj_param_eeprom_init()
|
||||||
|
{
|
||||||
|
soft_iic_init(&eeprom_param, K24C02_DEV_ADDR, K24C02_SOFT_IIC_DELAY, K24C02_SCL_PIN, K24C02_SDA_PIN); // eeprom初始化
|
||||||
|
PARAM_REG(DATA0, &data0, EFLOAT, 1, "m0_p"); // 注冊
|
||||||
|
PARAM_REG(DATA1, &data1, EFLOAT, 1, "m1_p"); // 注冊
|
||||||
|
PARAM_REG(DATA2, &data2, EFLOAT, 1, "m1_i"); // 注冊
|
||||||
|
PARAM_REG(DATA3, &data3, EFLOAT, 1, "m1_d"); // 注冊
|
||||||
|
PARAM_REG(DATA4, &data4, EFLOAT, 1, "m2_p"); // 注冊
|
||||||
|
PARAM_REG(DATA5, &data5, EFLOAT, 1, "m2_i"); // 注冊
|
||||||
|
PARAM_REG(DATA6, &data6, EFLOAT, 1, "m2_d"); // 注冊
|
||||||
|
|
||||||
|
for (uint8 i = 0; i < DATA_IN_FLASH_NUM ; i++) {
|
||||||
|
|
||||||
|
soft_iic_read_8bit_registers(&eeprom_param, 4*i, (uint8 *)&iic_buffer[i], 4);
|
||||||
|
switch (Param_Data[i].type) {
|
||||||
|
case EFLOAT:
|
||||||
|
*((float *)(Param_Data[i].p_data)) =
|
||||||
|
iic_buffer[i].f32;
|
||||||
|
break;
|
||||||
|
case EUINT32:
|
||||||
|
*((uint32 *)(Param_Data[i].p_data)) =
|
||||||
|
iic_buffer[i].u32;
|
||||||
|
break;
|
||||||
|
case EINT32:
|
||||||
|
*((int32 *)(Param_Data[i].p_data)) =
|
||||||
|
iic_buffer[i].s32;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
system_delay_ms(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief 参数更新
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void jj_param_update()
|
||||||
|
{
|
||||||
|
for (uint8 i = 0; i < DATA_IN_FLASH_NUM; i++) {
|
||||||
|
switch (Param_Data[i].type) {
|
||||||
|
case EFLOAT:
|
||||||
|
iic_buffer[i].f32 = *((float *)(Param_Data[i].p_data));
|
||||||
|
break;
|
||||||
|
case EUINT32:
|
||||||
|
iic_buffer[i].u32 = *((uint32 *)(Param_Data[i].p_data));
|
||||||
|
break;
|
||||||
|
case EINT32:
|
||||||
|
iic_buffer[i].s32 = *((int32 *)(Param_Data[i].p_data));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
soft_iic_write_8bit_registers(&eeprom_param, 4*i , (uint8 *)&iic_buffer[i], 4);
|
||||||
|
system_delay_ms(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
59
app/jj_param.h
Normal file
59
app/jj_param.h
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
#ifndef _JJ_PARAM_H_
|
||||||
|
#define _JJ_PARAM_H_
|
||||||
|
|
||||||
|
#include "zf_common_headfile.h"
|
||||||
|
/**
|
||||||
|
* @brief 注册需调参数
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define PARAM_REG(_data_tag_, _p_data_, _type_, _cmd_,_text_) \
|
||||||
|
Param_Data[_data_tag_].p_data = (void *)_p_data_; \
|
||||||
|
Param_Data[_data_tag_].type = _type_; \
|
||||||
|
Param_Data[_data_tag_].cmd = _cmd_; \
|
||||||
|
Param_Data[_data_tag_].text = _text_;
|
||||||
|
typedef enum {
|
||||||
|
DATA_HEAD = -1,
|
||||||
|
DATA0,
|
||||||
|
DATA1,
|
||||||
|
DATA2,
|
||||||
|
DATA3,
|
||||||
|
DATA4,
|
||||||
|
|
||||||
|
//
|
||||||
|
DATA5,
|
||||||
|
DATA6,
|
||||||
|
DATA_IN_FLASH_NUM,
|
||||||
|
DATA_NUM,
|
||||||
|
} data_tag_t;
|
||||||
|
/**
|
||||||
|
* @brief
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
EUINT32,
|
||||||
|
EINT32,
|
||||||
|
EFLOAT,
|
||||||
|
}ENUM_TYPE;
|
||||||
|
|
||||||
|
typedef union{
|
||||||
|
uint32 u32;
|
||||||
|
int32 s32;
|
||||||
|
float f32;
|
||||||
|
uint8 u8;
|
||||||
|
}TYPE_UNION;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
void *p_data;
|
||||||
|
ENUM_TYPE type;
|
||||||
|
uint8 cmd;
|
||||||
|
char *text;
|
||||||
|
}PARAM_INFO;
|
||||||
|
|
||||||
|
extern soft_iic_info_struct eeprom_param;
|
||||||
|
extern PARAM_INFO Param_Data[DATA_NUM];
|
||||||
|
extern TYPE_UNION iic_buffer[DATA_IN_FLASH_NUM];
|
||||||
|
extern float data1;
|
||||||
|
void jj_param_eeprom_init();
|
||||||
|
void jj_param_update();
|
||||||
|
void jj_param_show();
|
||||||
|
#endif
|
||||||
12
app/main.c
12
app/main.c
@@ -24,17 +24,18 @@
|
|||||||
#include "gl_headfile.h"
|
#include "gl_headfile.h"
|
||||||
#include "by_rt_button.h"
|
#include "by_rt_button.h"
|
||||||
#include "by_fan_control.h"
|
#include "by_fan_control.h"
|
||||||
#include "./page/cw_page.h"
|
#include "./page/page.h"
|
||||||
#include "jj_blueteeth.h"
|
#include "jj_blueteeth.h"
|
||||||
#include "./page/cw_page_ui_widget.h"
|
#include "jj_param.h"
|
||||||
|
#include "./page/page_ui_widget.h"
|
||||||
|
int falg_false = 0;
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
clock_init(SYSTEM_CLOCK_120M);
|
clock_init(SYSTEM_CLOCK_120M);
|
||||||
system_delay_init();
|
system_delay_init();
|
||||||
debug_init();
|
debug_init();
|
||||||
mt9v03x_init();
|
// mt9v03x_init();
|
||||||
ips200_init(IPS200_TYPE_SPI);
|
ips200_init(IPS200_TYPE_SPI);
|
||||||
by_gpio_init();
|
by_gpio_init();
|
||||||
by_exit_init();
|
by_exit_init();
|
||||||
@@ -42,10 +43,11 @@ int main(void)
|
|||||||
jj_bt_init();
|
jj_bt_init();
|
||||||
// while (imu660ra_init())
|
// while (imu660ra_init())
|
||||||
// ;
|
// ;
|
||||||
|
jj_param_eeprom_init();
|
||||||
Page_Init();
|
Page_Init();
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
Page_Run();
|
Page_Run();
|
||||||
jj_bt_run();
|
jj_bt_run();
|
||||||
if (mt9v03x_finish_flag) {
|
if (mt9v03x_finish_flag) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "cw_page.h"
|
#include "page.h"
|
||||||
|
|
||||||
#include "by_rt_button.h"
|
#include "by_rt_button.h"
|
||||||
|
|
||||||
@@ -118,13 +118,14 @@ void Page_Run(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 页面初始化(注册,构建) //ATTENTION 在此处添加新加入的页面
|
* @brief 页面初始化(注册,构建) ATTENTION 在此处添加新加入的页面
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void Page_Init(void)
|
void Page_Init(void)
|
||||||
{
|
{
|
||||||
PAGE_REG(page_menu);
|
PAGE_REG(page_menu);
|
||||||
PAGE_REG(page_rtcam);
|
PAGE_REG(page_rtcam);
|
||||||
|
PAGE_REG(page_param);
|
||||||
// PAGE_REG(page_argv);
|
// PAGE_REG(page_argv);
|
||||||
// PAGE_REG(page_sys);
|
// PAGE_REG(page_sys);
|
||||||
// PAGE_REG(page_run);
|
// PAGE_REG(page_run);
|
||||||
@@ -20,6 +20,7 @@ enum PageID {
|
|||||||
//......
|
//......
|
||||||
page_menu,
|
page_menu,
|
||||||
page_rtcam,
|
page_rtcam,
|
||||||
|
page_param,
|
||||||
// page_argv,
|
// page_argv,
|
||||||
// page_sys,
|
// page_sys,
|
||||||
// page_run,
|
// page_run,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "zf_common_headfile.h"
|
#include "zf_common_headfile.h"
|
||||||
#include "cw_page_ui_widget.h"
|
#include "page_ui_widget.h"
|
||||||
#include "cw_page.h"
|
#include "page.h"
|
||||||
|
|
||||||
#define LINE_HEAD 1
|
#define LINE_HEAD 1
|
||||||
#define LINE_END 7
|
#define LINE_END 7
|
||||||
@@ -25,7 +25,7 @@ static void Setup()
|
|||||||
{
|
{
|
||||||
ips200_clear();
|
ips200_clear();
|
||||||
Print_Menu_p();
|
Print_Menu_p();
|
||||||
Print_Curser(Curser, Curser_Last);
|
Print_Curser(Curser, Curser_Last,RGB565_PURPLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,7 +72,7 @@ static void Event(page_event event)
|
|||||||
Curser = LINE_HEAD;
|
Curser = LINE_HEAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
Print_Curser(Curser, Curser_Last);
|
Print_Curser(Curser, Curser_Last,RGB565_PURPLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
125
app/page/page_param.c
Normal file
125
app/page/page_param.c
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
#include "jj_param.h"
|
||||||
|
#include "page_ui_widget.h"
|
||||||
|
#include "page.h"
|
||||||
|
#define LINE_HEAD 0
|
||||||
|
#define LINE_END DATA_NUM - 2
|
||||||
|
static char Text[] = "RealTime Param";
|
||||||
|
int event_flag = 0;
|
||||||
|
static int8_t Curser = LINE_HEAD; // 定义光标位置
|
||||||
|
static int8_t Curser_Last = LINE_HEAD; // 定义光标位置
|
||||||
|
void jj_param_show();
|
||||||
|
/***************************************************************************************
|
||||||
|
*
|
||||||
|
* 以下为页面模板函数
|
||||||
|
*
|
||||||
|
***************************************************************************************/
|
||||||
|
/**
|
||||||
|
* @brief 页面初始化事件
|
||||||
|
* @param 无
|
||||||
|
* @retval 无
|
||||||
|
*/
|
||||||
|
static void Setup()
|
||||||
|
{
|
||||||
|
ips200_clear();
|
||||||
|
Print_Curser(Curser, Curser_Last, RGB565_PURPLE);
|
||||||
|
for (int16 i = 0; i < DATA_NUM - 1; i++) {
|
||||||
|
ips200_show_string(10, i * 18 + 2, Param_Data[i].text);
|
||||||
|
if (Param_Data[i].type == EINT32)
|
||||||
|
ips200_show_int(50, i * 18 + 2, *((int32 *)(Param_Data[i].p_data)), 5);
|
||||||
|
else if (Param_Data[i].type == EFLOAT)
|
||||||
|
ips200_show_float(50, i * 18 + 2, *((float *)(Param_Data[i].p_data)), 4, 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 页面退出事件
|
||||||
|
* @param 无
|
||||||
|
* @retval 无
|
||||||
|
*/
|
||||||
|
static void Exit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 页面循环执行的内容
|
||||||
|
* @param 无
|
||||||
|
* @retval 无
|
||||||
|
*/
|
||||||
|
static void Loop()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief 页面事件
|
||||||
|
* @param btn:发出事件的按键
|
||||||
|
* @param event:事件编号
|
||||||
|
* @retval 无
|
||||||
|
*/
|
||||||
|
static void Event(page_event event)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (0 == event_flag) {
|
||||||
|
|
||||||
|
Curser_Last = Curser;
|
||||||
|
if (page_event_forward == event) {
|
||||||
|
Curser--; // 光标上移
|
||||||
|
} else if (page_event_backward == event) {
|
||||||
|
Curser++; // 光标下移
|
||||||
|
} else if (page_event_press_short == event) {
|
||||||
|
event_flag = 1; // 选中参数
|
||||||
|
Print_Curser(Curser, Curser_Last, RGB565_RED);
|
||||||
|
return;
|
||||||
|
} else if (page_event_press_long == event) {
|
||||||
|
jj_param_update();
|
||||||
|
Page_Shift(page_menu);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (Curser < LINE_HEAD) {
|
||||||
|
Curser = LINE_END;
|
||||||
|
} else if (Curser > LINE_END) {
|
||||||
|
Curser = LINE_HEAD;
|
||||||
|
}
|
||||||
|
Print_Curser(Curser, Curser_Last, RGB565_PURPLE);
|
||||||
|
} else if (1 == event_flag) {
|
||||||
|
if (page_event_forward == event) {
|
||||||
|
if (Param_Data[Curser].type == EFLOAT) {
|
||||||
|
*((float *)(Param_Data[Curser].p_data)) += 0.01f;
|
||||||
|
} else if (Param_Data[Curser].type == EINT32) {
|
||||||
|
*((int32 *)(Param_Data[Curser].p_data)) += 1;
|
||||||
|
} else if (Param_Data[Curser].type == EUINT32) {
|
||||||
|
*((uint32 *)(Param_Data[Curser].p_data)) += 1;
|
||||||
|
}
|
||||||
|
} else if (page_event_backward == event) {
|
||||||
|
if (Param_Data[Curser].type == EFLOAT) {
|
||||||
|
*((float *)(Param_Data[Curser].p_data)) -= 0.01f;
|
||||||
|
} else if (Param_Data[Curser].type == EINT32) {
|
||||||
|
*((int32 *)(Param_Data[Curser].p_data)) -= 1;
|
||||||
|
} else if (Param_Data[Curser].type == EUINT32) {
|
||||||
|
*((uint32 *)(Param_Data[Curser].p_data)) -= 1;
|
||||||
|
}
|
||||||
|
} else if (page_event_press_short == event) {
|
||||||
|
|
||||||
|
} else if (page_event_press_long == event) {
|
||||||
|
event_flag = 0;
|
||||||
|
Print_Curser(Curser, Curser_Last, RGB565_PURPLE);
|
||||||
|
}
|
||||||
|
jj_param_show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void jj_param_show()
|
||||||
|
{
|
||||||
|
if (EINT32 == Param_Data[Curser].type)
|
||||||
|
ips200_show_int(50, Curser * 18 + 2, *((int32 *)(Param_Data[Curser].p_data)), 5);
|
||||||
|
else if (EUINT32 == Param_Data[Curser].type)
|
||||||
|
ips200_show_uint(50, Curser * 18 + 2, *((int32 *)(Param_Data[Curser].p_data)), 5);
|
||||||
|
else if (EFLOAT == Param_Data[Curser].type)
|
||||||
|
ips200_show_float(50, Curser * 18 + 2, *((float *)(Param_Data[Curser].p_data)), 4, 5);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @brief 页面注册函数
|
||||||
|
*
|
||||||
|
* @param pageID
|
||||||
|
*/
|
||||||
|
void PageRegister_page_param(unsigned char pageID)
|
||||||
|
{
|
||||||
|
Page_Register(pageID, Text, Setup, Loop, Exit, Event);
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "zf_common_headfile.h"
|
#include "zf_common_headfile.h"
|
||||||
#include "cw_page_ui_widget.h"
|
#include "page_ui_widget.h"
|
||||||
#include "cw_page.h"
|
#include "page.h"
|
||||||
|
|
||||||
#define LINE_HEAD 11
|
#define LINE_HEAD 11
|
||||||
#define LINE_END 16
|
#define LINE_END 16
|
||||||
@@ -23,7 +23,7 @@ static int8_t Curser_Last = LINE_HEAD; // 定义光标位置
|
|||||||
static void Setup()
|
static void Setup()
|
||||||
{
|
{
|
||||||
ips200_clear();
|
ips200_clear();
|
||||||
Print_Curser(Curser, Curser_Last);
|
Print_Curser(Curser, Curser_Last,RGB565_PURPLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71,7 +71,7 @@ static void Event(page_event event)
|
|||||||
Curser = LINE_HEAD;
|
Curser = LINE_HEAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
Print_Curser(Curser, Curser_Last);
|
Print_Curser(Curser, Curser_Last,RGB565_PURPLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "cw_page_ui_widget.h"
|
#include "page_ui_widget.h"
|
||||||
#include "zf_common_headfile.h"
|
#include "zf_common_headfile.h"
|
||||||
#include "gl_data.h"
|
#include "gl_data.h"
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
* @param Curser_In 当前光标位置
|
* @param Curser_In 当前光标位置
|
||||||
* @param Curser_Last_In 上一时刻光标位置
|
* @param Curser_Last_In 上一时刻光标位置
|
||||||
*/
|
*/
|
||||||
void Print_Curser(uint8_t Curser_In, uint8_t Curser_Last_In)
|
void Print_Curser(uint8_t Curser_In, uint8_t Curser_Last_In,uint16_t color)
|
||||||
{
|
{
|
||||||
// ips200_show_string(0, Curser_Last_In * 18, " ");
|
// ips200_show_string(0, Curser_Last_In * 18, " ");
|
||||||
// ips200_show_string(0, Curser_In * 18, ">");
|
// ips200_show_string(0, Curser_In * 18, ">");
|
||||||
@@ -20,7 +20,7 @@ void Print_Curser(uint8_t Curser_In, uint8_t Curser_Last_In)
|
|||||||
|
|
||||||
ips200_draw_rect(10, Curser_Last_In * 18 + 19, 170, Curser_Last_In * 18 + 19, IPS200_DEFAULT_BGCOLOR);
|
ips200_draw_rect(10, Curser_Last_In * 18 + 19, 170, Curser_Last_In * 18 + 19, IPS200_DEFAULT_BGCOLOR);
|
||||||
for (uint8_t i = 0; i < 160; i++) {
|
for (uint8_t i = 0; i < 160; i++) {
|
||||||
ips200_draw_point(10 + i, Curser_In * 18 + 19, RGB565_PURPLE);
|
ips200_draw_point(10 + i, Curser_In * 18 + 19, color);
|
||||||
system_delay_ms(1);
|
system_delay_ms(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ typedef struct {
|
|||||||
uint8_t data_tag; // 变量结构体
|
uint8_t data_tag; // 变量结构体
|
||||||
} ITEM;
|
} ITEM;
|
||||||
|
|
||||||
void Print_Curser(uint8_t Curser_In, uint8_t Curser_Last_In);
|
void Print_Curser(uint8_t Curser_In, uint8_t Curser_Last_In,uint16_t color);
|
||||||
void Print_Menu(const ITEM *item, uint8_t item_sum);
|
void Print_Menu(const ITEM *item, uint8_t item_sum);
|
||||||
void Print_Value(const ITEM *item, uint8_t item_sum);
|
void Print_Value(const ITEM *item, uint8_t item_sum);
|
||||||
void Set_Vaule(ITEM *item, uint8_t item_num, float step);
|
void Set_Vaule(ITEM *item, uint8_t item_num, float step);
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
#if K24C02_USE_SOFT_IIC // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7> <20><>ɫ<EFBFBD>ҵľ<D2B5><C4BE><EFBFBD>û<EFBFBD><C3BB><EFBFBD>õ<EFBFBD>
|
#if K24C02_USE_SOFT_IIC // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7> <20><>ɫ<EFBFBD>ҵľ<D2B5><C4BE><EFBFBD>û<EFBFBD><C3BB><EFBFBD>õ<EFBFBD>
|
||||||
//====================================================<3D><><EFBFBD><EFBFBD> IIC <20><><EFBFBD><EFBFBD>====================================================
|
//====================================================<3D><><EFBFBD><EFBFBD> IIC <20><><EFBFBD><EFBFBD>====================================================
|
||||||
#define K24C02_SOFT_IIC_DELAY (500) // <20><><EFBFBD><EFBFBD> IIC <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD> <20><>ֵԽС IIC ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD><D4BD>
|
#define K24C02_SOFT_IIC_DELAY (500) // <20><><EFBFBD><EFBFBD> IIC <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD> <20><>ֵԽС IIC ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD><D4BD>
|
||||||
#define K24C02_SCL_PIN (B10 ) // <20><><EFBFBD><EFBFBD> IIC SCL <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> K24C02 <20><> SCL <20><><EFBFBD><EFBFBD>
|
#define K24C02_SCL_PIN (E3) // <20><><EFBFBD><EFBFBD> IIC SCL <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> K24C02 <20><> SCL <20><><EFBFBD><EFBFBD>
|
||||||
#define K24C02_SDA_PIN (B11 ) // <20><><EFBFBD><EFBFBD> IIC SDA <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> K24C02 <20><> SDA <20><><EFBFBD><EFBFBD>
|
#define K24C02_SDA_PIN (E2 ) // <20><><EFBFBD><EFBFBD> IIC SDA <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> K24C02 <20><> SDA <20><><EFBFBD><EFBFBD>
|
||||||
//====================================================<3D><><EFBFBD><EFBFBD> IIC <20><><EFBFBD><EFBFBD>====================================================
|
//====================================================<3D><><EFBFBD><EFBFBD> IIC <20><><EFBFBD><EFBFBD>====================================================
|
||||||
#else
|
#else
|
||||||
//====================================================Ӳ<><D3B2> IIC <20><><EFBFBD><EFBFBD>====================================================
|
//====================================================Ӳ<><D3B2> IIC <20><><EFBFBD><EFBFBD>====================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user