UveosOnNation_VEGA_Accel/Inc/Accel.h

39 lines
732 B
C

//
// Created by xemon on 23.11.22.
//
#ifndef UVEOS_ON_NATION_ACCEL_H
#define UVEOS_ON_NATION_ACCEL_H
#include <cmsis_os.h>
#include "Accel_QMA6100P.h"
#include "AccelDataFlowInterface.h"
typedef struct {
tAccelQma6100P accel;
tAccelDataFlowInterface accelDataFlow;
osMessageQueueId_t dataQueue;
bool errorDataFlag;
vector3 current;
struct {
osThreadId_t id;
uint32_t stack[256];
StaticTask_t controlBlock;
osThreadAttr_t attr;
} thread;
} tAccel;
void Accel_Init(tAccel *env, tSpiPortIO *accelIO);
void Accel_StartDevice(tAccel *env);
void Accel_StartThread(tAccel *env);
bool Accel_WaitReady(tAccel *env, uint32_t timeout);
#endif //UVEOS_ON_NATION_ACCEL_H