0.3.1
Dual

Typedefs

typedef enum cpu_dual_comm_mode cpu_dual_comm_mode_t
 The communication mode used for the slave CPU.
 
typedef void(* cpu_dual_master_entry_t) (void)
 Callback for master CPU entry point.
 
typedef void(* cpu_dual_slave_entry_t) (void)
 Callback for slave CPU entry point.
 
typedef enum cpu_which cpu_which_t
 ID for which CPU.
 

Enumerations

enum  cpu_dual_comm_mode
 The communication mode used for the slave CPU. More...
 
enum  cpu_which
 ID for which CPU. More...
 

Functions

static void cpu_dual_master_notify (void)
 From the slave CPU, notify the master CPU.
 
static void cpu_dual_slave_notify (void)
 From the master CPU, notify the slave CPU.
 
static void cpu_dual_notification_wait (void)
 From either CPU, wait for a notification from the other CPU.
 
static void * cpu_dual_master_stack_get (void)
 Obtain the top of the master CPU stack.
 
static void * cpu_dual_slave_stack_get (void)
 Obtain the top of the slave CPU stack.
 
void cpu_dual_comm_mode_set (cpu_dual_comm_mode_t mode)
 Select or change the master-slave CPU communication mode.
 
static cpu_which_t cpu_dual_executor_get (void)
 Obtain which of the two CPUs this function was called on.
 

Detailed Description

Description goes here.

Enumeration Type Documentation

◆ cpu_dual_comm_mode

The communication mode used for the slave CPU.

Enumerator
CPU_DUAL_ENTRY_POLLING 

Use polling for master/slave CPU communication.

The slave CPU directly polls for a notification from the master CPU.

CPU_DUAL_ENTRY_ICI 

Use the CPU-FRT ICI interrupt for master/slave CPU communication.

An interrupt is fired when the master CPU sends a notification to the slave CPU.

◆ cpu_which

enum cpu_which

ID for which CPU.

Enumerator
CPU_MASTER 

ID for master CPU.

CPU_SLAVE 

ID for slave CPU.

Function Documentation

◆ cpu_dual_master_notify()

static void cpu_dual_master_notify ( void  )
inlinestatic

From the slave CPU, notify the master CPU.

Calling this function will send a notification to the master CPU, which calls the entry handler set via cpu_dual_master_set.

Nothing happens should the master CPU entry handler be NULL

The effects of multiple calls to this function while the master CPU entry handler is executing may differ depending on the communication mode set by cpu_dual_comm_mode_set.

See also
cpu_dual_master_set
cpu_dual_master_clear

◆ cpu_dual_slave_notify()

static void cpu_dual_slave_notify ( void  )
inlinestatic

From the master CPU, notify the slave CPU.

Calling this function will send a notification to the slave CPU, which calls the entry handler set via cpu_dual_slave_set.

Nothing happens should the slave CPU entry handler be NULL

The effects of multiple calls to this function while the slave CPU entry handler is executing may differ depending on the communication mode set by cpu_dual_comm_mode_set.

See also
cpu_dual_slave_set
cpu_dual_slave_clear

◆ cpu_dual_notification_wait()

static void cpu_dual_notification_wait ( void  )
inlinestatic

From either CPU, wait for a notification from the other CPU.

This function blocks until a notification from the other CPU is received.

◆ cpu_dual_master_stack_get()

static void * cpu_dual_master_stack_get ( void  )
inlinestatic

Obtain the top of the master CPU stack.

The pointer the master CPU can be changed per application via changing the IP_MASTER_STACK_ADDR variable in the application Makefile.

Note
The stack grows downward toward zero. Be sure to also specify an address on a 4-byte boundary.
Returns
A pointer.

◆ cpu_dual_slave_stack_get()

static void * cpu_dual_slave_stack_get ( void  )
inlinestatic

Obtain the top of the slave CPU stack.

The pointer the slave CPU can be changed per application via changing the IP_SLAVE_STACK_ADDR variable in the application Makefile.

Note
The stack grows downward toward zero. Be sure to also specify an address on a 4-byte boundary.
Returns
A pointer.

◆ cpu_dual_comm_mode_set()

void cpu_dual_comm_mode_set ( cpu_dual_comm_mode_t  mode)

Select or change the master-slave CPU communication mode.

Upon changing the communication mode, the slave CPU is completely re-initialized.

Parameters
modeThe communication mode.

◆ cpu_dual_executor_get()

static cpu_which_t cpu_dual_executor_get ( void  )
inlinestatic

Obtain which of the two CPUs this function was called on.

Returns
Which CPU.