123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #ifndef __MESSAGE_H_
- #define __MESSAGE_H_
- #include <stm32f10x.h>
- #include "ListBox.h"
-
- #if 0
- #define SMS_START_ADDRESS 0x3E70000
- #else
- #define SMS_START_ADDRESS 0x00300000
- #endif
-
- #define SMS_TOTAL_NUM 1000
- #define SMS_SIZE_PER 512
- #define SMS_SIGNAL_LEN (400)
-
-
- struct SUT_SMS_CONF_HEADER
- {
- uint8_t resetFlag;
- uint32_t newAddr;
- }__attribute__((packed));
-
- struct SUT_SMS_INFO_HEADER
- {
- uint8_t flag;
- uint8_t read;
- uint32_t recTime;
- uint16_t len;
- uint32_t upperAddr;
- uint32_t nextAddr;
- }__attribute__((packed));
- #define SMS_INFO_REAL_LEN sizeof(struct SUT_SMS_INFO_HEADER)-8
- #define SMS_INFO_DETAIL_OFFSET sizeof(struct SUT_SMS_INFO_HEADER)
-
- typedef struct
- {
- uint8_t haveUnRead:1;
- uint8_t smsUpdate:1;
- uint8_t poolFull:1;
-
- uint8_t smsEnable;
- uint16_t smsTotalNum;
- uint16_t smsUnReadNum;
- uint32_t newestAddr;
- uint32_t emptyAddr;
-
- uint32_t upToBeRead;
- uint32_t downToBeRead;
-
- uint32_t ReadAddr[LIST_ROW];
- }__attribute__((packed)) SUT_SMS_DEFINE;
-
- #define MESS_EDIT_BUFFER_LEN_MAX 92
- typedef struct SUT_MESSAGE_EDIT
- {
- unsigned short x;
- unsigned char y;
- char buffer[MESS_EDIT_BUFFER_LEN_MAX+1];
- char buffer1[20];
- unsigned char item;
- unsigned char len;
- unsigned char xlen;
- unsigned char ylen;
- }SUT_MESSAGE_EDIT;
- extern SUT_SMS_DEFINE sutSms;
- void UIShowMailBox(int update);
- void MessageResponse(void);
- void MessageReadShow(int Update);
- void MessageReadResponse(void);
- void SetMessageFile(const char *filename);
- void MessageEditInit(SUT_MESSAGE_EDIT *p,unsigned short x,unsigned char y,char *def);
- unsigned short MessageEditShow(SUT_MESSAGE_EDIT *p,char *def);
- void MessageDeletShow(int update);
- void MessageDeletResponse(void);
- void SetGotNewMessage(void);
- void ShowMessageFlag(uint8_t show);
- void SetMessageConfi(void);
- void IncomingSMS(void);
- void DeleteSpecificSMS(void);
- uint8_t GetPagePreMessage(struct SUT_LIST_BOX *p,uint8_t firstRead, char up_down);
- void MessageOptionShow(int update);
- void MessageOptionResponse(void);
- void SMSHandle(void);
- void ResetNetConfi(void);
- #endif
|