123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- #ifndef __SYS_DATA_H
- #define __SYS_DATA_H
- #include "usart.h"
- #include "stm32f2xx.h"
- #include "string.h"
- #include "delay.h"
- #define _USART3_RXSIZE 1040
- #define ON 1
- #define OFF 0
- typedef struct
- {
- uint32_t rxIndex;
- uint8_t rxBuf[_USART3_RXSIZE];
- uint8_t txBusy;
- uint8_t done;
- }USART_MSG_t;
- extern USART_MSG_t usartMsg;
- extern uint8_t result;
- void call_back(void);
- uint8_t channel_LED(uint8_t channel, int i);
- uint8_t channel_12VBAT(uint8_t channel, int i);
- uint8_t channel_5VBAT(uint8_t channel);
- void broad_to_host(void);
- //////////////////////// LED ////////////////////////
- // 全部channel下的平台
- uint8_t channel_No0_LED(uint8_t platform, int i);// 全部channel
- uint8_t channel_No0_platform_No0_LED(uint8_t cmd);// 全部平台
- uint8_t channel_No0_platform_No1_LED(uint8_t cmd);
- uint8_t channel_No0_platform_No2_LED(uint8_t cmd);
- uint8_t channel_No0_platform_No3_LED(uint8_t cmd);
- uint8_t channel_No0_platform_No4_LED(uint8_t cmd);
- uint8_t channel_No0_platform_No5_LED(uint8_t cmd);
- uint8_t channel_No0_platform_No6_LED(uint8_t cmd);
- // channel 1 下的平台
- uint8_t channel_No1_LED(uint8_t platform, int i);
- uint8_t channel_No1_platform_No0_LED(uint8_t cmd);// 全部平台
- uint8_t channel_No1_platform_No1_LED(uint8_t cmd);
- uint8_t channel_No1_platform_No2_LED(uint8_t cmd);
- uint8_t channel_No1_platform_No3_LED(uint8_t cmd);
- uint8_t channel_No1_platform_No4_LED(uint8_t cmd);
- uint8_t channel_No1_platform_No5_LED(uint8_t cmd);
- uint8_t channel_No1_platform_No6_LED(uint8_t cmd);
- // channel 2 下的平台
- uint8_t channel_No2_LED(uint8_t platform, int i);
- uint8_t channel_No2_platform_No0_LED(uint8_t cmd);// 全部平台
- uint8_t channel_No2_platform_No1_LED(uint8_t cmd);
- uint8_t channel_No2_platform_No2_LED(uint8_t cmd);
- uint8_t channel_No2_platform_No3_LED(uint8_t cmd);
- uint8_t channel_No2_platform_No4_LED(uint8_t cmd);
- uint8_t channel_No2_platform_No5_LED(uint8_t cmd);
- uint8_t channel_No2_platform_No6_LED(uint8_t cmd);
- // channel 3 下的平台
- uint8_t channel_No3_LED(uint8_t platform, int i);
- uint8_t channel_No3_platform_No0_LED(uint8_t cmd);// 全部平台
- uint8_t channel_No3_platform_No1_LED(uint8_t cmd);
- uint8_t channel_No3_platform_No2_LED(uint8_t cmd);
- uint8_t channel_No3_platform_No3_LED(uint8_t cmd);
- uint8_t channel_No3_platform_No4_LED(uint8_t cmd);
- uint8_t channel_No3_platform_No5_LED(uint8_t cmd);
- uint8_t channel_No3_platform_No6_LED(uint8_t cmd);
- // channel 4 下的平台
- uint8_t channel_No4_LED(uint8_t platform, int i);
- uint8_t channel_No4_platform_No0_LED(uint8_t cmd);// 全部平台
- uint8_t channel_No4_platform_No1_LED(uint8_t cmd);
- uint8_t channel_No4_platform_No2_LED(uint8_t cmd);
- uint8_t channel_No4_platform_No3_LED(uint8_t cmd);
- uint8_t channel_No4_platform_No4_LED(uint8_t cmd);
- uint8_t channel_No4_platform_No5_LED(uint8_t cmd);
- uint8_t channel_No4_platform_No6_LED(uint8_t cmd);
- //////////////////////// 12VBAT ////////////////////////
- // 全部channel下的平台
- uint8_t channel_No0_12VBAT(uint8_t platform, int i); //全部channel
- uint8_t channel_No0_platform_No0_12VBAT(uint8_t cmd);// 全部平台
- uint8_t channel_No0_platform_No1_12VBAT(uint8_t cmd);
- uint8_t channel_No0_platform_No2_12VBAT(uint8_t cmd);
- uint8_t channel_No0_platform_No3_12VBAT(uint8_t cmd);
- uint8_t channel_No0_platform_No4_12VBAT(uint8_t cmd);
- uint8_t channel_No0_platform_No5_12VBAT(uint8_t cmd);
- uint8_t channel_No0_platform_No6_12VBAT(uint8_t cmd);
- // channel 1 下的平台
- uint8_t channel_No1_12VBAT(uint8_t platform, int i); //全部channel
- uint8_t channel_No1_platform_No0_12VBAT(uint8_t cmd);// 全部平台
- uint8_t channel_No1_platform_No1_12VBAT(uint8_t cmd);
- uint8_t channel_No1_platform_No2_12VBAT(uint8_t cmd);
- uint8_t channel_No1_platform_No3_12VBAT(uint8_t cmd);
- uint8_t channel_No1_platform_No4_12VBAT(uint8_t cmd);
- uint8_t channel_No1_platform_No5_12VBAT(uint8_t cmd);
- uint8_t channel_No1_platform_No6_12VBAT(uint8_t cmd);
- // channel 2 下的平台
- uint8_t channel_No2_12VBAT(uint8_t platform, int i); //全部channel
- uint8_t channel_No2_platform_No0_12VBAT(uint8_t cmd);// 全部平台
- uint8_t channel_No2_platform_No1_12VBAT(uint8_t cmd);
- uint8_t channel_No2_platform_No2_12VBAT(uint8_t cmd);
- uint8_t channel_No2_platform_No3_12VBAT(uint8_t cmd);
- uint8_t channel_No2_platform_No4_12VBAT(uint8_t cmd);
- uint8_t channel_No2_platform_No5_12VBAT(uint8_t cmd);
- uint8_t channel_No2_platform_No6_12VBAT(uint8_t cmd);
- // channel 3 下的平台
- uint8_t channel_No3_12VBAT(uint8_t platform, int i); //全部channel
- uint8_t channel_No3_platform_No0_12VBAT(uint8_t cmd);// 全部平台
- uint8_t channel_No3_platform_No1_12VBAT(uint8_t cmd);
- uint8_t channel_No3_platform_No2_12VBAT(uint8_t cmd);
- uint8_t channel_No3_platform_No3_12VBAT(uint8_t cmd);
- uint8_t channel_No3_platform_No4_12VBAT(uint8_t cmd);
- uint8_t channel_No3_platform_No5_12VBAT(uint8_t cmd);
- uint8_t channel_No3_platform_No6_12VBAT(uint8_t cmd);
- // channel 4 下的平台
- uint8_t channel_No4_12VBAT(uint8_t platform, int i); //全部channel
- uint8_t channel_No4_platform_No0_12VBAT(uint8_t cmd);// 全部平台
- uint8_t channel_No4_platform_No1_12VBAT(uint8_t cmd);
- uint8_t channel_No4_platform_No2_12VBAT(uint8_t cmd);
- uint8_t channel_No4_platform_No3_12VBAT(uint8_t cmd);
- uint8_t channel_No4_platform_No4_12VBAT(uint8_t cmd);
- uint8_t channel_No4_platform_No5_12VBAT(uint8_t cmd);
- uint8_t channel_No4_platform_No6_12VBAT(uint8_t cmd);
- #endif
|