ioLibrary for Cortex M series
Classes | Macros | Typedefs | Enumerations | Functions
wizplatform.h File Reference

Platform Utility Common Header File. More...

This graph shows which files directly or indirectly include this file:

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 ()
 

Detailed Description

Platform Utility Common Header File.

Version
1.0
Date
2013/02/22
Revision
2013/02/22 - 1.0 Release
Author
Mike Jeong

Copyright (C) 2013 WIZnet. All rights reserved.

Definition in file wizplatform.h.

Macro Definition Documentation

#define wizpf_led_flicker (   led_v,
  interval_v 
)
Value:
do { \
static uint32_t tick = 0; \
if(wizpf_tick_elapse(tick) > interval_v) { \
wizpf_led_set(led_v, VAL_TOG); \
tick = wizpf_get_systick(); \
} \
} while(0)

Flicker a LED for debug with some interval.

Parameters
led_vLED Index number (wizpf_led)
interval_vInterval time (ms)

Definition at line 144 of file wizplatform.h.

Enumeration Type Documentation

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

Enumerator
GMOD_IN_FLOAT 

Indicate Floating Input.

GMOD_IN_PULLUP 

Indicate Pulled up Input.

GMOD_IN_PULLDOWN 

Indicate Pulled down Input.

GMOD_OUT_PUSHPULL 

Indicate Push-Pull Output.

GMOD_OUT_OPENDRAIN 

Indicate Open-Drain Output.

GMOD_AF_PUSHPULL 

Indicate Push-Pull Alternate Function.

GMOD_AF_OPENDRAIN 

Indicate Open-Drain Alternate Function.

Definition at line 108 of file wizplatform.h.

Function Documentation

int8_t platform_init ( usart_param up)
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().