Main Page | Modules | Related Pages | Examples

Actions


Detailed Description

Actions are used by kernel to inform application that some situation or event occured and is up to the application to react. Optionally kernel may append some data related to the given action.

Actions could be divided by several criteria:

The basic actions are related to application life cycle - they are invoked when e.g. the application is loaded into memory, when there is time for the application to initialize itself or when the application is unloaded from memory and should clean up resources it used.

app_life.png

Application lifecycle

Non registerable lifecycle related actions:

Defines

Typedefs

Functions


Define Documentation

#define ACTION_APP_INIT
 

Invoked for application to initialize its internals.

#define ACTION_APP_REGISTER
 

Invoked for application registration.

Called only once when the application is loaded into the memory. By registration we mean one time process, when application can e.g. allocate EEPROM structures.

#define ACTION_APP_UNREGISTER
 

Invoked when application is unloaded from memory.

Application should clear the resources it used (EEPROM).

#define ACTION_SIG_2WIRE_SERIAL
 

Register if application should receive given IRQ.

#define ACTION_SIG_ADC
 

Register if application should receive given IRQ.

#define ACTION_SIG_COMPARATOR
 

Register if application should receive given IRQ.

#define ACTION_SIG_EEPROM_READY
 

Register if application should receive given IRQ.

#define ACTION_SIG_INPUT_CAPTURE1
 

Register if application should receive given IRQ.

#define ACTION_SIG_INPUT_CAPTURE3
 

Register if application should receive given IRQ.

#define ACTION_SIG_INTERRUPT0
 

Register if application should receive given IRQ.

#define ACTION_SIG_INTERRUPT1
 

Register if application should receive given IRQ.

#define ACTION_SIG_INTERRUPT2
 

Register if application should receive given IRQ.

#define ACTION_SIG_INTERRUPT3
 

Register if application should receive given IRQ.

#define ACTION_SIG_INTERRUPT4
 

Register if application should receive given IRQ.

#define ACTION_SIG_INTERRUPT5
 

Register if application should receive given IRQ.

#define ACTION_SIG_INTERRUPT6
 

Register if application should receive given IRQ.

#define ACTION_SIG_INTERRUPT7
 

Register if application should receive given IRQ.

#define ACTION_SIG_OUTPUT_COMPARE0
 

Register if application should receive given IRQ.

#define ACTION_SIG_OUTPUT_COMPARE1A
 

Register if application should receive given IRQ.

#define ACTION_SIG_OUTPUT_COMPARE1B
 

Register if application should receive given IRQ.

#define ACTION_SIG_OUTPUT_COMPARE1C
 

Register if application should receive given IRQ.

#define ACTION_SIG_OUTPUT_COMPARE2
 

Register if application should receive given IRQ.

#define ACTION_SIG_OUTPUT_COMPARE3A
 

Register if application should receive given IRQ.

#define ACTION_SIG_OUTPUT_COMPARE3B
 

Register if application should receive given IRQ.

#define ACTION_SIG_OUTPUT_COMPARE3C
 

Register if application should receive given IRQ.

#define ACTION_SIG_OVERFLOW0
 

Register if application should receive given IRQ.

#define ACTION_SIG_OVERFLOW1
 

Register if application should receive given IRQ.

#define ACTION_SIG_OVERFLOW2
 

Register if application should receive given IRQ.

#define ACTION_SIG_OVERFLOW3
 

Register if application should receive given IRQ.

#define ACTION_SIG_SPI
 

Register if application should receive given IRQ.

#define ACTION_SIG_SPM_READY
 

Register if application should receive given IRQ.

#define ACTION_SIG_UART0_DATA
 

Register if application should receive given IRQ.

#define ACTION_SIG_UART0_RECV
 

Register if application should receive given IRQ.

#define ACTION_SIG_UART0_TRANS
 

Register if application should receive given IRQ.

#define ACTION_SIG_UART1_DATA
 

Register if application should receive given IRQ.

#define ACTION_SIG_UART1_RECV
 

Register if application should receive given IRQ.

#define ACTION_SIG_UART1_TRANS
 

Register if application should receive given IRQ.


Typedef Documentation

typedef void( t_turbo_main)(u8 action, void *data)
 

Turbo handler type definition.


Function Documentation

u8 reg_action u8  action  ) 
 

Register action.

Parameters:
action 
Returns:
#NO_ERROR or #ERR_RESOURCE_BUSY (some actions can be registered by only one appliacation).
See also:
unreg_action()
Examples:
sim/module-src/sim.c, and turboadapter/module-src/turboadapter.c.

void unreg_action u8  action  ) 
 

Unregister action.

Parameters:
action 
See also:
reg_action()


Copyright © 2004 BLADOX
Turbo Programmer version 2.0