Changed the data type of the MS/TP index for the receiving byte to allow an APDU of 480 bytes.
This commit is contained in:
@@ -165,7 +165,7 @@ struct mstp_port_struct_t {
|
|||||||
uint8_t HeaderCRCActual;
|
uint8_t HeaderCRCActual;
|
||||||
/* Used as an index by the Receive State Machine, up to a maximum value of */
|
/* Used as an index by the Receive State Machine, up to a maximum value of */
|
||||||
/* InputBufferSize. */
|
/* InputBufferSize. */
|
||||||
unsigned Index;
|
uint16_t Index;
|
||||||
/* An array of octets, used to store octets as they are received. */
|
/* An array of octets, used to store octets as they are received. */
|
||||||
/* InputBuffer is indexed from 0 to InputBufferSize-1. */
|
/* InputBuffer is indexed from 0 to InputBufferSize-1. */
|
||||||
/* The maximum size of a frame is 501 octets. */
|
/* The maximum size of a frame is 501 octets. */
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ static void MSTP_Receive_Frame_FSM(
|
|||||||
static uint8_t HeaderCRC = 0;
|
static uint8_t HeaderCRC = 0;
|
||||||
/* Used as an index by the Receive State Machine,
|
/* Used as an index by the Receive State Machine,
|
||||||
up to a maximum value of the MPDU */
|
up to a maximum value of the MPDU */
|
||||||
static uint8_t Index = 0;
|
static uint16_t Index = 0;
|
||||||
|
|
||||||
switch (Receive_State) {
|
switch (Receive_State) {
|
||||||
case MSTP_RECEIVE_STATE_IDLE:
|
case MSTP_RECEIVE_STATE_IDLE:
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ static void MSTP_Receive_Frame_FSM(
|
|||||||
static uint8_t HeaderCRC = 0;
|
static uint8_t HeaderCRC = 0;
|
||||||
/* Used as an index by the Receive State Machine,
|
/* Used as an index by the Receive State Machine,
|
||||||
up to a maximum value of the MPDU */
|
up to a maximum value of the MPDU */
|
||||||
static uint8_t Index = 0;
|
static uint16_t Index = 0;
|
||||||
|
|
||||||
switch (Receive_State) {
|
switch (Receive_State) {
|
||||||
case MSTP_RECEIVE_STATE_IDLE:
|
case MSTP_RECEIVE_STATE_IDLE:
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ static void MSTP_Receive_Frame_FSM(
|
|||||||
static uint8_t HeaderCRC = 0;
|
static uint8_t HeaderCRC = 0;
|
||||||
/* Used as an index by the Receive State Machine,
|
/* Used as an index by the Receive State Machine,
|
||||||
up to a maximum value of the MPDU */
|
up to a maximum value of the MPDU */
|
||||||
static uint8_t Index = 0;
|
static uint16_t Index = 0;
|
||||||
|
|
||||||
switch (Receive_State) {
|
switch (Receive_State) {
|
||||||
case MSTP_RECEIVE_STATE_IDLE:
|
case MSTP_RECEIVE_STATE_IDLE:
|
||||||
|
|||||||
Reference in New Issue
Block a user