build: W600-SDK importiert, Firmware-Build und Hello am EVK
Docker-Build mit gcc-arm-none-eabi 4.9-2014q4 (statt Homebrew-Cask) verwendet, Dockerfile/tools/docker.sh dafür aus Task 13 vorgezogen. cmake/sdk.cmake schont gcc 4.9 (kennt -fcommon/-Wno-error=... nicht). Zwei zusätzliche SDK-Stubs (EarlyInit, pre_gpio_config) in src/sys/sdk_stubs.c ergänzt, siehe sdk/PATCHES.md.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/**************************************************************************
|
||||
* File Name : utils.h
|
||||
* Author :
|
||||
* Version : 1.0
|
||||
* Date :
|
||||
* Description :
|
||||
*
|
||||
* Copyright (c) 2014 Winner Microelectronics Co., Ltd.
|
||||
* All rights reserved.
|
||||
*
|
||||
***************************************************************************/
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
int chk_crc8(u8 *ptr, u32 len);
|
||||
u8 get_crc8(u8 *ptr, u32 len);
|
||||
u8 calculate_crc8(u8 crc8, u8 *ptr, u32 len);
|
||||
u32 get_crc32(u8 *data, u32 data_size);
|
||||
u32 checksum(u32 *data, u32 length, u32 init);
|
||||
int atodec(char ch);
|
||||
int strtodec(int *dec, char *str);
|
||||
int atohex(char ch);
|
||||
int strtohex(u32 *hex, char *str);
|
||||
int strtohexarray(u8 array[], int cnt, char *str);
|
||||
int strtoip(u32 *ipadr, char * str);
|
||||
void iptostr(u32 ip, char *str);
|
||||
void mactostr(u8 mac[], char *str);
|
||||
|
||||
int hex_to_digit(int c);
|
||||
int digit_to_hex(int c);
|
||||
int hexstr_to_unit(char *buf, u32 *d);
|
||||
int string_to_uint(char *buf, u32 *d);
|
||||
int string_to_ipaddr(const char *buf, u8 *addr);
|
||||
char * strdup(const char *s);
|
||||
char * strndup(const char *s, size_t len);
|
||||
|
||||
int sendchar(int ch);
|
||||
|
||||
#endif /* UTILS_H */
|
||||
Reference in New Issue
Block a user