cleaning
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// Created by MightyPork on 2018/02/03.
|
||||
//
|
||||
|
||||
#ifndef GEX_F072_DOUT_INIT_H
|
||||
#define GEX_F072_DOUT_INIT_H
|
||||
|
||||
#ifndef DOUT_INTERNAL
|
||||
#error bad include!
|
||||
#endif
|
||||
|
||||
#include "unit_base.h"
|
||||
|
||||
/** Finalize unit set-up */
|
||||
error_t DOut_init(Unit *unit);
|
||||
|
||||
/** Tear down the unit */
|
||||
void DOut_deInit(Unit *unit);
|
||||
|
||||
#endif //GEX_F072_DOUT_INIT_H
|
||||
@@ -21,4 +21,29 @@ struct priv {
|
||||
GPIO_TypeDef *port;
|
||||
};
|
||||
|
||||
/** Allocate data structure and set defaults */
|
||||
error_t DOut_preInit(Unit *unit);
|
||||
|
||||
/** Load from a binary buffer stored in Flash */
|
||||
void DOut_loadBinary(Unit *unit, PayloadParser *pp);
|
||||
|
||||
/** Write to a binary buffer for storing in Flash */
|
||||
void DOut_writeBinary(Unit *unit, PayloadBuilder *pb);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/** Parse a key-value pair from the INI file */
|
||||
error_t DOut_loadIni(Unit *unit, const char *key, const char *value);
|
||||
|
||||
/** Generate INI file section for the unit */
|
||||
void DOut_writeIni(Unit *unit, IniWriter *iw);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/** Finalize unit set-up */
|
||||
error_t DOut_init(Unit *unit);
|
||||
|
||||
/** Tear down the unit */
|
||||
void DOut_deInit(Unit *unit);
|
||||
|
||||
#endif //GEX_F072_DOUT_INTERNAL_H
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
//
|
||||
// Created by MightyPork on 2018/02/03.
|
||||
//
|
||||
|
||||
#ifndef GEX_F072_DOUT_SETTINGS_H
|
||||
#define GEX_F072_DOUT_SETTINGS_H
|
||||
|
||||
#ifndef DOUT_INTERNAL
|
||||
#error bad include!
|
||||
#endif
|
||||
|
||||
#include "unit_base.h"
|
||||
|
||||
/** Allocate data structure and set defaults */
|
||||
error_t DOut_preInit(Unit *unit);
|
||||
|
||||
/** Load from a binary buffer stored in Flash */
|
||||
void DOut_loadBinary(Unit *unit, PayloadParser *pp);
|
||||
|
||||
/** Write to a binary buffer for storing in Flash */
|
||||
void DOut_writeBinary(Unit *unit, PayloadBuilder *pb);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
/** Parse a key-value pair from the INI file */
|
||||
error_t DOut_loadIni(Unit *unit, const char *key, const char *value);
|
||||
|
||||
/** Generate INI file section for the unit */
|
||||
void DOut_writeIni(Unit *unit, IniWriter *iw);
|
||||
|
||||
#endif //GEX_F072_DOUT_SETTINGS_H
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "unit_dout.h"
|
||||
|
||||
#define DOUT_INTERNAL
|
||||
#include "_dout_settings.h"
|
||||
#include "_dout_init.h"
|
||||
#include "_dout_internal.h"
|
||||
|
||||
enum PinCmd_ {
|
||||
CMD_TEST = 0,
|
||||
@@ -17,8 +16,7 @@ enum PinCmd_ {
|
||||
};
|
||||
|
||||
/** Handle a request message */
|
||||
static error_t DOut_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command,
|
||||
PayloadParser *pp)
|
||||
static error_t DOut_handleRequest(Unit *unit, TF_ID frame_id, uint8_t command, PayloadParser *pp)
|
||||
{
|
||||
uint16_t packed = pp_u16(pp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user