This commit is contained in:
2018-02-03 11:54:22 +01:00
parent 96a7b58091
commit 611b38c5e6
39 changed files with 260 additions and 487 deletions
-1
View File
@@ -7,7 +7,6 @@
#define NPX_INTERNAL
#include "_npx_internal.h"
#include "_npx_init.h"
#include "ws2812.h"
/** Allocate data structure and set defaults */
-20
View File
@@ -1,20 +0,0 @@
//
// Created by MightyPork on 2018/02/03.
//
#ifndef GEX_F072_NPX_INIT_H
#define GEX_F072_NPX_INIT_H
#ifndef NPX_INTERNAL
#error bad include!
#endif
#include "unit_base.h"
/** Finalize unit set-up */
error_t Npx_init(Unit *unit);
/** Tear down the unit */
void Npx_deInit(Unit *unit);
#endif //GEX_F072_NPX_INIT_H
+27
View File
@@ -21,4 +21,31 @@ struct priv {
GPIO_TypeDef *port;
};
// ------------------------------------------------------------------------
/** Allocate data structure and set defaults */
error_t Npx_preInit(Unit *unit);
/** Load from a binary buffer stored in Flash */
void Npx_loadBinary(Unit *unit, PayloadParser *pp);
/** Write to a binary buffer for storing in Flash */
void Npx_writeBinary(Unit *unit, PayloadBuilder *pb);
// ------------------------------------------------------------------------
/** Parse a key-value pair from the INI file */
error_t Npx_loadIni(Unit *unit, const char *key, const char *value);
/** Generate INI file section for the unit */
void Npx_writeIni(Unit *unit, IniWriter *iw);
// ------------------------------------------------------------------------
/** Finalize unit set-up */
error_t Npx_init(Unit *unit);
/** Tear down the unit */
void Npx_deInit(Unit *unit);
#endif //GEX_F072_NPX_INTERNAL_H
-1
View File
@@ -7,7 +7,6 @@
#define NPX_INTERNAL
#include "_npx_internal.h"
#include "_npx_settings.h"
/** Load from a binary buffer stored in Flash */
void Npx_loadBinary(Unit *unit, PayloadParser *pp)
-31
View File
@@ -1,31 +0,0 @@
//
// Created by MightyPork on 2018/02/03.
//
#ifndef GEX_F072_NPX_SETTINGS_H
#define GEX_F072_NPX_SETTINGS_H
#ifndef NPX_INTERNAL
#error bad include!
#endif
#include "unit_base.h"
/** Allocate data structure and set defaults */
error_t Npx_preInit(Unit *unit);
/** Load from a binary buffer stored in Flash */
void Npx_loadBinary(Unit *unit, PayloadParser *pp);
/** Write to a binary buffer for storing in Flash */
void Npx_writeBinary(Unit *unit, PayloadBuilder *pb);
// ------------------------------------------------------------------------
/** Parse a key-value pair from the INI file */
error_t Npx_loadIni(Unit *unit, const char *key, const char *value);
/** Generate INI file section for the unit */
void Npx_writeIni(Unit *unit, IniWriter *iw);
#endif //GEX_F072_NPX_SETTINGS_H
+1 -2
View File
@@ -6,8 +6,7 @@
#include "unit_neopixel.h"
#define NPX_INTERNAL
#include "_npx_settings.h"
#include "_npx_init.h"
#include "_npx_internal.h"
enum PinCmd_ {
CMD_CLEAR = 0,