mirror of
https://github.com/dexterbg/Twizy-Cfg.git
synced 2024-11-18 11:53:59 +00:00
Support 32 bit platforms (ESP32)
This commit is contained in:
parent
5686de5daa
commit
f70fb1e760
3 changed files with 8 additions and 8 deletions
|
@ -28,13 +28,13 @@
|
|||
// 3 = subindex
|
||||
// 4..7 = data (little endian)
|
||||
|
||||
union sdo_buffer {
|
||||
union __attribute__ ((__packed__)) sdo_buffer {
|
||||
|
||||
// raw / segment data:
|
||||
UINT8 byte[8];
|
||||
|
||||
// request / expedited:
|
||||
struct {
|
||||
struct __attribute__ ((__packed__)) {
|
||||
UINT8 control;
|
||||
UINT index;
|
||||
UINT8 subindex;
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
|
||||
#define OVMS_TWIZY_CFG_BRAKELIGHT 1
|
||||
|
||||
union cfg_status {
|
||||
union __attribute__ ((__packed__)) cfg_status {
|
||||
|
||||
UINT8 drivemode;
|
||||
|
||||
struct {
|
||||
struct __attribute__ ((__packed__)) {
|
||||
unsigned type:1; // CFG: 0=Twizy80, 1=Twizy45
|
||||
unsigned profile_user:2; // CFG: user selected profile: 0=Default, 1..3=Custom
|
||||
unsigned profile_cfgmode:2; // CFG: profile, cfgmode params were last loaded from
|
||||
|
@ -43,12 +43,12 @@ extern cfg_status twizy_cfg;
|
|||
// 1 kept in RAM (working set)
|
||||
// 3 stored in binary EEPROM param slots PARAM_PROFILE1 /2 /3
|
||||
|
||||
struct cfg_profile {
|
||||
struct __attribute__ ((__packed__)) cfg_profile {
|
||||
UINT8 checksum;
|
||||
UINT8 speed, warn;
|
||||
UINT8 torque, power_low, power_high;
|
||||
UINT8 drive, neutral, brake;
|
||||
struct tsmap {
|
||||
struct __attribute__ ((__packed__)) tsmap {
|
||||
UINT8 spd1, spd2, spd3, spd4;
|
||||
UINT8 prc1, prc2, prc3, prc4;
|
||||
} tsmap[3]; // 0=D 1=N 2=B
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
// Type shortcuts:
|
||||
|
||||
typedef unsigned char UINT8;
|
||||
typedef unsigned int UINT;
|
||||
typedef unsigned int WORD;
|
||||
typedef unsigned short UINT;
|
||||
typedef unsigned short WORD;
|
||||
typedef unsigned long UINT32;
|
||||
|
||||
typedef signed char INT8;
|
||||
|
|
Loading…
Reference in a new issue