Skip to content

Commit d3e05d1

Browse files
committed
- Changed the priority for packet bursts of extended read responses to the lowest priority, so other frames win arbitration (e. g. on the CAN bus) when they are sent. This will help other events moving on the bus.
- Changed functionality for extended page read request with optional byte. If the optional byte is 0, 256 registers will be read now, instead of 1.
1 parent ca0960d commit d3e05d1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

VSCP/src/framework/vscp_core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ typedef struct
114114
{
115115
uint16_t page; /**< Page */
116116
uint8_t addr; /**< Address (offset in page) */
117-
uint8_t count; /**< Number of registers to read */
117+
uint16_t count; /**< Number of registers to read */
118118
uint8_t seq; /**< Sequence id */
119119

120120
} ExtPageRead;
@@ -2646,10 +2646,10 @@ static inline void vscp_core_handleProtocolExtendedPageReadRegister(void)
26462646
{
26472647
vscp_core_extPageReadData.count = vscp_core_rxMessage.data[4];
26482648

2649-
/* Read at least one register */
2649+
/* Shall 256 registers be read? */
26502650
if (0 == vscp_core_extPageReadData.count)
26512651
{
2652-
vscp_core_extPageReadData.count = 1;
2652+
vscp_core_extPageReadData.count = 256;
26532653
}
26542654
}
26552655
else
@@ -2682,13 +2682,13 @@ static void vscp_core_extendedPageReadRegister(ExtPageRead * const data)
26822682
vscp_TxMessage txMessage;
26832683
uint8_t index = 0;
26842684
uint8_t addr = data->addr;
2685-
uint8_t count = data->count;
2685+
uint16_t count = data->count;
26862686
BOOL nextPage = FALSE;
26872687

26882688
/* Prepare tx message */
26892689
txMessage.vscpClass = VSCP_CLASS_L1_PROTOCOL;
26902690
txMessage.vscpType = VSCP_TYPE_PROTOCOL_EXTENDED_PAGE_READ_WRITE_RESPONSE;
2691-
txMessage.priority = VSCP_PRIORITY_3_NORMAL;
2691+
txMessage.priority = VSCP_PRIORITY_7_LOW;
26922692
txMessage.oAddr = vscp_core_nickname;
26932693
txMessage.hardCoded = VSCP_CORE_HARD_CODED;
26942694

0 commit comments

Comments
 (0)