WIZlib Library API  ver 1.0
WIZlib Library API User Menual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
Platform Utility

Platform independent functions. More...

Collaboration diagram for Platform Utility:

Macros

#define wizpf_led_flicker(led_v, interval_v)
 Flicker a LED for debug with some interval. More...
 

Enumerations

enum  wizpf_led { WIZ_LED1, WIZ_LED2, WIZ_LED3, WIZ_LED4 }
 Indicate the LED index number. More...
 

Functions

int8 platform_init (void)
 Initialize Platform. More...
 
uint32 wizpf_get_systick (void)
 Get current SysTick. More...
 
int32 wizpf_tick_elapse (uint32 tick)
 Calculate Elapsed time (or Remaining time) [+]value is Elapsed-time, [-]value is Remaining-time. More...
 
uint32 wizpf_tick_conv (bool istick2sec, uint32 tickorsec)
 Convert Tick(Second) to Second(Tick). More...
 
void Delay_tick (uint32 tick)
 Tick Delay Function. More...
 
void Delay_us (uint8 time_us)
 Micro-second Scale Delay Function. More...
 
void Delay_ms (uint16 time_ms)
 Mili-second Scale Delay Function. More...
 
int8 wizpf_led_set (wizpf_led led, uint8 action)
 Set LED On/Off/Toggle. More...
 
int8 wizpf_led_get (wizpf_led led)
 Get current LED State. More...
 
void wizpf_led_trap (uint8 repeat)
 Assert Function using LED. More...
 
void GPIO_Configuration (void)
 Common GPIO Configuration.
 
void RCC_Configuration (void)
 Common RCC Configuration.
 
void NVIC_Configuration (void)
 Common NVIC Configuration.
 

Detailed Description

Platform independent functions.

Macro Definition Documentation

#define wizpf_led_flicker (   led_v,
  interval_v 
)
Value:
do { \
static uint32 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 77 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 32 of file wizplatform.h.

Function Documentation

void Delay_ms ( uint16  time_ms)

Mili-second Scale Delay Function.

This function is not precise

Parameters
time_msDelay time

Definition at line 396 of file WIZ_W5200/wizplatform.c.

Here is the caller graph for this function:

void Delay_tick ( uint32  tick)

Tick Delay Function.

This function is precise.

Parameters
tickDelay time (Default value of 1 tick is 1 ms)

Definition at line 408 of file WIZ_W5200/wizplatform.c.

void Delay_us ( uint8  time_us)

Micro-second Scale Delay Function.

This function is not precise

Parameters
time_usDelay time

Definition at line 381 of file WIZ_W5200/wizplatform.c.

Here is the caller graph for this function:

int8 platform_init ( void  )

Initialize Platform.

This function should be called in the main function. If not, you have to handle network initialization manually.

Returns
RET_OK: Success
RET_NOK: Error

Definition at line 53 of file WIZ_W5200/wizplatform.c.

uint32 wizpf_get_systick ( void  )

Get current SysTick.

Returns
Current SysTick

Definition at line 196 of file WIZ_W5200/wizplatform.c.

Here is the caller graph for this function:

int8 wizpf_led_get ( wizpf_led  led)

Get current LED State.

Parameters
ledThe LED to set (wizpf_led)
Returns
LED State ( VAL_ON / VAL_OFF )

Definition at line 250 of file WIZ_W5200/wizplatform.c.

int8 wizpf_led_set ( wizpf_led  led,
uint8  action 
)

Set LED On/Off/Toggle.

Parameters
ledThe LED to set (wizpf_led)
actionThe action to set ( VAL_ON / VAL_OFF / VAL_TOG )
Returns
RET_OK: Success
RET_NOK: Error

Definition at line 214 of file WIZ_W5200/wizplatform.c.

Here is the caller graph for this function:

void wizpf_led_trap ( uint8  repeat)

Assert Function using LED.

Parameters
repeatThe repeat count to set

Definition at line 278 of file WIZ_W5200/wizplatform.c.

uint32 wizpf_tick_conv ( bool  istick2sec,
uint32  tickorsec 
)

Convert Tick(Second) to Second(Tick).

Parameters
istick2secTRUE: Tick->Second, FALSE: Second->Tick
tickorsecThe value to convert
Returns
Converted value

Definition at line 201 of file WIZ_W5200/wizplatform.c.

int32 wizpf_tick_elapse ( uint32  tick)

Calculate Elapsed time (or Remaining time) [+]value is Elapsed-time, [-]value is Remaining-time.

Parameters
tickThe time to calculate
Returns
Elapsed time (or Remaining time)

Definition at line 207 of file WIZ_W5200/wizplatform.c.

Here is the caller graph for this function: