|
楼主 |
发表于 2024-10-23 14:05:59
|
显示全部楼层
我用程序写入的
switch(RealTime.week)
{
case 1://
#define MONDAY_NAME "ÐÇÆÚÒ»\0\0"
memcpy(Device_Information, MONDAY_NAME, sizeof(MONDAY_NAME) + 1);
sys_write_vp(Week_VAL_ADDR, Device_Information, 10);
break;
case 2://
#define TUESDAY_NAME "ÐÇÆÚ¶þ\0\0"
memcpy(Device_Information, TUESDAY_NAME, sizeof(TUESDAY_NAME) + 1);
sys_write_vp(Week_VAL_ADDR, Device_Information, 10);
break;
case 3://
#define WEDNESDAY_NAME "ÐÇÆÚÈý\0\0"
memcpy(Device_Information, WEDNESDAY_NAME, sizeof(WEDNESDAY_NAME) + 1);
sys_write_vp(Week_VAL_ADDR, Device_Information, 10);
break;
case 4://
#define THURSDAY_NAME "ÐÇÆÚËÄ\0\0"
memcpy(Device_Information, THURSDAY_NAME, sizeof(THURSDAY_NAME) + 1);
sys_write_vp(Week_VAL_ADDR, Device_Information, 10);
break;
case 5://
#define FRIDAY_NAME "ÐÇÆÚÎå\0\0"
memcpy(Device_Information, FRIDAY_NAME, sizeof(FRIDAY_NAME) + 1);
sys_write_vp(Week_VAL_ADDR, Device_Information, 10);
break;
case 6://ÐÇÆÚÁù
#define SATURDAY_NAME "ÐÇÆÚÁù\0\0"
memcpy(Device_Information, SATURDAY_NAME, sizeof(SATURDAY_NAME) + 1);
sys_write_vp(Week_VAL_ADDR, Device_Information, 10);
break;
case 7://ÐÇÆÚÈÕ
#define SUNDAY_NAME "ÐÇÆÚÈÕ\0\0"
memcpy(Device_Information, SUNDAY_NAME, sizeof(SUNDAY_NAME) + 1);
sys_write_vp(Week_VAL_ADDR, Device_Information, 10);
break;
} |
|