mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
CC-12 Enable Watchdog on CC
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2653 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
037a63ee1d
commit
063c58e7c0
@ -80,11 +80,11 @@ void PIOS_Board_Init(void) {
|
||||
PIOS_PPM_Init();
|
||||
#endif
|
||||
#if defined(PIOS_INCLUDE_USB_HID)
|
||||
//PIOS_USB_HID_Init(0);
|
||||
PIOS_USB_HID_Init(0);
|
||||
#endif
|
||||
//PIOS_I2C_Init();
|
||||
//PIOS_IAP_Init();
|
||||
//PIOS_WDG_Init();
|
||||
PIOS_I2C_Init();
|
||||
PIOS_IAP_Init();
|
||||
PIOS_WDG_Init();
|
||||
}
|
||||
|
||||
/* Flash/Accel Interface
|
||||
|
@ -89,6 +89,7 @@ int32_t CCAttitudeInitialize(void)
|
||||
// Start main task
|
||||
xTaskCreate(CCAttitudeTask, (signed char *)"CCAttitude", STACK_SIZE_BYTES/4, NULL, TASK_PRIORITY, &taskHandle);
|
||||
TaskMonitorAdd(TASKINFO_RUNNING_AHRSCOMMS, taskHandle);
|
||||
PIOS_WDG_RegisterFlag(PIOS_WDG_ATTITUDE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -109,7 +110,7 @@ static void CCAttitudeTask(void *parameters)
|
||||
// Main task loop
|
||||
while (1) {
|
||||
//portTickType lastSysTime;
|
||||
//PIOS_WDG_UpdateFlag(PIOS_WDG_AHRS);
|
||||
PIOS_WDG_UpdateFlag(PIOS_WDG_ATTITUDE);
|
||||
|
||||
// TODO: register the adc callback, push the data onto a queue (safe for thread)
|
||||
// with the queue ISR version
|
||||
|
@ -89,7 +89,7 @@ TIM4 | RC In 1 | Servo 3 | Servo 2 | Servo 1
|
||||
#define PIOS_WDG_REGISTER BKP_DR4
|
||||
#define PIOS_WDG_ACTUATOR 0x0001
|
||||
#define PIOS_WDG_STABILIZATION 0x0002
|
||||
#define PIOS_WDG_AHRS 0x0004
|
||||
#define PIOS_WDG_ATTITUDE 0x0004
|
||||
#define PIOS_WDG_MANUAL 0x0008
|
||||
|
||||
//------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user