ioLibrary for Cortex M series
|
Platform Utility Common Header File. More...
Go to the source code of this file.
Classes | |
struct | usart_param_t |
Macros | |
#define | WIZPF_USART_SET_PARAM(param_p, br_e, wl_e, sb_e, pb_e, fc_e) |
#define | wizpf_led_flicker(led_v, interval_v) |
Typedefs | |
typedef enum usart_baudrate_t | usart_baudrate |
typedef enum usart_wordlen_t | usart_wordlen |
typedef enum usart_stopbit_t | usart_stopbit |
typedef enum usart_parity_t | usart_parity |
typedef enum usart_flowcon_t | usart_flowcon |
typedef struct usart_param_t | usart_param |
Enumerations | |
enum | wizpf_usart { WIZ_USART1, WIZ_USART2 } |
enum | usart_baudrate_t { UBR_110 = 110, UBR_300 = 300, UBR_600 = 600, UBR_1200 = 1200, UBR_2400 = 2400, UBR_4800 = 4800, UBR_9600 = 9600, UBR_14400 = 14400, UBR_19200 = 19200, UBR_38400 = 38400, UBR_57600 = 57600, UBR_115200 = 115200, UBR_230400 = 230400, UBR_460800 = 460800, UBR_921600 = 921600 } |
enum | usart_wordlen_t { UWL_8 = 0, UWL_9 = 1 } |
enum | usart_stopbit_t { UST_0d5 = 0, UST_1 = 1, UST_1d5 = 2, UST_2 = 3 } |
enum | usart_parity_t { UPB_NO = 0, UPB_EVEN = 1, UPB_ODD = 2 } |
enum | usart_flowcon_t { UFC_NO = 0, UFC_HW = 1 } |
enum | wizpf_spi { WIZ_SPI1 = 0, WIZ_SPI2 = 1, WIZ_SPI3 = 2 } |
enum | wizpf_led { WIZ_LED1, WIZ_LED2, WIZ_LED3, WIZ_LED4 } |
enum | gpio_mode { GMOD_IN_FLOAT, GMOD_IN_PULLUP, GMOD_IN_PULLDOWN, GMOD_OUT_PUSHPULL, GMOD_OUT_OPENDRAIN, GMOD_AF_PUSHPULL, GMOD_AF_OPENDRAIN } |
Functions | |
int8_t | platform_init (usart_param *up) |
int8_t | wizpf_spi_init (wizpf_spi spi) |
uint32_t | wizpf_get_systick (void) |
uint32_t | wizpf_tick_conv (uint8_t istick2sec, uint32_t tickorsec) |
int32_t | wizpf_tick_elapse (uint32_t tick) |
void | Delay_us (uint8_t time_us) |
void | Delay_ms (uint16_t time_ms) |
void | Delay_tick (uint32_t tick) |
int8_t | wizpf_led_set (wizpf_led led, uint8_t action) |
int8_t | wizpf_led_get (wizpf_led led) |
void | wizpf_led_trap (uint8_t repeat) |
int32_t | wizpf_putchar (int32_t ch, wizpf_usart usart) |
int32_t | wizpf_getchar (wizpf_usart usart) |
int32_t | wizpf_getcharNB (wizpf_usart usart) |
void | wizchip_HW_reset (void) |
void | wizpf_wizchip_cris_enter () |
void | wizpf_wizchip_cris_exit () |
void | wizpf_wizchip_select () |
void | wizpf_wizchip_deselect () |
void | wizpf_wizchip_spi_writebyte (uint8_t wb) |
uint8_t | wizpf_wizchip_spi_readbyte () |
Platform Utility Common Header File.
Definition in file wizplatform.h.
#define wizpf_led_flicker | ( | led_v, | |
interval_v | |||
) |
Flicker a LED for debug with some interval.
led_v | LED Index number (wizpf_led) |
interval_v | Interval time (ms) |
Definition at line 144 of file wizplatform.h.
enum wizpf_led |
Indicate the LED index number
Enumerator | |
---|---|
WIZ_LED1 |
Indicate the 1st LED. |
WIZ_LED2 |
Indicate the 2nd LED. |
WIZ_LED3 |
Indicate the 3rd LED. |
WIZ_LED4 |
Indicate the 4th LED. |
Definition at line 97 of file wizplatform.h.
enum gpio_mode |
Indicate the GPIO mode
Definition at line 108 of file wizplatform.h.
int8_t platform_init | ( | usart_param * | up) |
Definition at line 71 of file wizplatform.c.
References usart_param_t::baudrate, ERR, LED1_PIN, LED1_PORT, LED2_PIN, LED2_PORT, reg_wizchip_cs_cbfunc(), reg_wizchip_spi_cbfunc(), RET_NOK, RET_OK, USART0_IRQHandler(), USART1_IRQHandler(), VAL_ON, WIZ_LED1, WIZ_LED2, WIZ_SPI1, wizchip_HW_reset(), wizchip_init(), wizpf_led_set(), wizpf_spi_init(), wizpf_wizchip_deselect(), wizpf_wizchip_select(), wizpf_wizchip_spi_readbyte(), and wizpf_wizchip_spi_writebyte().
uint32_t wizpf_get_systick | ( | void | ) |
Definition at line 203 of file wizplatform.c.
References msTicks.
Referenced by alarm_set(), TCPReSendNB(), and wizpf_tick_elapse().
uint32_t wizpf_tick_conv | ( | uint8_t | istick2sec, |
uint32_t | tickorsec | ||
) |
Definition at line 208 of file wizplatform.c.
References SYSTICK_HZ.
int32_t wizpf_tick_elapse | ( | uint32_t | tick) |
Definition at line 214 of file wizplatform.c.
References wizpf_get_systick().
Referenced by alarm_run(), and TCPReSendNB().
void Delay_us | ( | uint8_t | time_us) |
Definition at line 167 of file wizplatform.c.
Referenced by Delay_ms(), and wizchip_HW_reset().
void Delay_ms | ( | uint16_t | time_ms) |
Definition at line 182 of file wizplatform.c.
References Delay_us().
Referenced by wizchip_HW_reset(), and wizpf_led_trap().
void Delay_tick | ( | uint32_t | tick) |
Definition at line 195 of file wizplatform.c.
References msTicks.
void wizchip_HW_reset | ( | void | ) |
Definition at line 157 of file wizplatform.c.
References Delay_ms(), and Delay_us().
Referenced by platform_init().