KNX IoT
KNX IoT Point API stack implementation
Common operations

This section contains common operations that can be used to schedule callbacks. More...

Macros

#define oc_activate_interrupt_handler(name)    (oc_process_start(&(name##_interrupt_x), 0))
 activate the interrupt handler More...
 
#define oc_define_interrupt_handler(name)
 define the interrupt handler More...
 
#define oc_signal_interrupt_handler(name)
 API for setting handlers for interrupts. More...
 

Functions

void oc_remove_delayed_callback (void *cb_data, oc_trigger_t callback)
 used to cancel a delayed callback More...
 
void oc_set_delayed_callback (void *cb_data, oc_trigger_t callback, uint16_t seconds)
 Schedule a callback to be invoked after a set number of seconds. More...
 
void oc_set_delayed_callback_ms (void *cb_data, oc_trigger_t callback, uint16_t miliseconds)
 Schedule a callback to be invoked after a set number of miliseconds. More...
 

Detailed Description

This section contains common operations that can be used to schedule callbacks.

Macro Definition Documentation

◆ oc_activate_interrupt_handler

#define oc_activate_interrupt_handler (   name)     (oc_process_start(&(name##_interrupt_x), 0))

activate the interrupt handler

Definition at line 1718 of file oc_api.h.

◆ oc_define_interrupt_handler

#define oc_define_interrupt_handler (   name)
Value:
void name##_interrupt_x_handler(void); \
OC_PROCESS(name##_interrupt_x, ""); \
OC_PROCESS_THREAD(name##_interrupt_x, ev, data) \
{ \
(void)data; \
OC_PROCESS_POLLHANDLER(name##_interrupt_x_handler()); \
OC_PROCESS_BEGIN(); \
while (oc_process_is_running(&(name##_interrupt_x))) { \
OC_PROCESS_YIELD(); \
} \
OC_PROCESS_END(); \
} \
void name##_interrupt_x_handler(void)

define the interrupt handler

Definition at line 1722 of file oc_api.h.

◆ oc_signal_interrupt_handler

#define oc_signal_interrupt_handler (   name)
Value:
do { \
oc_process_poll(&(name##_interrupt_x)); \
_oc_signal_event_loop(); \
} while (0)

API for setting handlers for interrupts.

Definition at line 1711 of file oc_api.h.

Function Documentation

◆ oc_remove_delayed_callback()

void oc_remove_delayed_callback ( void *  cb_data,
oc_trigger_t  callback 
)

used to cancel a delayed callback

Parameters
[in]cb_datathe user defined context pointer that was passed to the oc_sed_delayed_callback() function
[in]callbackthe delayed callback that is being removed

◆ oc_set_delayed_callback()

void oc_set_delayed_callback ( void *  cb_data,
oc_trigger_t  callback,
uint16_t  seconds 
)

Schedule a callback to be invoked after a set number of seconds.

Parameters
[in]cb_datauser defined context pointer that is passed to the oc_trigger_t callback
[in]callbackthe callback invoked after the set number of seconds
[in]secondsthe number of seconds to wait till the callback is invoked

◆ oc_set_delayed_callback_ms()

void oc_set_delayed_callback_ms ( void *  cb_data,
oc_trigger_t  callback,
uint16_t  miliseconds 
)

Schedule a callback to be invoked after a set number of miliseconds.

Parameters
[in]cb_datauser defined context pointer that is passed to the oc_trigger_t callback
[in]callbackthe callback invoked after the set number of seconds
[in]milisecondsthe number of miliseconds to wait till the callback is invoked