39 lines
936 B
C
Executable file
39 lines
936 B
C
Executable file
/*
|
|
* Author: klaute -Kai Lauterbach - @kailauterbach - me@klaute.de
|
|
* Date: 08/2016
|
|
* License: GPLv3
|
|
*/
|
|
|
|
#ifndef __COMMAND_CTRL_H__
|
|
#define __COMMAND_CTRL_H__
|
|
|
|
#include <stdint.h>
|
|
|
|
/*****************************************************************************/
|
|
|
|
#define CC_STATE_READ_SOM1 20
|
|
#define CC_STATE_READ_SOM2 30
|
|
#define CC_STATE_READ_CMD 40
|
|
#define CC_STATE_READ_DATA 50
|
|
#define CC_STATE_READ_EOM1 60
|
|
#define CC_STATE_READ_EOM2 70
|
|
|
|
/*****************************************************************************/
|
|
|
|
#define CC_CMD_NO_CMD 0
|
|
|
|
#define MSG_INCOMPLETE 10
|
|
#define MSG_COMPLETE 20
|
|
|
|
/*****************************************************************************/
|
|
|
|
extern void USB_serialStreamWriteC(char*, uint16_t);
|
|
|
|
void cc_init(void);
|
|
void cc_abort(void);
|
|
void cc_processData(uint8_t);
|
|
void cc_clearReadDataBuffer(void);
|
|
|
|
/*****************************************************************************/
|
|
|
|
#endif
|