PX4IO: Robustify firmware for mixer load operation

This change makes the mixer load and reset operation closer to thread-safe. It was guarded one-way before and in only one location. This change ensures that its being locked out from both directions. The accesses to the locking variables still need work because they are non-atomic.
This commit is contained in:
Lorenz Meier
2016-12-26 13:41:36 +01:00
parent 5b70522541
commit 074e666b95
3 changed files with 30 additions and 14 deletions
+2 -2
View File
@@ -83,7 +83,7 @@ static const uint16_t r_page_config[] = {
*
* Status values.
*/
uint16_t r_page_status[] = {
volatile uint16_t r_page_status[] = {
[PX4IO_P_STATUS_FREEMEM] = 0,
[PX4IO_P_STATUS_CPULOAD] = 0,
[PX4IO_P_STATUS_FLAGS] = 0,
@@ -214,7 +214,7 @@ volatile uint16_t r_page_setup[] = {
*
* Control values from the FMU.
*/
volatile uint16_t r_page_controls[PX4IO_CONTROL_GROUPS * PX4IO_CONTROL_CHANNELS];
uint16_t r_page_controls[PX4IO_CONTROL_GROUPS * PX4IO_CONTROL_CHANNELS];
/*
* PAGE 102 does not have a buffer.