34 lines
605 B
C
34 lines
605 B
C
//
|
|
// Created by cfif on 17.11.22.
|
|
//
|
|
|
|
#ifndef MODULE_LINIO_H
|
|
#define MODULE_LINIO_H
|
|
|
|
#include "stdint.h"
|
|
#include "cmsis_os2.h"
|
|
|
|
typedef enum {
|
|
LIN_DIRECTION_GET = 0,
|
|
LIN_DIRECTION_SET = 1
|
|
} eDirection;
|
|
|
|
typedef struct {
|
|
osMessageQueueId_t rxDataQueue;
|
|
eDirection direction;
|
|
uint8_t g_aTxBufferLen;
|
|
uint8_t g_aTxBuffer[8];
|
|
uint8_t g_aRxBufferLen;
|
|
uint8_t g_aRxBuffer[8];
|
|
} tLinData;
|
|
|
|
typedef uint8_t (* LinIOTransaction )(void *env, uint8_t command, uint32_t timeout);
|
|
|
|
typedef struct {
|
|
void *env;
|
|
LinIOTransaction runCommand;
|
|
} tLinIO;
|
|
|
|
|
|
#endif //MODULE_LINIO_H
|