Progress on the menu

- Debounced the interlocks
- Created a specified screen for pre-compliance tests

ADCs must be averaged
menu handling of screens is not OK
destructing tasks is not OK

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@257 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-18 15:26:05 +00:00
parent 97a42de2ea
commit 51ffde94d7
20 changed files with 649 additions and 215 deletions

View File

@@ -34,6 +34,10 @@
#include <stdbool.h>
#include "stm32f10x.h"
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "platform.h"
#include "gpio.h"
@@ -66,6 +70,9 @@ struct Interlock
struct InterlockElement NC;
bool initialized;
T_INTERLOCK_ID ID;
TaskHandle_t taskHandle;
SemaphoreHandle_t semaphore;
int waitToDebounce_ms;
};
// -----------------------------------------------------------------------------
@@ -88,7 +95,7 @@ struct Interlock
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus Interlock_construct(struct Interlock* self, T_INTERLOCK_ID ID, struct Gpio* NO, EXTI_InitTypeDef NOEXTI, struct Gpio* NC, EXTI_InitTypeDef NCEXTI);
extern ErrorStatus Interlock_construct(struct Interlock* self, T_INTERLOCK_ID ID, struct Gpio* NO, EXTI_InitTypeDef NOEXTI, struct Gpio* NC, EXTI_InitTypeDef NCEXTI, int waitToDebounce_ms);
/** ----------------------------------------------------------------------------