Bar Logo 3.8/7.6 kw Totem pole Demonstration Application (Part-No. (not specified))
 
Content
     
Loading...
Searching...
No Matches

This is the generated driver interface file for the MAIN_CORE driver. More...

+ Collaboration diagram for MSI-Main Driver:

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...
 

Macros

#define MSIInterface_Initialize   MAIN_CORE_Initialize
 This macro defines the Custom Name for MAIN_CORE_Initialize API.
 
#define MSIInterface_Deinitialize   MAIN_CORE_Deinitialize
 This macro defines the Custom Name for MAIN_CORE_Deinitialize API.
 
#define MSIInterface_InterruptRequestGenerate   MAIN_CORE_InterruptRequestGenerate
 This macro defines the Custom Name for MAIN_CORE_InterruptRequestGenerate API.
 
#define MSIInterface_IsInterruptRequestAcknowledged   MAIN_CORE_IsInterruptRequestAcknowledged
 This macro defines the Custom Name for MAIN_CORE_IsInterruptRequestAcknowledged API.
 
#define MSIInterface_InterruptRequestComplete   MAIN_CORE_InterruptRequestComplete
 This macro defines the Custom Name for MAIN_CORE_InterruptRequestComplete API.
 
#define MSIInterface_IsInterruptRequested   MAIN_CORE_IsInterruptRequested
 This macro defines the Custom Name for MAIN_CORE_IsInterruptRequested API.
 
#define MSIInterface_InterruptRequestAcknowledge   MAIN_CORE_InterruptRequestAcknowledge
 This macro defines the Custom Name for MAIN_CORE_InterruptRequestAcknowledge API.
 
#define MSIInterface_InterruptRequestAcknowledgeComplete   MAIN_CORE_InterruptRequestAcknowledgeComplete
 This macro defines the Custom Name for MAIN_CORE_InterruptRequestAcknowledgeComplete API.
 
#define MSIInterface_SystemStatusGet   MAIN_CORE_SystemStatusGet
 This macro defines the Custom Name for MAIN_CORE_SystemStatusGet API.
 
#define MSIInterface_FIFORead   MAIN_CORE_FIFORead
 This macro defines the Custom Name for MAIN_CORE_FIFORead API.
 
#define MSIInterface_FIFOWrite   MAIN_CORE_FIFOWrite
 This macro defines the Custom Name for MAIN_CORE_FIFOWrite API.
 
#define MSIInterface_FIFOReadIsFull   MAIN_CORE_FIFOReadIsFull
 This macro defines the Custom Name for MAIN_CORE_FIFOReadIsFull API.
 
#define MSIInterface_FIFOReadIsEmpty   MAIN_CORE_FIFOReadIsEmpty
 This macro defines the Custom Name for MAIN_CORE_FIFOReadIsEmpty API.
 
#define MSIInterface_FIFOWriteIsFull   MAIN_CORE_FIFOWriteIsFull
 This macro defines the Custom Name for MAIN_CORE_FIFOWriteIsFull API.
 
#define MSIInterface_FIFOWriteIsEmpty   MAIN_CORE_FIFOWriteIsEmpty
 This macro defines the Custom Name for MAIN_CORE_FIFOWriteIsEmpty API.
 
#define MSIInterface_ProtocolWrite   MAIN_CORE_ProtocolWrite
 This macro defines the Custom Name for MAIN_CORE_ProtocolWrite API.
 
#define MSIInterface_ProtocolRead   MAIN_CORE_ProtocolRead
 This macro defines the Custom Name for MAIN_CORE_ProtocolRead API.
 
#define MSIInterface_ProtocolIsFull   MAIN_CORE_ProtocolIsFull
 This macro defines the Custom Name for MAIN_CORE_ProtocolIsFull API.
 
#define MSIInterface_ProtocolIsEmpty   MAIN_CORE_ProtocolIsEmpty
 This macro defines the Custom Name for MAIN_CORE_ProtocolIsEmpty API.
 

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.
 

Detailed Description

8

Macro Definition Documentation

◆ MSIInterface_Deinitialize

#define MSIInterface_Deinitialize   MAIN_CORE_Deinitialize

Definition at line 53 of file main_core.h.

◆ MSIInterface_FIFORead

#define MSIInterface_FIFORead   MAIN_CORE_FIFORead

Definition at line 101 of file main_core.h.

◆ MSIInterface_FIFOReadIsEmpty

#define MSIInterface_FIFOReadIsEmpty   MAIN_CORE_FIFOReadIsEmpty

Definition at line 119 of file main_core.h.

◆ MSIInterface_FIFOReadIsFull

#define MSIInterface_FIFOReadIsFull   MAIN_CORE_FIFOReadIsFull

Definition at line 113 of file main_core.h.

◆ MSIInterface_FIFOWrite

#define MSIInterface_FIFOWrite   MAIN_CORE_FIFOWrite

Definition at line 107 of file main_core.h.

◆ MSIInterface_FIFOWriteIsEmpty

#define MSIInterface_FIFOWriteIsEmpty   MAIN_CORE_FIFOWriteIsEmpty

Definition at line 131 of file main_core.h.

◆ MSIInterface_FIFOWriteIsFull

#define MSIInterface_FIFOWriteIsFull   MAIN_CORE_FIFOWriteIsFull

Definition at line 125 of file main_core.h.

◆ MSIInterface_Initialize

#define MSIInterface_Initialize   MAIN_CORE_Initialize

Definition at line 47 of file main_core.h.

◆ MSIInterface_InterruptRequestAcknowledge

#define MSIInterface_InterruptRequestAcknowledge   MAIN_CORE_InterruptRequestAcknowledge

Definition at line 83 of file main_core.h.

◆ MSIInterface_InterruptRequestAcknowledgeComplete

#define MSIInterface_InterruptRequestAcknowledgeComplete   MAIN_CORE_InterruptRequestAcknowledgeComplete

Definition at line 89 of file main_core.h.

◆ MSIInterface_InterruptRequestComplete

#define MSIInterface_InterruptRequestComplete   MAIN_CORE_InterruptRequestComplete

Definition at line 71 of file main_core.h.

◆ MSIInterface_InterruptRequestGenerate

#define MSIInterface_InterruptRequestGenerate   MAIN_CORE_InterruptRequestGenerate

Definition at line 59 of file main_core.h.

◆ MSIInterface_IsInterruptRequestAcknowledged

#define MSIInterface_IsInterruptRequestAcknowledged   MAIN_CORE_IsInterruptRequestAcknowledged

Definition at line 65 of file main_core.h.

◆ MSIInterface_IsInterruptRequested

#define MSIInterface_IsInterruptRequested   MAIN_CORE_IsInterruptRequested

Definition at line 77 of file main_core.h.

◆ MSIInterface_ProtocolIsEmpty

#define MSIInterface_ProtocolIsEmpty   MAIN_CORE_ProtocolIsEmpty

Definition at line 155 of file main_core.h.

◆ MSIInterface_ProtocolIsFull

#define MSIInterface_ProtocolIsFull   MAIN_CORE_ProtocolIsFull

Definition at line 149 of file main_core.h.

◆ MSIInterface_ProtocolRead

#define MSIInterface_ProtocolRead   MAIN_CORE_ProtocolRead

Definition at line 143 of file main_core.h.

◆ MSIInterface_ProtocolWrite

#define MSIInterface_ProtocolWrite   MAIN_CORE_ProtocolWrite

Definition at line 137 of file main_core.h.

◆ MSIInterface_SystemStatusGet

#define MSIInterface_SystemStatusGet   MAIN_CORE_SystemStatusGet

Definition at line 95 of file main_core.h.

Enumeration Type Documentation

◆ MAIN_CORE_PROTOCOL_SIZE

Note
Size not required for the driver but will be required for application to create the buffers
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.

◆ MAIN_CORE_PROTOCOLS

Note
These Protocols are required to create the buffer by the application
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.

◆ MAIN_CORE_SYSTEM_STATUS

Enumerator
MAIN_CORE_SYSTEM_STATUS_NOT_IN_LOW_POWER_MODE 

main_core status is in Low power mode

MAIN_CORE_SYSTEM_STATUS_SLEEP_MODE 

main_core status is in Sleep mode

MAIN_CORE_SYSTEM_STATUS_IDLE_MODE 

main_core status is in Idle mode

MAIN_CORE_SYSTEM_STATUS_RUNNING_STATE 

main_core status is in Running state

MAIN_CORE_SYSTEM_STATUS_IN_RESET_STATE 

main_core status is in Reset state

Definition at line 27 of file main_core_types.h.

Function Documentation

◆ MAIN_CORE_Deinitialize()

void MAIN_CORE_Deinitialize ( void )
Parameters
none
Returns
none

Definition at line 71 of file main_core.c.

◆ MAIN_CORE_FIFORead()

uint16_t MAIN_CORE_FIFORead ( uint16_t * pData,
uint16_t wordCount )
Parameters
[in]*pData- Pointer to an array to store the read data
[in]wordCount- Number of words to be read.
Returns
Number of words read.

Definition at line 133 of file main_core.c.

+ Here is the call graph for this function:

◆ MAIN_CORE_FIFOReadIsEmpty()

static bool MAIN_CORE_FIFOReadIsEmpty ( void )
inlinestatic
Returns
true - Read FIFO is Empty
false - Read FIFO is not Empty (Read FIFO contains valid data not yet read by the Main core)

Definition at line 275 of file main_core.h.

+ Here is the caller graph for this function:

◆ MAIN_CORE_FIFOReadIsFull()

static bool MAIN_CORE_FIFOReadIsFull ( void )
inlinestatic
Returns
true - Read FIFO is full
false - Read FIFO is not full

Definition at line 262 of file main_core.h.

◆ MAIN_CORE_FIFOWrite()

uint16_t MAIN_CORE_FIFOWrite ( uint16_t * pData,
uint16_t wordCount )
Precondition
MAIN_CORE_Initialize() should be called before calling this routine.
Parameters
[in]*pData- Pointer to an array which has data for transmission.
[in]wordCount- Number of words to be transfer.
Returns
Number of words transferred.

Definition at line 153 of file main_core.c.

+ Here is the call graph for this function:

◆ MAIN_CORE_FIFOWriteIsEmpty()

static bool MAIN_CORE_FIFOWriteIsEmpty ( void )
inlinestatic
Returns
true - Write FIFO is Empty
false - Write FIFO is not Empty (Write FIFO contains valid data not yet read by the Secondary core)

Definition at line 301 of file main_core.h.

◆ MAIN_CORE_FIFOWriteIsFull()

static bool MAIN_CORE_FIFOWriteIsFull ( void )
inlinestatic
Returns
true - Write FIFO is full
false - Write FIFO is not full

Definition at line 288 of file main_core.h.

+ Here is the caller graph for this function:

◆ MAIN_CORE_Initialize()

void MAIN_CORE_Initialize ( void )
Parameters
none
Returns
none

Definition at line 63 of file main_core.c.

+ Here is the caller graph for this function:

◆ MAIN_CORE_InterruptRequestAcknowledge()

void MAIN_CORE_InterruptRequestAcknowledge ( void )
Parameters
none
Returns
none

Definition at line 98 of file main_core.c.

◆ MAIN_CORE_InterruptRequestAcknowledgeComplete()

void MAIN_CORE_InterruptRequestAcknowledgeComplete ( void )
Parameters
none
Returns
none

Definition at line 103 of file main_core.c.

◆ MAIN_CORE_InterruptRequestComplete()

void MAIN_CORE_InterruptRequestComplete ( void )
Parameters
none
Returns
none

Definition at line 89 of file main_core.c.

◆ MAIN_CORE_InterruptRequestGenerate()

void MAIN_CORE_InterruptRequestGenerate ( void )
Parameters
none
Returns
none

Definition at line 78 of file main_core.c.

◆ MAIN_CORE_IsInterruptRequestAcknowledged()

bool MAIN_CORE_IsInterruptRequestAcknowledged ( void )
Parameters
none
Returns
True - when MAIN_CORE has acknowledged Main MSI interrupt request.
False - when MAIN_CORE has not acknowledged Main MSI interrupt request.

Definition at line 83 of file main_core.c.

◆ MAIN_CORE_IsInterruptRequested()

bool MAIN_CORE_IsInterruptRequested ( void )
Parameters
none
Returns
True - when MAIN_CORE has issued interrupt to Secondary Core.
False - when MAIN_CORE has not issued interrupt to Secondary Core.

Definition at line 94 of file main_core.c.

◆ MAIN_CORE_ProtocolIsEmpty()

static bool MAIN_CORE_ProtocolIsEmpty ( enum MAIN_CORE_PROTOCOLS protocolName)
inlinestatic
Parameters
[in]protocolName- Selected protocol
Returns
true - Protocol is empty
false - Protocol is full

Definition at line 362 of file main_core.h.

◆ MAIN_CORE_ProtocolIsFull()

static bool MAIN_CORE_ProtocolIsFull ( enum MAIN_CORE_PROTOCOLS protocolName)
inlinestatic
Parameters
[in]protocolName- Selected protocol
Returns
true - Protocol is full
false - Protocol is empty

Definition at line 335 of file main_core.h.

+ Here is the caller graph for this function:

◆ MAIN_CORE_ProtocolRead()

bool MAIN_CORE_ProtocolRead ( enum MAIN_CORE_PROTOCOLS protocolName,
uint16_t * pData )
Parameters
[in]protocolName- Selected protocol
[in]*pData- Pointer to a structure to store the read data
Returns
true - successful read
false - unsuccessful read

Definition at line 184 of file main_core.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MAIN_CORE_ProtocolWrite()

bool MAIN_CORE_ProtocolWrite ( enum MAIN_CORE_PROTOCOLS protocolName,
uint16_t * pData )
Parameters
[in]protocolName- Selected protocol
[in]*pData- Pointer to a structure which has data for transmission.
Returns
true - successful write
false - unsuccessful write

Definition at line 173 of file main_core.c.

◆ MAIN_CORE_SystemStatusGet()

enum MAIN_CORE_SYSTEM_STATUS MAIN_CORE_SystemStatusGet ( void )
Parameters
none
Returns
MAIN_CORE_SYSTEM_STATUS: Enum which provides the status of MAIN_CORE.

Definition at line 108 of file main_core.c.

Variable Documentation

◆ MSIInterface

const struct MAIN_CORE_INTERFACE MSIInterface
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.