aligned max-info-frames with PDU queue

This commit is contained in:
skarg
2012-04-16 14:44:34 +00:00
parent 45c8b28078
commit b80039cf9b
+6 -5
View File
@@ -55,6 +55,11 @@
Only one MS/TP datalink layer
*/
/* count must be a power of 2 for ringbuf library */
#ifndef MSTP_PDU_PACKET_COUNT
#error MSTP_PDU_PACKET_COUNT must be defined!
#endif
/* The state of the Receive State Machine */
static MSTP_RECEIVE_STATE Receive_State;
/* When a master node is powered up or reset, */
@@ -112,7 +117,7 @@ static uint8_t This_Station;
/* nodes. This may be used to allocate more or less of the available link */
/* bandwidth to particular nodes. If Max_Info_Frames is not writable in a */
/* node, its value shall be 1. */
static uint8_t Nmax_info_frames = 1;
static uint8_t Nmax_info_frames = MSTP_PDU_PACKET_COUNT;
/* This parameter represents the value of the Max_Master property of the */
/* node's Device object. The value of Max_Master specifies the highest */
/* allowable address for master nodes. The value of Max_Master shall be */
@@ -188,10 +193,6 @@ struct mstp_pdu_packet {
uint16_t length;
uint8_t buffer[MAX_MPDU];
};
/* count must be a power of 2 for ringbuf library */
#ifndef MSTP_PDU_PACKET_COUNT
#define MSTP_PDU_PACKET_COUNT 2
#endif
static struct mstp_pdu_packet PDU_Buffer[MSTP_PDU_PACKET_COUNT];
static RING_BUFFER PDU_Queue;