23 lines
621 B
C++
23 lines
621 B
C++
#ifndef CDC_CLASS_H
|
|
#define CDC_CLASS_H
|
|
#include "baselayer.h"
|
|
#include "ctrlinterface.h"
|
|
#include "fifo.h"
|
|
|
|
class cdc_class : public BaseLayer {
|
|
CDC_CtrlInterface * ctrli;
|
|
volatile bool ep3Busy, Ready;
|
|
uint8_t rxbuffer [256];
|
|
public:
|
|
explicit cdc_class ();
|
|
void attach (CDC_CtrlInterface & i) { ctrli = & i; }
|
|
void init ();
|
|
void ep2outHandler ();
|
|
void ep3inHandler ();
|
|
void ctrl (const CTRL_TYPES_DEF type, const void * data, const uint32_t len);
|
|
uint32_t Down (const char * data, const uint32_t len) override;
|
|
protected:
|
|
};
|
|
extern cdc_class * cdc_instance;
|
|
|
|
#endif // CDC_CLASS_H
|