AT91SAM7X Framework
mbpbcfg.h File Reference

defines and configuration of MBPB (ModBusPortBus) More...

Go to the source code of this file.

Defines

#define MBPB_TIMEOUTUSASC   (25* 1000)
 Overrideable configuration: idle time and time out for incomming asc telegrams
#define MBPB_TIMEOUTMSFWD   150
 Overrideable configuration: response time out of forwarding port (for "routing" requests)
#define MBPB_TIMER_BASE   TIMER0
 Overrideable configuration: first system timer slot used for forwarding time out
#define MBPB_PORT_COUNT   5
 Overrideable configuration: count of supported ports (also used to determine last timer slot for forwarding time out)
#define MBPB_MODE_COUNT   2
 Overrideable configuration: count of supported telegram modes: 1= ASC only, 2= ASC and RTU (#EMBPBMode)
#define MBPB_BUFFER_COUNT   2
 Overrideable configuration: count of buffers per port (default == required == 2) (MBPB_BUFFER_RAW, MBPB_BUFFER_COOKED)
#define MBPB_BUFFER_RAW   0
 Overrideable configuration: index of buffer for binary (raw) data
#define MBPB_BUFFER_COOKED   1
 Overrideable configuration: index of buffer for prepared (asc/rtu) data
#define MBPB_PORTBUSID_MASKSHIFT   4
 Overrideable configuration: shift count to push the 'port/bus' identifier bits into lowest bits
#define MBPB_PORTBUSID_MASK   (0x07 << MBPB_PORTBUSID_MASKSHIFT)
 Overrideable configuration: bit mask covering the 'port/bus' identifier within the address byte
#define MBPB_TRANSLATE_MASKSHIFT   7
 Overrideable configuration: shift count to push the 'translation' flag bit into lowest bit
#define MBPB_TRANSLATE_MASK   (0x01 << MBPB_TRANSLATE_MASKSHIFT)
 Overrideable configuration: bit mask covering the 'translation' flag within the address byte
#define MBPB_ADDR_BROADCAST   0
 Overrideable configuration: address value reserved for broadcasts (multiple slave addressing)
#define MBPB_ADDR_MIN   1
 Overrideable configuration: minimum address value for individual slave addressing
#define MBPB_ADDR_MAX   (0xFF- (MBPB_TRANSLATE_MASK | MBPB_PORTBUSID_MASK))
 Overrideable configuration: maximum address value for individual slave addressing
#define MBPB_ADDR_MASK   ((UCHAR) ~(MBPB_TRANSLATE_MASK | MBPB_PORTBUSID_MASK))
 Overrideable configuration: bit mask covering the 'plain address' (without 'port/bus and translation' bits) within the address byte
#define MBPB_HANDLERS_MAX   16
 Overrideable configuration: count of supported command handlers
#define MBPB_PRODUCT_DEVICE_LENGTH   5
 Overrideable configuration: length of device product string
#define MBPB_FILTERLIST_COUNT   16
 Overrideable configuration: count of supported filters
#define MBPB_MBXCNT_EVENT   16
 Overrideable configuration: count of buffered telegram (frame) state change events (EMBPBEvent of mbpbdata.h)
#define MBPB_MBXCNT_TRG   16
 Overrideable configuration: count of buffered register access messages (for filtering)
#define MBPB_STACK_TSKMBPBDATA   600
 Overrideable configuration: stack size of data task
#define MBPB_STACK_TSKMBPBTRGFILTER   600
 Overrideable configuration: stack size of filter task for register access

Detailed Description

defines and configuration of MBPB (ModBusPortBus)

Definition in file mbpbcfg.h.