You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
771 B

#include "IdiBusSlave.h"
#include "IDIBUS_IMPL.h"
//Structure that holds module's data
XXX_NAME_channel_data_t XXX_NAME_channels_data[IDIBUS_XXX_NAME_CH_NUM];
static void custom_init()
{
}
static void custom_shutdown()
{
}
static void custom_freeze()
{
}
static void custom_resume()
{
}
void SlaveInit()//Intr is ON
{
//Hardware init
//...
//You can register custom c_Init or c_Shutdown here via IdiBus_register_xxx
IdiBus_register_init(custom_init);
IdiBus_register_shutdown(custom_shutdown);
IdiBus_register_freeze(custom_freeze);
IdiBus_register_resume(custom_resume);
}
void SlaveLoop()
{
//Read any data that can change in channels data
//...
//Do some app logic
//..
//Update channel data
//Exit
}