![]() |
roneos
Operating System for the r-one robot
|
SPI commands for the MSP430. More...
Go to the source code of this file.
Functions | |
void | msp430Init (void) |
Initialize MSP430. More... | |
void | msp430InterruptEnable (void) |
Enable MSP430 interrupt. More... | |
void | msp430InterruptDisable (void) |
Disable MSP430 interrupt. More... | |
void | msp430SystemCommandBuildMessage (uint8 *msg) |
Build a command for MSP430 message and reset command. More... | |
void | msp430SetModeBuildMessage (uint8 *data) |
Set the mode for MSP430 message. More... | |
void | msp430SystemShutdownCommand (void) |
Set the command to shutdown. More... | |
void | msp430SystemReprogramCommand (void) |
Set the next command to the MSP430 to be to enter the boot-loader. More... | |
uint8 | msp430SystemCommandMessageGet (void) |
uint8 | msp430SystemGetCommandMessage (void) |
Get the command. More... | |
boolean | msp430GetCommsValid (void) |
Gets systemMSP430CommsValid. More... | |
void | msp430SetCommsValid (boolean newCommsValid) |
Sets systemMSP430CommsValid. More... | |
SPI commands for the MSP430.
boolean msp430GetCommsValid | ( | void | ) |
Gets systemMSP430CommsValid.
void msp430Init | ( | void | ) |
Initialize MSP430.
use 400us interrupt for SPI comms. This lets us xmit our 24-byte message in 9.6 ms. At the end, we use a 32us interrupt for SPI comms. This is about as fast as the MSP430 can read bytes from the buffer. This double byte signals the end of the message for synchronizing the two processors
void msp430InterruptDisable | ( | void | ) |
Disable MSP430 interrupt.
void msp430InterruptEnable | ( | void | ) |
Enable MSP430 interrupt.
void msp430SetCommsValid | ( | boolean | newCommsValid) |
Sets systemMSP430CommsValid.
newCommsValid | - new boolean value to set systemMSP430CommsValid |
void msp430SetModeBuildMessage | ( | uint8 * | data) |
Set the mode for MSP430 message.
data | -sets to MSP430_MODE_C |
void msp430SystemCommandBuildMessage | ( | uint8 * | msg) |
Build a command for MSP430 message and reset command.
Used to build the command for the actual command sent to the MSP430 Reset the command to normal mode
uint8 msp430SystemCommandMessageGet | ( | void | ) |
uint8 msp430SystemGetCommandMessage | ( | void | ) |
Get the command.
void msp430SystemReprogramCommand | ( | void | ) |
Set the next command to the MSP430 to be to enter the boot-loader.
void msp430SystemShutdownCommand | ( | void | ) |
Set the command to shutdown.