![]() |
roneos
Operating System for the r-one robot
|
Go to the source code of this file.
Functions | |
void | _systemPrintStartup (char *fileName) |
Flag that the heartbeat task needs to print the info once comms are valid. More... | |
void | _error (char *fileName, int lineNumber, char *errMsg) |
Create log of messages and make error noise. More... | |
void | systemInit (void) |
Initializes the r-one hardware. More... | |
void | systemHeartbeatTask (void *parameters) |
Background tasks performed during each heartbeat. More... | |
void | systemShutdown (void) |
Turn off the main power supply. More... | |
void | systemBootloader (void) |
jumps to boot loader More... | |
void | systemPrintMemUsage (void) |
Print the heap and stack usage. More... | |
uint32 | systemUSBConnected (void) |
Check USBlevel. More... | |
void | systemIDInit (void) |
Gets the robot ID. More... | |
void | systemDelay (uint32 delay) |
This is a delay function to be used for simple tests. More... | |
void | setMSP430SPIOperationState (uint8 state) |
Sets Operational state acodring to paramter. More... | |
void | systemBatteryVoltageUpdate (uint8 val) |
float | systemBatteryVoltageGet (void) |
Retrieve the battery voltage. The voltage will be over 10. More... | |
void | systemBatteryVoltageGet2 (uint8 *onesPtr, uint8 *tenthsPtr) |
Retrieve the battery voltage and place ones and tenths values in appropriate spaces. More... | |
void | systemUSBVoltageUpdate (uint8 val) |
Update the USB voltage. More... | |
uint8 | systemUSBVoltageGet (void) |
Get the USB voltage. More... | |
void | systemPowerButtonUpdate (uint8 val) |
Update the power button. More... | |
uint8 | systemPowerButtonGet (void) |
Get the power button value. More... | |
void | systemMSPVersionUpdate (uint8 val) |
Update the MSP version. If update is same as prevVal and is not zero it will update mspVersion. More... | |
uint8 | systemMSPVersionGet (void) |
Get the MSP version. More... | |
void _error | ( | char * | fileName, |
int | lineNumber, | ||
char * | errMsg | ||
) |
Create log of messages and make error noise.
Takes new error message and adds it to a log of error messages. Makes error noise.
fileName | name of file |
lineNumber | line number |
errMsg | error message that user specifies |
void _systemPrintStartup | ( | char * | fileName) |
Flag that the heartbeat task needs to print the info once comms are valid.
fileName | - char pointer of file name |
void setMSP430SPIOperationState | ( | uint8 | state) |
Sets Operational state acodring to paramter.
state | Operational state that needs to be set eg. MSP430_SPI_NORMAL_OPERATION |
float systemBatteryVoltageGet | ( | void | ) |
Retrieve the battery voltage. The voltage will be over 10.
void systemBatteryVoltageGet2 | ( | uint8 * | onesPtr, |
uint8 * | tenthsPtr | ||
) |
Retrieve the battery voltage and place ones and tenths values in appropriate spaces.
onesPtr | the pointer to where the ones value of the voltage will be stored |
tenthsPtr | the pointer to where the tenths value of the voltage will be stored |
void systemBatteryVoltageUpdate | ( | uint8 | val) |
Update the battery voltage.
val | the new voltage value |
void systemBootloader | ( | void | ) |
jumps to boot loader
void systemDelay | ( | uint32 | delay) |
This is a delay function to be used for simple tests.
delay | the amount of time to delay the system |
void systemHeartbeatTask | ( | void * | parameters) |
Background tasks performed during each heartbeat.
Each heartbeat = every 16 milliseconds. Updates blinky, IRBeacon, leds, accelerometer, motor velocity, pose, and motor command timer.
void systemIDInit | ( | void | ) |
Gets the robot ID.
roneID is assigned robot ID. If robot is uninitialized, roneID is DEFAULT_RONEID. The ID is set using LM Flash. The format for the ID is: 00-50-C2-00-01-XX where XX is the robotID
void systemInit | ( | void | ) |
Initializes the r-one hardware.
Initalizes roneID, charger, blinky, buttons, IRBeacon, SPI, LED, and serial. the heartbeat light blinks three times after the initializations are done. Initializes encoder, light sensor, motor, gyro, accelerometer, IR_comms, radio, ad cfprintf, sd card. Prints out the date, time, and roneID after everything is initialized. Rone starts heartbeat after this initialization.
uint8 systemMSPVersionGet | ( | void | ) |
Get the MSP version.
void systemMSPVersionUpdate | ( | uint8 | val) |
Update the MSP version. If update is same as prevVal and is not zero it will update mspVersion.
uint8 systemPowerButtonGet | ( | void | ) |
Get the power button value.
void systemPowerButtonUpdate | ( | uint8 | val) |
Update the power button.
val | the new power button value |
void systemPrintMemUsage | ( | void | ) |
Print the heap and stack usage.
void systemShutdown | ( | void | ) |
Turn off the main power supply.
Shuts down everything in the Rone robot. This processor is turned off, the MSP430 will be put into LPM4 and all LEDs and motors are also turned off, along with the main power supply.
uint32 systemUSBConnected | ( | void | ) |
Check USBlevel.
Unfinished, and returns FALSE unconditionally.
uint8 systemUSBVoltageGet | ( | void | ) |
Get the USB voltage.
void systemUSBVoltageUpdate | ( | uint8 | val) |
Update the USB voltage.
val | the new USB voltage value |