This is the generated driver interface file for the MAIN_CORE driver. More...
Files | |
file | main_core.h |
This is the generated driver header file for the MAIN_CORE driver. | |
file | main_core_types.h |
This is the generated driver types header file for the MAIN_CORE driver. | |
file | main_core.c |
This is the generated driver source file for MAIN_CORE driver. | |
Data Structures | |
struct | MAIN_CORE_INTERFACE |
Structure containing the function pointers of MAIN_CORE driver. More... | |
Enumerations | |
enum | MAIN_CORE_SYSTEM_STATUS { MAIN_CORE_SYSTEM_STATUS_NOT_IN_LOW_POWER_MODE = 0 , MAIN_CORE_SYSTEM_STATUS_SLEEP_MODE = 1 , MAIN_CORE_SYSTEM_STATUS_IDLE_MODE = 2 , MAIN_CORE_SYSTEM_STATUS_RUNNING_STATE = 3 , MAIN_CORE_SYSTEM_STATUS_IN_RESET_STATE = 4 } |
Defines the status enumeration for main_core. More... | |
enum | MAIN_CORE_PROTOCOLS { MSI1_ProtocolA , MSI1_ProtocolB } |
Defines the list of Protocols configured for MAIN_CORE_driver. More... | |
enum | MAIN_CORE_PROTOCOL_SIZE { MSI1_ProtocolA_SIZE = 5 , MSI1_ProtocolB_SIZE = 10 } |
Defines the size for Protocols. More... | |
Functions | |
void | MAIN_CORE_Initialize (void) |
This routine initializes the MSI driver. This routine must be called before any other MSI routine is called. This routine should only be called once during system initialization. | |
void | MAIN_CORE_Deinitialize (void) |
Deinitializes MAIN_CORE to POR values. | |
void | MAIN_CORE_InterruptRequestGenerate (void) |
This routine generates interrupt to MAIN_CORE. | |
bool | MAIN_CORE_IsInterruptRequestAcknowledged (void) |
This routine returns the status of interrupt request acknowledge from the MAIN_CORE. | |
void | MAIN_CORE_InterruptRequestComplete (void) |
This routine clears interrupt to MAIN_CORE. | |
bool | MAIN_CORE_IsInterruptRequested (void) |
This routine returns the status of interrupt request from the MAIN_CORE. | |
void | MAIN_CORE_InterruptRequestAcknowledge (void) |
This routine acknowledges interrupt received from Main MSI. | |
void | MAIN_CORE_InterruptRequestAcknowledgeComplete (void) |
This routine clears acknowledge for interrupt received from Main MSI. | |
enum MAIN_CORE_SYSTEM_STATUS | MAIN_CORE_SystemStatusGet (void) |
This routine returns Main system status. | |
uint16_t | MAIN_CORE_FIFORead (uint16_t *pData, uint16_t wordCount) |
This routine reads FIFO data sent from the Main Core. | |
uint16_t | MAIN_CORE_FIFOWrite (uint16_t *pData, uint16_t wordCount) |
This routine transfers FIFO data to Main Core. | |
static bool | MAIN_CORE_FIFOReadIsFull (void) |
This inline function checks whether the status of Read FIFO is full. last write by Secondary core to Read FIFO (RFDATA) was into the last free location. | |
static bool | MAIN_CORE_FIFOReadIsEmpty (void) |
This inline function checks whether the status of Read FIFO is Empty. Returns true if last read by Main core from Read FIFO (RFDATA) emptied the FIFO of all valid data or FIFO is disabled (and initialized to the empty state) | |
static bool | MAIN_CORE_FIFOWriteIsFull (void) |
This inline function checks whether the status of Write FIFO is Full. Returns true if last write by Main core to Write FIFO (WFDATA) was into the last free location. | |
static bool | MAIN_CORE_FIFOWriteIsEmpty (void) |
This inline function checks whether the status of Write FIFO is Empty. Returns true if last write by Main to Write FIFO (WFDATA) was into the last free location. | |
bool | MAIN_CORE_ProtocolWrite (enum MAIN_CORE_PROTOCOLS protocolName, uint16_t *pData) |
This routine writes data to mailbox. | |
bool | MAIN_CORE_ProtocolRead (enum MAIN_CORE_PROTOCOLS protocolName, uint16_t *pData) |
This routine reads data from mailbox. | |
static bool | MAIN_CORE_ProtocolIsFull (enum MAIN_CORE_PROTOCOLS protocolName) |
This inline function checks whether mailbox is full. Returns true if New data are ready to read. Returns false when No data are available to be read by Main core. | |
static bool | MAIN_CORE_ProtocolIsEmpty (enum MAIN_CORE_PROTOCOLS protocolName) |
This inline function checks whether mailbox is empty. Returns true if Protocol is empty indicating mailbox is ready to write by Main core. returns false indicating write operation cannot be performed by Main core. | |
Variables | |
const struct MAIN_CORE_INTERFACE | MSIInterface |
Structure object of type MAIN_CORE_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Main_Core can be changed by the user in the MAIN_CORE user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability. | |
8
#define MSIInterface_Deinitialize MAIN_CORE_Deinitialize |
Definition at line 53 of file main_core.h.
#define MSIInterface_FIFORead MAIN_CORE_FIFORead |
Definition at line 101 of file main_core.h.
#define MSIInterface_FIFOReadIsEmpty MAIN_CORE_FIFOReadIsEmpty |
Definition at line 119 of file main_core.h.
#define MSIInterface_FIFOReadIsFull MAIN_CORE_FIFOReadIsFull |
Definition at line 113 of file main_core.h.
#define MSIInterface_FIFOWrite MAIN_CORE_FIFOWrite |
Definition at line 107 of file main_core.h.
#define MSIInterface_FIFOWriteIsEmpty MAIN_CORE_FIFOWriteIsEmpty |
Definition at line 131 of file main_core.h.
#define MSIInterface_FIFOWriteIsFull MAIN_CORE_FIFOWriteIsFull |
Definition at line 125 of file main_core.h.
#define MSIInterface_Initialize MAIN_CORE_Initialize |
Definition at line 47 of file main_core.h.
#define MSIInterface_InterruptRequestAcknowledge MAIN_CORE_InterruptRequestAcknowledge |
Definition at line 83 of file main_core.h.
#define MSIInterface_InterruptRequestAcknowledgeComplete MAIN_CORE_InterruptRequestAcknowledgeComplete |
Definition at line 89 of file main_core.h.
#define MSIInterface_InterruptRequestComplete MAIN_CORE_InterruptRequestComplete |
Definition at line 71 of file main_core.h.
#define MSIInterface_InterruptRequestGenerate MAIN_CORE_InterruptRequestGenerate |
Definition at line 59 of file main_core.h.
#define MSIInterface_IsInterruptRequestAcknowledged MAIN_CORE_IsInterruptRequestAcknowledged |
Definition at line 65 of file main_core.h.
#define MSIInterface_IsInterruptRequested MAIN_CORE_IsInterruptRequested |
Definition at line 77 of file main_core.h.
#define MSIInterface_ProtocolIsEmpty MAIN_CORE_ProtocolIsEmpty |
Definition at line 155 of file main_core.h.
#define MSIInterface_ProtocolIsFull MAIN_CORE_ProtocolIsFull |
Definition at line 149 of file main_core.h.
#define MSIInterface_ProtocolRead MAIN_CORE_ProtocolRead |
Definition at line 143 of file main_core.h.
#define MSIInterface_ProtocolWrite MAIN_CORE_ProtocolWrite |
Definition at line 137 of file main_core.h.
#define MSIInterface_SystemStatusGet MAIN_CORE_SystemStatusGet |
Definition at line 95 of file main_core.h.
Enumerator | |
---|---|
MSI1_ProtocolA_SIZE | Size of ProtocolA in 16-bit word |
MSI1_ProtocolB_SIZE | Size of ProtocolB in 16-bit word |
Definition at line 54 of file main_core_types.h.
enum MAIN_CORE_PROTOCOLS |
Enumerator | |
---|---|
MSI1_ProtocolA | Custom-name of ProtocolA for read operation only |
MSI1_ProtocolB | Custom-name of ProtocolB for read operation only |
Definition at line 42 of file main_core_types.h.
Definition at line 27 of file main_core_types.h.
void MAIN_CORE_Deinitialize | ( | void | ) |
uint16_t MAIN_CORE_FIFORead | ( | uint16_t * | pData, |
uint16_t | wordCount ) |
[in] | *pData | - Pointer to an array to store the read data |
[in] | wordCount | - Number of words to be read. |
Definition at line 133 of file main_core.c.
|
inlinestatic |
Definition at line 275 of file main_core.h.
|
inlinestatic |
Definition at line 262 of file main_core.h.
uint16_t MAIN_CORE_FIFOWrite | ( | uint16_t * | pData, |
uint16_t | wordCount ) |
[in] | *pData | - Pointer to an array which has data for transmission. |
[in] | wordCount | - Number of words to be transfer. |
Definition at line 153 of file main_core.c.
|
inlinestatic |
Definition at line 301 of file main_core.h.
|
inlinestatic |
Definition at line 288 of file main_core.h.
void MAIN_CORE_Initialize | ( | void | ) |
none |
Definition at line 63 of file main_core.c.
void MAIN_CORE_InterruptRequestAcknowledge | ( | void | ) |
void MAIN_CORE_InterruptRequestAcknowledgeComplete | ( | void | ) |
void MAIN_CORE_InterruptRequestComplete | ( | void | ) |
void MAIN_CORE_InterruptRequestGenerate | ( | void | ) |
bool MAIN_CORE_IsInterruptRequestAcknowledged | ( | void | ) |
none |
Definition at line 83 of file main_core.c.
bool MAIN_CORE_IsInterruptRequested | ( | void | ) |
none |
Definition at line 94 of file main_core.c.
|
inlinestatic |
[in] | protocolName | - Selected protocol |
Definition at line 362 of file main_core.h.
|
inlinestatic |
[in] | protocolName | - Selected protocol |
Definition at line 335 of file main_core.h.
bool MAIN_CORE_ProtocolRead | ( | enum MAIN_CORE_PROTOCOLS | protocolName, |
uint16_t * | pData ) |
[in] | protocolName | - Selected protocol |
[in] | *pData | - Pointer to a structure to store the read data |
Definition at line 184 of file main_core.c.
bool MAIN_CORE_ProtocolWrite | ( | enum MAIN_CORE_PROTOCOLS | protocolName, |
uint16_t * | pData ) |
[in] | protocolName | - Selected protocol |
[in] | *pData | - Pointer to a structure which has data for transmission. |
Definition at line 173 of file main_core.c.
enum MAIN_CORE_SYSTEM_STATUS MAIN_CORE_SystemStatusGet | ( | void | ) |
none |
Definition at line 108 of file main_core.c.
|
extern |
Structure object of type MAIN_CORE_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. Main_Core can be changed by the user in the MAIN_CORE user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.
Definition at line 155 of file sec_core1.c.