37 lines
718 B
C
37 lines
718 B
C
//
|
|
// Created by cfif on 13.11.2023.
|
|
//
|
|
|
|
#ifndef SERIALPORT_USB_H
|
|
#define SERIALPORT_USB_H
|
|
|
|
#include "cmsis_os.h"
|
|
#include "SerialPortIO.h"
|
|
#include "usb_conf.h"
|
|
#include "usb_core.h"
|
|
#include "usbd_int.h"
|
|
#include "cdc_class.h"
|
|
#include "cdc_desc.h"
|
|
|
|
typedef struct {
|
|
osMessageQueueId_t rxDataQueue;
|
|
struct {
|
|
osThreadId_t id;
|
|
uint32_t stack[1024];
|
|
StaticTask_t controlBlock;
|
|
osThreadAttr_t attr;
|
|
} thread;
|
|
|
|
ALIGNED_HEAD uint8_t usb_buffer[256] ALIGNED_TAIL;
|
|
|
|
} tSerialPortUsbArtery;
|
|
|
|
void SerialPortUsb_Init(
|
|
tSerialPortUsbArtery *env,
|
|
uint32_t rxBufferLength
|
|
);
|
|
|
|
tSerialPortIO SerialPortUsb_GetIo(tSerialPortUsbArtery *env);
|
|
|
|
#endif //SERIALPORT_USB_H
|