| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef __SYS_H
- #define __SYS_H
- #include "stm32f10x.h"
- typedef unsigned int clock_t; /* cpu time type */
- typedef unsigned int time_t; /* date/time in unix secs past 1-Jan-70 */
-
- #define UART_RECV_SIZE 1024 //接收缓存大小
- #define RECV_SIZE UART_RECV_SIZE + 200 //有效数据缓存大小
- /*---------------------------------------------------------------------------*/
- /* Type Definition Macros */
- /*---------------------------------------------------------------------------*/
- typedef int socklen_t;
- typedef long long int int64;
- typedef unsigned long long int uint64;
- typedef _Bool uint1;
- typedef unsigned char uint8;
- typedef char int8;
- typedef unsigned short uint16;
- typedef short int16;
- typedef unsigned int uint32;
- typedef int int32;
- void byteToHexStr(const unsigned char* source, char* dest, int sourceLen);
- void inttohex(uint16 value,uint8 *hex);
- void letterSwitch(char *str, int flag);
- int my_atoi(char *str);
- char* my_itoa(int num,char* str,int radix);
- /**
- * @title 分割字符串
- * @Param src:要分割字符串,seperator:分隔符, dest:分割后字符串地址, size:分割的数量
- */
- void split(char *src,const char *separator,char *dest[],int size);
- /**
- * @Title split,分割字符串
- * @Param 要分割字符串,seperator:分隔符, dest:分割后字符串地址,limit:分割限制数量
- */
- void splitCharLimit(char *str, char seprator, char *dest[], int limit);
-
- /**
- * @title 延时函数
- * @Param ms:延时时间(单位ms)
- */
- uint8_t memmem(uint8_t * result,uint16_t result_length, uint8_t *rdystring,uint8_t rdylen);
- #endif
|