GaIA BIOS Library
Loading...
Searching...
No Matches
modbus_rtos.h File Reference

Modbus interface to an RTOS. More...

#include <stdint.h>

Macros

#define MB_RTOS_TOUT   0
 Timeout expired.
#define MB_RTOS_SIGNAL   1
 A signal has been received.

Functions

void mb_rtos_wait (uint32_t delay)
 Waits for the specified time.
uint32_t mb_rtos_waitsig (uint32_t timeout)
 Waits for a signal until the given timeout expires.
void mb_rtos_sendsig (uintptr_t taskid)
 Sends a signal to the task corresponding to the given task id.
uint32_t mb_rtos_gettick (void)
 Returns th tick count.

Detailed Description

Modbus interface to an RTOS.

Author
Tecnologix, 2014

Function Documentation

◆ mb_rtos_gettick()

uint32_t mb_rtos_gettick ( void )

Returns th tick count.

This function is used for timeouts.

Returns
the tick count.

◆ mb_rtos_sendsig()

void mb_rtos_sendsig ( uintptr_t taskid)

Sends a signal to the task corresponding to the given task id.

Parameters
taskidid of the task to send the signal to.

◆ mb_rtos_wait()

void mb_rtos_wait ( uint32_t delay)

Waits for the specified time.

Parameters
delaynumber of milliseconds to wait.

◆ mb_rtos_waitsig()

uint32_t mb_rtos_waitsig ( uint32_t timeout)

Waits for a signal until the given timeout expires.

Parameters
timeoutmaximum time to wait.
Returns
whether the signal was received within the specified timeout or not. It can be: MB_RTOS_TOUT or MB_RTOS_SIGNAL.