Skip to content

Commit

Permalink
Update max number of switches in e2p to 6.
Browse files Browse the repository at this point in the history
  • Loading branch information
breaker27 committed Sep 27, 2014
1 parent 8e7010b commit fcb58ef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions firmware/src_common/e2p_powerswitch.h
Expand Up @@ -32,20 +32,20 @@
// Overall block length: 7680 bits

// SupportedSwitches (UIntValue)
// Description: This is a bit field about the connected switches. (Currently, only one switch is supported and the value has to be 0b00000001, but the value is for future usage.)
// Description: This is a bit field about the connected switches.

// Set SupportedSwitches (UIntValue)
// Offset: 512, length bits 8, min val 1, max val 1
// Offset: 512, length bits 8, min val 1, max val 6
static inline void e2p_powerswitch_set_supportedswitches(uint8_t val)
{
eeprom_write_UIntValue(512, 8, val);
}

// Get SupportedSwitches (UIntValue)
// Offset: 512, length bits 8, min val 1, max val 1
// Offset: 512, length bits 8, min val 1, max val 6
static inline uint8_t e2p_powerswitch_get_supportedswitches(void)
{
return eeprom_read_UIntValue8(512, 8, 1, 1);
return eeprom_read_UIntValue8(512, 8, 1, 6);
}

// BaseStationPacketCounter (UIntValue)
Expand Down
4 changes: 2 additions & 2 deletions firmware/src_common/msggrp_powerswitch.h
Expand Up @@ -50,7 +50,7 @@ typedef enum {
// MessageGroupID: 20
// MessageID: 1
// Possible MessageTypes: Get, Set, SetGet, Status, Ack, AckStatus
// Validity: test
// Validity: deprecated
// Length w/o Header + HeaderExtension: 17 bits
// Data fields: On, TimeoutSec
// Description: This is the state of the relais and its timeout value.
Expand Down Expand Up @@ -165,7 +165,7 @@ static inline uint32_t msg_powerswitch_switchstate_get_timeoutsec(void)
// MessageGroupID: 20
// MessageID: 2
// Possible MessageTypes: Get, Set, SetGet, Status, Ack, AckStatus
// Validity: test
// Validity: deprecated
// Length w/o Header + HeaderExtension: 136 bits
// Data fields: On, TimeoutSec
// Description: This is the state of up to 8 relais and its timeout values.
Expand Down
4 changes: 2 additions & 2 deletions tools/shc_e2p_editor/e2p_layout.xml
Expand Up @@ -582,10 +582,10 @@
</Restriction>
<UIntValue>
<ID>SupportedSwitches</ID>
<Description>This is a bit field about the connected switches. (Currently, only one switch is supported and the value has to be 0b00000001, but the value is for future usage.)</Description>
<Description>This is a bit field about the connected switches.</Description>
<Bits>8</Bits>
<MinVal>1</MinVal>
<MaxVal>1</MaxVal>
<MaxVal>6</MaxVal>
</UIntValue>
<UIntValue>
<ID>BaseStationPacketCounter</ID>
Expand Down

0 comments on commit fcb58ef

Please sign in to comment.