Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SHA204 Service - timer functions

code example to use the timeout timer: sha204_start_timeout_timer_ms(timeout); bool status = false; do { status = try_your_thing(); } while ((sha204_timer expired == false) && (status == false));

Functions

void sha204h_delay_ms (uint16_t delay)
 This function delays for a number of milliseconds. More...
 
void sha204h_start_timeout_timer_ms (uint16_t timeout)
 This function starts a timeout timer. More...
 
void sha204h_start_timer (uint16_t delay, uint8_t is_blocking)
 This function delays for a number of microseconds (not compiled). More...
 
void sha204h_timer_init (void)
 This function initializes a delay timer. More...
 

void sha204h_delay_ms ( uint16_t  delay)

This function delays for a number of milliseconds.

    You can override this function if you like to do
    something else in your system while delaying.
Parameters
[in]delaynumber of milliseconds to delay

References sha204h_start_timer().

Referenced by display_status(), main(), sha204c_send_and_receive(), sha204c_wakeup(), and sha204p_wakeup().

void sha204h_start_timeout_timer_ms ( uint16_t  timeout)

This function starts a timeout timer.

Parameters
[in]timeoutnumber of milliseconds before timing out

References sha204h_start_timer().

Referenced by sha204c_send_and_receive().

void sha204h_start_timer ( uint16_t  delay,
uint8_t  is_blocking 
)

This function delays for a number of microseconds (not compiled).

Parameters
[in]delaynumber of microseconds to delay This function starts a milliseconds timer.
[in]delaynumber of milliseconds to delay
[in]is_blockingtrue: returns after delay; false: returns immediately

References DELAY_COUNTER, sha204_timer_expired, tc_get_resolution(), tc_restart(), tc_set_resolution(), and tc_write_period().

Referenced by sha204h_delay_ms(), and sha204h_start_timeout_timer_ms().

void sha204h_timer_init ( void  )