Skip to content

Commit

Permalink
add missing register
Browse files Browse the repository at this point in the history
  • Loading branch information
jp112sdl committed Nov 23, 2019
1 parent 1299f18 commit f07e3e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Register.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ namespace as {
#define CREG_LEDONTIME 0x22
#define CREG_EVENTFILTERTIME 0x23
#define CREG_TRANSMITTRYMAX 0x30
#define CREG_LOADAPPEARBEHAVIOUR 0x31
#define CREG_OVERTEMPLEVEL 0x32
#define CREG_REDUCETEMPLEVEL 0x34
#define CREG_REDUCELEVEL 0x35
Expand Down Expand Up @@ -410,6 +411,8 @@ class RegList1 : public RegisterList<Register> {
uint8_t eventFilterTime() const { return this->readRegister(CREG_EVENTFILTERTIME,5); }
bool transmitTryMax(uint8_t v) const { return this->writeRegister(CREG_TRANSMITTRYMAX,v); }
uint8_t transmitTryMax() const { uint8_t v = this->readRegister(CREG_TRANSMITTRYMAX,6); return v == 0 ? 1 : v;}
bool loadAppearBehaviour(uint8_t v) const { return this->writeRegister(CREG_LOADAPPEARBEHAVIOUR,v); }
uint8_t loadAppearBehaviour() const { uint8_t v = this->readRegister(CREG_LOADAPPEARBEHAVIOUR,0); return v > 3 ? 3 : v;}

uint8_t longPressTime () const { return this->readRegister(CREG_LONGPRESSTIME,0x0f,4,1); }
bool longPressTime (uint8_t v) const { return this->writeRegister(CREG_LONGPRESSTIME,0x0f,4,v); }
Expand Down

0 comments on commit f07e3e7

Please sign in to comment.