Move I2C initalisations into more logical spots
This commit is contained in:
@@ -17,22 +17,13 @@
|
||||
#include "int_n.h"
|
||||
#include "hard_reset.h"
|
||||
|
||||
|
||||
|
||||
void fusb302_start_processing() {
|
||||
/* Initialize the FUSB302B */
|
||||
resetWatchdog();
|
||||
fusb_setup();
|
||||
resetWatchdog();
|
||||
/* Create the policy engine thread. */
|
||||
PolicyEngine::init();
|
||||
|
||||
/* Create the protocol layer threads. */
|
||||
ProtocolReceive::init();
|
||||
ProtocolTransmit::init();
|
||||
ResetHandler::init();
|
||||
resetWatchdog();
|
||||
/* Create the INT_N thread. */
|
||||
PolicyEngine::init();
|
||||
ProtocolTransmit::init();
|
||||
ProtocolReceive::init();
|
||||
InterruptHandler::init();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "task.h"
|
||||
#include "BSP.h"
|
||||
|
||||
osThreadId InterruptHandler::TaskHandle=NULL;
|
||||
osThreadId InterruptHandler::TaskHandle = NULL;
|
||||
uint32_t InterruptHandler::TaskBuffer[InterruptHandler::TaskStackSize];
|
||||
osStaticThreadDef_t InterruptHandler::TaskControlBlock;
|
||||
|
||||
@@ -41,7 +41,7 @@ void InterruptHandler::init() {
|
||||
void InterruptHandler::Thread(const void *arg) {
|
||||
(void) arg;
|
||||
union fusb_status status;
|
||||
volatile uint32_t events;
|
||||
uint32_t events;
|
||||
bool notifSent = false;
|
||||
while (true) {
|
||||
/* If the INT_N line is low */
|
||||
|
||||
Reference in New Issue
Block a user