:: BAUD_RATE (d)

usart.c
19#define BAUD_RATE 2400 //bps.
75 SPBRG = (20000000 / BAUD_RATE)/64 - 1; // Set Baud Rate

:: CANFUNCTIONS_H (d)

canfunctions.h
14#ifndef CANFUNCTIONS_H
15#define CANFUNCTIONS_H

:: CANIDToRegs (f)

canfunctions.c
295 CANIDToRegs(&TXB0SIDH,val,CAN_CONFIG_XTD_MSG);
297 CANIDToRegs(&TXB0SIDH,val,CAN_CONFIG_STD_MSG);
321 CANIDToRegs(&TXB1SIDH,val,CAN_CONFIG_XTD_MSG);
323 CANIDToRegs(&TXB1SIDH,val,CAN_CONFIG_STD_MSG);
345 CANIDToRegs(&TXB2SIDH,val,CAN_CONFIG_XTD_MSG);
347 CANIDToRegs(&TXB2SIDH,val,CAN_CONFIG_STD_MSG);
455// CANIDToRegs(&TXB0SIDH,val,CAN_CONFIG_STD_MSG); Do this inline - all four lines below
480 * Function: void CANIDToRegs(BYTE* ptr,
503void CANIDToRegs(int *regaddress, int32 val, CAN_CONFIG_FLAGS type)
557 CANIDToRegs(ptr, val, type);
613 CANIDToRegs(ptr, val, type);
canfunctions.h
427void CANIDToRegs(int *regaddress,int32 val,CAN_CONFIG_FLAGS type);

:: CANInitialize (f)

RB.c
488 CANInitialize(1,2,6,6,7,CAN_CONFIG_VALID_STD_MSG & CAN_CONFIG_DBL_BUFFER_ON); //works for 250kbps for 20Mhz
canfunctions.c
148 * Function: void CANInitialize(BYTE SJW,
187void CANInitialize(int SJW,int BRP,int PHSEG1,int PHSEG2,int PROPSEG,CAN_CONFIG_FLAGS config)
41Added code in CANInitialize to set the ENDRHI bit, to avoid floating output.
canfunctions.h
264 * module. Routines CANInitialize() and CANSetBaudRate() use these
424void CANInitialize(int SJW,int BRP,int PHSEG1,int PHSEG2,int PROPSEG,CAN_CONFIG_FLAGS config);

:: CANIsRxReady (d)

canfunctions.h
384 * Macro: BOOL CANIsRxReady()
399#define CANIsRxReady() (RXB0CON_RXFUL | RXB1CON_RXFUL)

:: CANIsTx0Ready (d)

canfunctions.h
418#define CANIsTx0Ready() (!TXB0CON_TXREQ)

:: CANIsTx1Ready (d)

canfunctions.h
419#define CANIsTx1Ready() (!TXB1CON_TXREQ)

:: CANIsTx2Ready (d)

canfunctions.h
420#define CANIsTx2Ready() (!TXB2CON_TXREQ)

:: CANIsTxReady (d)

canfunctions.h
402 * Macro: BOOL CANIsTxReady()
414#define CANIsTxReady() (!TXB0CON_TXREQ || \

:: CANReceiveMessage (f)

RB.c
574 if (CANReceiveMessage (&URBStackRcv.ID, URBStackRcv.buf,&URBStackRcv.len,&RcvMessageFlags))
canfunctions.c
618 * Function: BOOL CANReceiveMessage(int16 *id,
641BOOLEAN CANReceiveMessage(int16 *id, BYTE *Data, BYTE *DataLen, CAN_RX_MSG_FLAGS *MsgFlags)
canfunctions.h
429BOOLEAN CANReceiveMessage(int16 *id, BYTE *Data, BYTE *DataLen, CAN_RX_MSG_FLAGS *MsgFlags);

:: CANSendMessage (f)

RB.c
153 // add needless latency? The problem is, CANSendMessage is called in main()
172 while (!(CANSendMessage(URBTxSDO.ID,2,URBTxSDO.buf,URBTxSDO.len,\
412 CANSendMessage(URBhb.ID,2,URBhb.buf,URBhb.len, CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME);
427 if (CANSendMessage(RBtPM[i].ID,(i % 2),RBtPM[i].buf,RBtPM[i].len,
canfunctions.c
255 * Function: BOOL CANSendMessage(int16 id,
278// This is not "#inline" !! Do not call CANSendMessage from interrupt!
279BOOLEAN CANSendMessage(int16 val, int8 buffSelect, BYTE* Data, BYTE DataLen, CAN_TX_MSG_FLAGS MsgFlags)
canfunctions.h
425BOOLEAN CANSendMessage(int16 val,int8 buffSelect,BYTE* Data,BYTE DataLen,CAN_TX_MSG_FLAGS MsgFlags);

:: CANSetBaudRate (f)

canfunctions.c
202 CANSetBaudRate(SJW, BRP, PHSEG1, PHSEG2,PROPSEG,config);
55 * Function: void CANSetBaudRate(BYTE SJW,
89void CANSetBaudRate(int SJW,int BRP,int PHSEG1,int PHSEG2,int PROPSEG,CAN_CONFIG_FLAGS flags)
canfunctions.h
264 * module. Routines CANInitialize() and CANSetBaudRate() use these
422void CANSetBaudRate(int SJW,int BRP,int PHSEG1,int PHSEG2,int PROPSEG,CAN_CONFIG_FLAGS flags);

:: CANSetFilter (f)

RB.c
510 CANSetFilter(CAN_FILTER_B1_F1, RB_DICT_REQ + RB_NODEID, CAN_CONFIG_STD_MSG); // allow SDO messages for own node
511 CANSetFilter(CAN_FILTER_B1_F2, RB_NMT, CAN_CONFIG_STD_MSG); // also allow NMT msg with NodeID 0 (master node).
528 CANSetFilter(CAN_FILTER_B2_F1,RB_RXCONFIG_0, CAN_CONFIG_STD_MSG);
529 CANSetFilter(CAN_FILTER_B2_F2,RB_RXCONFIG_1, CAN_CONFIG_STD_MSG);
530 CANSetFilter(CAN_FILTER_B2_F3,RB_RXCONFIG_2, CAN_CONFIG_STD_MSG);
531 CANSetFilter(CAN_FILTER_B2_F4,RB_RXCONFIG_3, CAN_CONFIG_STD_MSG);
canfunctions.c
243 CANSetFilter(CAN_FILTER_B1_F1, 0, FilterConfig1);
244 CANSetFilter(CAN_FILTER_B1_F2, 0, FilterConfig1);
245 CANSetFilter(CAN_FILTER_B2_F1, 0, FilterConfig2);
246 CANSetFilter(CAN_FILTER_B2_F2, 0, FilterConfig2);
247 CANSetFilter(CAN_FILTER_B2_F3, 0, FilterConfig2);
248 CANSetFilter(CAN_FILTER_B2_F4, 0, FilterConfig2);
561 * Function: void CANSetFilter(enum CAN_FILTER code,
579void CANSetFilter(CAN_FILTER code,int32 val,CAN_CONFIG_FLAGS type)
canfunctions.h
321 * This enumeration values define filter codes. Routine CANSetFilter
430void CANSetFilter(CAN_FILTER code,int32 val,CAN_CONFIG_FLAGS type);

:: CANSetMask (f)

RB.c
509 CANSetMask(CAN_MASK_B1,CAN_MASK_ELEVEN_BITS , CAN_CONFIG_STD_MSG); // screen on the basis of all CAN-ID bits
514 CANSetMask(CAN_MASK_B2, CAN_MASK_ELEVEN_BITS, CAN_CONFIG_STD_MSG); // screen on the basis of all 11 bits
canfunctions.c
221 CANSetMask(CAN_MASK_B1, 0x00000000, CAN_CONFIG_STD_MSG);
222 CANSetMask(CAN_MASK_B2, 0x00000000, CAN_CONFIG_STD_MSG);
34Changed CANSetMask param "val" to type "int32" to match calls.
527 * Function: void CANSetMask(enum CAN_MASK code,
545void CANSetMask(CAN_MASK code, int32 val,CAN_CONFIG_FLAGS type)
canfunctions.h
305 * This enumeration values define mask codes. Routine CANSetMask()
426void CANSetMask(CAN_MASK code, int32 val, CAN_CONFIG_FLAGS type);

:: CANSetOperationMode (f)

RB.c
506 CANSetOperationMode(CAN_OP_MODE_CONFIG); // must be in config mode to change masks/filters
542 CANSetOperationMode(CAN_OP_MODE_NORMAL); // turn the CAN back on after setting filters.
canfunctions.c
119 * Function: void CANSetOperationMode(CAN_OP_MODE mode)
136void CANSetOperationMode(CAN_OP_MODE mode)
199 CANSetOperationMode(CAN_OP_MODE_CONFIG);
251 CANSetOperationMode(CAN_OP_MODE_NORMAL);
canfunctions.h
243 * operation mode. CANSetOperationMode() routine requires this code.
423void CANSetOperationMode(CAN_OP_MODE mode);

:: CAN_CONFIG_ALL_MSG (e)

canfunctions.h
294 CAN_CONFIG_ALL_MSG = 0b11111111, // X11XXXXX

:: CAN_CONFIG_ALL_VALID_MSG (e)

canfunctions.h
297 CAN_CONFIG_ALL_VALID_MSG = 0b10011111 // X00XXXXX

:: CAN_CONFIG_DBL_BUFFER_BIT (e)

canfunctions.c
205 if (config & CAN_CONFIG_DBL_BUFFER_BIT)
26if (config & CAN_CONFIG_DBL_BUFFER_BIT)
canfunctions.h
289 CAN_CONFIG_DBL_BUFFER_BIT = 0b00010000,

:: CAN_CONFIG_DBL_BUFFER_OFF (e)

canfunctions.h
291 CAN_CONFIG_DBL_BUFFER_OFF = 0b11101111, // XXX0XXXX

:: CAN_CONFIG_DBL_BUFFER_ON (e)

RB.c
488 CANInitialize(1,2,6,6,7,CAN_CONFIG_VALID_STD_MSG & CAN_CONFIG_DBL_BUFFER_ON); //works for 250kbps for 20Mhz
canfunctions.h
290 CAN_CONFIG_DBL_BUFFER_ON = 0b11111111, // XXX1XXXX

:: CAN_CONFIG_DEFAULT (e)

canfunctions.h
271 CAN_CONFIG_DEFAULT = 0b11111111, // 11111111

:: CAN_CONFIG_LINE_FILTER_BIT (e)

canfunctions.c
114 //if ( flags & CAN_CONFIG_LINE_FILTER_BIT )
canfunctions.h
277 CAN_CONFIG_LINE_FILTER_BIT = 0b00000010,

:: CAN_CONFIG_LINE_FILTER_OFF (e)

canfunctions.h
279 CAN_CONFIG_LINE_FILTER_OFF = 0b11111101, // XXXXXX0X

:: CAN_CONFIG_LINE_FILTER_ON (e)

canfunctions.h
278 CAN_CONFIG_LINE_FILTER_ON = 0b11111111, // XXXXXX1X

:: CAN_CONFIG_MSG_BITS (e)

canfunctions.c
204 *RXB0CON = config & CAN_CONFIG_MSG_BITS; //dgi changed
224 switch( (config & CAN_CONFIG_MSG_BITS) | ~CAN_CONFIG_MSG_BITS )
canfunctions.h
293 CAN_CONFIG_MSG_BITS = 0b01100000,

:: CAN_CONFIG_MSG_TYPE_BIT (e)

canfunctions.h
285 CAN_CONFIG_MSG_TYPE_BIT = 0b00001000,

:: CAN_CONFIG_PHSEG2_PRG_BIT (e)

canfunctions.c
109 if ( flags & CAN_CONFIG_PHSEG2_PRG_BIT )
canfunctions.h
273 CAN_CONFIG_PHSEG2_PRG_BIT = 0b00000001,

:: CAN_CONFIG_PHSEG2_PRG_OFF (e)

canfunctions.h
275 CAN_CONFIG_PHSEG2_PRG_OFF = 0b11111110, // XXXXXXX0

:: CAN_CONFIG_PHSEG2_PRG_ON (e)

canfunctions.h
274 CAN_CONFIG_PHSEG2_PRG_ON = 0b11111111, // XXXXXXX1

:: CAN_CONFIG_SAMPLE_BIT (e)

canfunctions.c
106 if ( !(flags & CAN_CONFIG_SAMPLE_BIT) )
canfunctions.h
281 CAN_CONFIG_SAMPLE_BIT = 0b00000100,

:: CAN_CONFIG_SAMPLE_ONCE (e)

canfunctions.h
282 CAN_CONFIG_SAMPLE_ONCE = 0b11111111, // XXXXX1XX

:: CAN_CONFIG_SAMPLE_THRICE (e)

canfunctions.h
283 CAN_CONFIG_SAMPLE_THRICE = 0b11111011, // XXXXX0XX

:: CAN_CONFIG_STD_MSG (e)

RB.c
509 CANSetMask(CAN_MASK_B1,CAN_MASK_ELEVEN_BITS , CAN_CONFIG_STD_MSG); // screen on the basis of all CAN-ID bits
510 CANSetFilter(CAN_FILTER_B1_F1, RB_DICT_REQ + RB_NODEID, CAN_CONFIG_STD_MSG); // allow SDO messages for own node
511 CANSetFilter(CAN_FILTER_B1_F2, RB_NMT, CAN_CONFIG_STD_MSG); // also allow NMT msg with NodeID 0 (master node).
514 CANSetMask(CAN_MASK_B2, CAN_MASK_ELEVEN_BITS, CAN_CONFIG_STD_MSG); // screen on the basis of all 11 bits
528 CANSetFilter(CAN_FILTER_B2_F1,RB_RXCONFIG_0, CAN_CONFIG_STD_MSG);
529 CANSetFilter(CAN_FILTER_B2_F2,RB_RXCONFIG_1, CAN_CONFIG_STD_MSG);
530 CANSetFilter(CAN_FILTER_B2_F3,RB_RXCONFIG_2, CAN_CONFIG_STD_MSG);
531 CANSetFilter(CAN_FILTER_B2_F4,RB_RXCONFIG_3, CAN_CONFIG_STD_MSG);
canfunctions.c
221 CANSetMask(CAN_MASK_B1, 0x00000000, CAN_CONFIG_STD_MSG);
222 CANSetMask(CAN_MASK_B2, 0x00000000, CAN_CONFIG_STD_MSG);
232 FilterConfig1 = CAN_CONFIG_STD_MSG;
233 FilterConfig2 = CAN_CONFIG_STD_MSG;
236 FilterConfig1 = CAN_CONFIG_STD_MSG;
297 CANIDToRegs(&TXB0SIDH,val,CAN_CONFIG_STD_MSG);
323 CANIDToRegs(&TXB1SIDH,val,CAN_CONFIG_STD_MSG);
347 CANIDToRegs(&TXB2SIDH,val,CAN_CONFIG_STD_MSG);
455// CANIDToRegs(&TXB0SIDH,val,CAN_CONFIG_STD_MSG); Do this inline - all four lines below
489 * CAN_CONFIG_XTD_MSG or CAN_CONFIG_STD_MSG
537 * CAN_CONFIG_XTD_MSG or CAN_CONFIG_STD_MSG
572 * CAN_CONFIG_XTD_MSG or CAN_CONFIG_STD_MSG
canfunctions.h
286 CAN_CONFIG_STD_MSG = 0b11111111, // XXXX1XXX

:: CAN_CONFIG_VALID_STD_MSG (e)

RB.c
488 CANInitialize(1,2,6,6,7,CAN_CONFIG_VALID_STD_MSG & CAN_CONFIG_DBL_BUFFER_ON); //works for 250kbps for 20Mhz
canfunctions.c
231 case CAN_CONFIG_VALID_STD_MSG:
canfunctions.h
296 CAN_CONFIG_VALID_STD_MSG = 0b10111111, // X01XXXXX

:: CAN_CONFIG_VALID_XTD_MSG (e)

canfunctions.c
176 * If (config & CAN_CONFIG_VALID_XTD_MSG)
226 case CAN_CONFIG_VALID_XTD_MSG:
canfunctions.h
295 CAN_CONFIG_VALID_XTD_MSG = 0b11011111, // X10XXXXX

:: CAN_CONFIG_XTD_MSG (e)

canfunctions.c
227 FilterConfig1 = CAN_CONFIG_XTD_MSG;
228 FilterConfig2 = CAN_CONFIG_XTD_MSG;
237 FilterConfig2 = CAN_CONFIG_XTD_MSG;
295 CANIDToRegs(&TXB0SIDH,val,CAN_CONFIG_XTD_MSG);
321 CANIDToRegs(&TXB1SIDH,val,CAN_CONFIG_XTD_MSG);
345 CANIDToRegs(&TXB2SIDH,val,CAN_CONFIG_XTD_MSG);
489 * CAN_CONFIG_XTD_MSG or CAN_CONFIG_STD_MSG
537 * CAN_CONFIG_XTD_MSG or CAN_CONFIG_STD_MSG
572 * CAN_CONFIG_XTD_MSG or CAN_CONFIG_STD_MSG
canfunctions.h
287 CAN_CONFIG_XTD_MSG = 0b11110111, // XXXX0XXX

:: CAN_FILTER_B1_F1 (e)

RB.c
510 CANSetFilter(CAN_FILTER_B1_F1, RB_DICT_REQ + RB_NODEID, CAN_CONFIG_STD_MSG); // allow SDO messages for own node
canfunctions.c
243 CANSetFilter(CAN_FILTER_B1_F1, 0, FilterConfig1);
587 case CAN_FILTER_B1_F1:
canfunctions.h
329 CAN_FILTER_B1_F1,

:: CAN_FILTER_B1_F2 (e)

RB.c
511 CANSetFilter(CAN_FILTER_B1_F2, RB_NMT, CAN_CONFIG_STD_MSG); // also allow NMT msg with NodeID 0 (master node).
canfunctions.c
244 CANSetFilter(CAN_FILTER_B1_F2, 0, FilterConfig1);
591 case CAN_FILTER_B1_F2:
canfunctions.h
330 CAN_FILTER_B1_F2,

:: CAN_FILTER_B2_F1 (e)

RB.c
528 CANSetFilter(CAN_FILTER_B2_F1,RB_RXCONFIG_0, CAN_CONFIG_STD_MSG);
canfunctions.c
245 CANSetFilter(CAN_FILTER_B2_F1, 0, FilterConfig2);
595 case CAN_FILTER_B2_F1:
canfunctions.h
331 CAN_FILTER_B2_F1,

:: CAN_FILTER_B2_F2 (e)

RB.c
529 CANSetFilter(CAN_FILTER_B2_F2,RB_RXCONFIG_1, CAN_CONFIG_STD_MSG);
canfunctions.c
246 CANSetFilter(CAN_FILTER_B2_F2, 0, FilterConfig2);
599 case CAN_FILTER_B2_F2:
canfunctions.h
332 CAN_FILTER_B2_F2,

:: CAN_FILTER_B2_F3 (e)

RB.c
530 CANSetFilter(CAN_FILTER_B2_F3,RB_RXCONFIG_2, CAN_CONFIG_STD_MSG);
canfunctions.c
247 CANSetFilter(CAN_FILTER_B2_F3, 0, FilterConfig2);
603 case CAN_FILTER_B2_F3:
canfunctions.h
333 CAN_FILTER_B2_F3,

:: CAN_FILTER_B2_F4 (e)

RB.c
531 CANSetFilter(CAN_FILTER_B2_F4,RB_RXCONFIG_3, CAN_CONFIG_STD_MSG);
canfunctions.c
248 CANSetFilter(CAN_FILTER_B2_F4, 0, FilterConfig2);
canfunctions.h
334 CAN_FILTER_B2_F4

:: CAN_MASK_B1 (e)

RB.c
509 CANSetMask(CAN_MASK_B1,CAN_MASK_ELEVEN_BITS , CAN_CONFIG_STD_MSG); // screen on the basis of all CAN-ID bits
canfunctions.c
221 CANSetMask(CAN_MASK_B1, 0x00000000, CAN_CONFIG_STD_MSG);
551 if ( code == CAN_MASK_B1 )
canfunctions.h
313 CAN_MASK_B1,

:: CAN_MASK_B2 (e)

RB.c
514 CANSetMask(CAN_MASK_B2, CAN_MASK_ELEVEN_BITS, CAN_CONFIG_STD_MSG); // screen on the basis of all 11 bits
canfunctions.c
222 CANSetMask(CAN_MASK_B2, 0x00000000, CAN_CONFIG_STD_MSG);
canfunctions.h
314 CAN_MASK_B2

:: CAN_MASK_ELEVEN_BITS (d)

RB.c
509 CANSetMask(CAN_MASK_B1,CAN_MASK_ELEVEN_BITS , CAN_CONFIG_STD_MSG); // screen on the basis of all CAN-ID bits
514 CANSetMask(CAN_MASK_B2, CAN_MASK_ELEVEN_BITS, CAN_CONFIG_STD_MSG); // screen on the basis of all 11 bits
RB.h
187#define CAN_MASK_ELEVEN_BITS 0x07FF

:: CAN_MASK_RB_MESG (d)

RB.h
188#define CAN_MASK_RB_MESG 0x0700

:: CAN_MSG (t)

RB.c
448 CAN_MSG myMSG;
RB.h
126} CAN_MSG;
151CAN_MSG RBtPM[4]; // caches the TPDOs before they are sent.
153CAN_MSG RBrPM[4]; // caches the RPDOs when they are received. is this necessary?
154CAN_MSG URBhb; // heartbeat message buffer
155CAN_MSG URBStackRcv; // buffer used for incoming messages.
156CAN_MSG URBTxSDO; // buffer used for responding to an SDO request

:: CAN_OP_MODE_BITS (e)

canfunctions.c
143 while( (CANSTAT & CAN_OP_MODE_BITS) != mode );
canfunctions.h
250 CAN_OP_MODE_BITS = 0b11100000, // Use this to access opmode

:: CAN_OP_MODE_CONFIG (e)

RB.c
506 CANSetOperationMode(CAN_OP_MODE_CONFIG); // must be in config mode to change masks/filters
canfunctions.c
199 CANSetOperationMode(CAN_OP_MODE_CONFIG);
canfunctions.h
256 CAN_OP_MODE_CONFIG = 0b10000000

:: CAN_OP_MODE_LISTEN (e)

canfunctions.h
255 CAN_OP_MODE_LISTEN = 0b01100000,

:: CAN_OP_MODE_LOOP (e)

canfunctions.h
254 CAN_OP_MODE_LOOP = 0b01000000,

:: CAN_OP_MODE_NORMAL (e)

RB.c
542 CANSetOperationMode(CAN_OP_MODE_NORMAL); // turn the CAN back on after setting filters.
canfunctions.c
251 CANSetOperationMode(CAN_OP_MODE_NORMAL);
365 CANCON=CAN_OP_MODE_NORMAL;
441CANCON=CAN_OP_MODE_NORMAL;
472// CANCON=CAN_OP_MODE_NORMAL;
696 CANCON=CAN_OP_MODE_NORMAL;
751 CANCON=CAN_OP_MODE_NORMAL;
canfunctions.h
252 CAN_OP_MODE_NORMAL = 0b00000000,

:: CAN_OP_MODE_SLEEP (e)

canfunctions.h
253 CAN_OP_MODE_SLEEP = 0b00100000,

:: CAN_RX_DBL_BUFFERED (e)

canfunctions.c
725 *MsgFlags |= CAN_RX_DBL_BUFFERED;
canfunctions.h
379 CAN_RX_DBL_BUFFERED = 0b10000000 // Set if this message was

:: CAN_RX_FILTER_1 (e)

canfunctions.h
360 CAN_RX_FILTER_1 = 0b00000000,

:: CAN_RX_FILTER_2 (e)

canfunctions.h
361 CAN_RX_FILTER_2 = 0b00000001,

:: CAN_RX_FILTER_3 (e)

canfunctions.h
362 CAN_RX_FILTER_3 = 0b00000010,

:: CAN_RX_FILTER_4 (e)

canfunctions.h
363 CAN_RX_FILTER_4 = 0b00000011,

:: CAN_RX_FILTER_5 (e)

canfunctions.h
364 CAN_RX_FILTER_5 = 0b00000100,

:: CAN_RX_FILTER_6 (e)

canfunctions.h
365 CAN_RX_FILTER_6 = 0b00000101,

:: CAN_RX_FILTER_BITS (e)

canfunctions.c
670 *MsgFlags |= RXB0CON & CAN_RX_FILTER_BITS;
723 *MsgFlags |= RXB1CON & CAN_RX_FILTER_BITS;
canfunctions.h
358 CAN_RX_FILTER_BITS = 0b00000111, // Use this to access filter

:: CAN_RX_INVALID_MSG (e)

canfunctions.c
701 *MsgFlags |= CAN_RX_INVALID_MSG;
755 *MsgFlags |= CAN_RX_INVALID_MSG;
canfunctions.h
370 CAN_RX_INVALID_MSG = 0b00010000, // Set if invalid else

:: CAN_RX_OVERFLOW (e)

RB.c
582 if (RcvMessageFlags & CAN_RX_OVERFLOW) { // it's not clear what this flag means, but count it.
canfunctions.c
664 *MsgFlags |= CAN_RX_OVERFLOW;
719 *MsgFlags |= CAN_RX_OVERFLOW;
canfunctions.h
348 * if (MsgFlag & CAN_RX_OVERFLOW)
367 CAN_RX_OVERFLOW = 0b00001000, // Set if Overflowed else

:: CAN_RX_RTR_FRAME (e)

RB.c
578 if (RcvMessageFlags & (CAN_RX_XTD_FRAME | CAN_RX_RTR_FRAME)) { // don't accept these strange things.
canfunctions.c
681 *MsgFlags |= CAN_RX_RTR_FRAME;
733 *MsgFlags |= CAN_RX_RTR_FRAME;
canfunctions.h
376 CAN_RX_RTR_FRAME = 0b01000000, // Set if RTR message else

:: CAN_RX_XTD_FRAME (e)

RB.c
578 if (RcvMessageFlags & (CAN_RX_XTD_FRAME | CAN_RX_RTR_FRAME)) { // don't accept these strange things.
canfunctions.c
686 *MsgFlags |= CAN_RX_XTD_FRAME;
737 *MsgFlags |= CAN_RX_XTD_FRAME;
canfunctions.h
373 CAN_RX_XTD_FRAME = 0b00100000, // Set if XTD message else

:: CAN_TX_FRAME_BIT (e)

canfunctions.c
294 if ( !(MsgFlags & CAN_TX_FRAME_BIT) )
320 if ( !(MsgFlags & CAN_TX_FRAME_BIT) )
344 if ( !(MsgFlags & CAN_TX_FRAME_BIT) )
canfunctions.h
229 CAN_TX_FRAME_BIT = 0b00001000,

:: CAN_TX_NO_RTR_FRAME (e)

RB.c
173 CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME)))
428 CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME))
canfunctions.c
405CAN_TX_MSG_FLAGS localMsgFlags = CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME;
canfunctions.h
234 CAN_TX_NO_RTR_FRAME = 0b11111111, // X1XXXXXX

:: CAN_TX_PRIORITY_0 (e)

RB.c
173 CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME)))
412 CANSendMessage(URBhb.ID,2,URBhb.buf,URBhb.len, CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME);
428 CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME))
canfunctions.c
405CAN_TX_MSG_FLAGS localMsgFlags = CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME;
canfunctions.h
224 CAN_TX_PRIORITY_0 = 0b11111100, // XXXXXX00

:: CAN_TX_PRIORITY_1 (e)

canfunctions.h
225 CAN_TX_PRIORITY_1 = 0b11111101, // XXXXXX01

:: CAN_TX_PRIORITY_2 (e)

canfunctions.h
226 CAN_TX_PRIORITY_2 = 0b11111110, // XXXXXX10

:: CAN_TX_PRIORITY_3 (e)

canfunctions.h
227 CAN_TX_PRIORITY_3 = 0b11111111, // XXXXXX11

:: CAN_TX_PRIORITY_BITS (e)

canfunctions.c
290 TXB0CON |= MsgFlags & CAN_TX_PRIORITY_BITS;
316 TXB1CON |= MsgFlags & CAN_TX_PRIORITY_BITS;
340 TXB2CON |= MsgFlags & CAN_TX_PRIORITY_BITS;
451 TXB0CON |= localMsgFlags & CAN_TX_PRIORITY_BITS;
canfunctions.h
223 CAN_TX_PRIORITY_BITS= 0b00000011,

:: CAN_TX_RTR_BIT (e)

canfunctions.c
301 if ( !(MsgFlags & CAN_TX_RTR_BIT) )
327 if ( !(MsgFlags & CAN_TX_RTR_BIT) )
351 if ( !(MsgFlags & CAN_TX_RTR_BIT) )
463 if ( !(localMsgFlags & CAN_TX_RTR_BIT) )
canfunctions.h
233 CAN_TX_RTR_BIT = 0b01000000,

:: CAN_TX_RTR_FRAME (e)

canfunctions.h
235 CAN_TX_RTR_FRAME = 0b10111111 // X0XXXXXX

:: CAN_TX_STD_FRAME (e)

RB.c
173 CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME)))
412 CANSendMessage(URBhb.ID,2,URBhb.buf,URBhb.len, CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME);
428 CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME))
canfunctions.c
405CAN_TX_MSG_FLAGS localMsgFlags = CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME & CAN_TX_NO_RTR_FRAME;
506 if (type == CAN_TX_STD_FRAME)
canfunctions.h
230 CAN_TX_STD_FRAME = 0b11111111, // XXXXX1XX

:: CAN_TX_XTD_FRAME (e)

canfunctions.h
231 CAN_TX_XTD_FRAME = 0b11110111, // XXXXX0XX

:: CAngle ()

RCservo.c
74static sint16 CAngle = 0; //Callibration Target Position -9000 -- 9000
85 if (CAngle!=servoPosCommand)
86 {CAngle=servoPosCommand;

:: FEEDBACK (d)

RBapp.h
138{ 0x1001, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, FEEDBACK, "Feedback in Hz"},
66#define FEEDBACK 8
RCservo.c
67 RBReadEEPROM(&feed_freq,FEEDBACK, 2);
main.c
55 RBSetEEPROM(&tmp,FEEDBACK,2);

:: HSR_ReadEPPROM (f)

hsr_serial.c
138uint8 HSR_ReadEPPROM(uint8 addr)
hsr_serial.h
102uint8 HSR_ReadEPPROM(uint8 addr); //Read a Specific EPPROM location

:: HSR_ReadEPPROM_v2 (f)

hsr_serial.c
156void HSR_ReadEPPROM_v2(uint8 addr)
hsr_serial.h
103void HSR_ReadEPPROM_v2(uint8 addr); //Read a Specific EPPROM location

:: HSR_ReadMemory (f)

RCservo.c
33 PL=HSR_ReadMemory(_HSR_MEM_P1L);
34 PH=HSR_ReadMemory(_HSR_MEM_P1H);
36 D=HSR_ReadMemory(_HSR_MEM_P1D);
hsr_serial.c
201uint8 HSR_ReadMemory(uint8 addr)
hsr_serial.h
106uint8 HSR_ReadMemory(uint8 addr); //Read a specific memory location

:: HSR_ReadMemory_v2 (f)

hsr_serial.c
219void HSR_ReadMemory_v2(uint8 addr)
hsr_serial.h
107void HSR_ReadMemory_v2(uint8 addr); //Read a specific memory location

:: HSR_ReadPWM (f)

hsr_serial.c
341void HSR_ReadPWM(void)
hsr_serial.h
115void HSR_ReadPWM(void); // Read pulsewidth and voltage

:: HSR_ReadPWM_v2 (f)

hsr_serial.c
365void HSR_ReadPWM_v2(void)
hsr_serial.h
116void HSR_ReadPWM_v2(void); // Read pulsewidth and voltage

:: HSR_ReadPosition (f)

RCservo.c
100 { raw_adc = HSR_ReadPosition();
hsr_serial.c
498 CurServoPos = HSR_ReadPosition();
534 CurServoPos = HSR_ReadPosition();
572 CurServoPos = HSR_ReadPosition();
80uint16 HSR_ReadPosition(void)
hsr_serial.h
98uint16 HSR_ReadPosition(void); // Read Servo Position
main.c
81 raw_adc = HSR_ReadPosition();

:: HSR_ReadPosition_v2 (f)

hsr_serial.c
102void HSR_ReadPosition_v2(void)
296 HSR_ReadPosition_v2();//Read Current Position
hsr_serial.h
99void HSR_ReadPosition_v2(void); // Read Servo Position

:: HSR_ReadVerID (f)

hsr_serial.c
305void HSR_ReadVerID(void)
hsr_serial.h
113void HSR_ReadVerID(void); // Read servo version and id

:: HSR_ReadVerID_v2 (f)

hsr_serial.c
328void HSR_ReadVerID_v2(void)
hsr_serial.h
114void HSR_ReadVerID_v2(void); // Read servo version and id

:: HSR_Release (f)

hsr_serial.c
49void HSR_Release(void)
hsr_serial.h
96void HSR_Release(void); // Release Servo

:: HSR_Release_v2 (f)

RCservo.c
110 HSR_Release_v2(); //Go Limp
hsr_serial.c
68void HSR_Release_v2(void)
hsr_serial.h
97void HSR_Release_v2(void); // Release Servo

:: HSR_SelectControl (f)

RCservo.c
42 HSR_SelectControl(1);
46 HSR_SelectControl(3);}
51 HSR_SelectControl(1);
55 HSR_SelectControl(3);}
hsr_serial.c
417void HSR_SelectControl(uint8 ControlSet)
hsr_serial.h
119void HSR_SelectControl(uint8 ControlSet); // Select control parameter set

:: HSR_SelectControl_v2 (f)

hsr_serial.c
440void HSR_SelectControl_v2(uint8 ControlSet)
hsr_serial.h
120void HSR_SelectControl_v2(uint8 ControlSet); // Select control parameter set

:: HSR_SerialInitialization (f)

hsr_serial.c
34void HSR_SerialInitialization(void)
hsr_serial.h
95void HSR_SerialInitialization(void); // Initial Serial Configuration for HSR communication
main.c
72 HSR_SerialInitialization(); // Initial Serial Configuration for HSR communication

:: HSR_SetAction (f)

hsr_serial.c
490void HSR_SetAction(sint16 TargetAngle, uint16 ActionTime)
hsr_serial.h
123void HSR_SetAction(sint16 TargetAngle, uint16 ActionTime); //Set Action

:: HSR_SetAction_v2 (f)

hsr_serial.c
526void HSR_SetAction_v2(sint16 TargetAngle, uint16 ActionTime)
hsr_serial.h
124void HSR_SetAction_v2(sint16 TargetAngle, uint16 ActionTime); //Set Action

:: HSR_SetAction_v3 (f)

hsr_serial.c
563uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime)
hsr_serial.h
125uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime);//Set Action and estimaate time of motion

:: HSR_SetGoStop (f)

hsr_serial.c
455void HSR_SetGoStop(uint8 GoStop)
hsr_serial.h
121void HSR_SetGoStop(uint8 GoStop); // Set Go/Stop

:: HSR_SetGoStop_v2 (f)

hsr_serial.c
477void HSR_SetGoStop_v2(uint8 GoStop)
hsr_serial.h
122void HSR_SetGoStop_v2(uint8 GoStop); // Set Go/Stop

:: HSR_SetInitialPosition (f)

hsr_serial.c
293void HSR_SetInitialPosition(uint8 PosH, uint8 PosL)
hsr_serial.h
112void HSR_SetInitialPosition(uint8 PosH, uint8 PosL); // Smooth Startup

:: HSR_SetPosition (f)

RCservo.c
121 HSR_SetPosition(TargetPosH,TargetPosL);
96 HSR_SetPosition(TargetPosH,TargetPosL);
hsr_serial.c
264void HSR_SetPosition(uint8 PosH, uint8 PosL)
279void HSR_SetPosition(uint8 ServoID, uint8 PosH, uint8 PosL)
300 HSR_SetPosition(PosH, PosL);
521 HSR_SetPosition(TargetPosH,TargetPosL);
558 HSR_SetPosition(TargetPosH,TargetPosL);
600 HSR_SetPosition(TargetPosH,TargetPosL);
hsr_serial.h
110void HSR_SetPosition(uint8 PosH, uint8 PosL); //Set target position
111void HSR_SetPosition(uint8 ServoID, uint8 PosH, uint8 PosL); // Set target position of a specific servo. Overloaded version

:: HSR_SetSpeed (f)

hsr_serial.c
379void HSR_SetSpeed(uint8 ServoID, uint8 ServoSpeed)
hsr_serial.h
117void HSR_SetSpeed(uint8 ServoID, uint8 ServoSpeed);// Set the peed of a single servo using its ID and read its current position

:: HSR_SetSpeed_v2 (f)

hsr_serial.c
404void HSR_SetSpeed_v2(uint8 ServoID, uint8 ServoSpeed)
hsr_serial.h
118void HSR_SetSpeed_v2(uint8 ServoID, uint8 ServoSpeed);// Set the peed of a single servo using its ID and read its current position

:: HSR_WriteEPPROM (f)

hsr_serial.c
171void HSR_WriteEPPROM(uint8 addr, uint8 data)
hsr_serial.h
104void HSR_WriteEPPROM(uint8 addr, uint8 data); //Write one byte data to the EPPROM

:: HSR_WriteEPPROM_v2 (f)

hsr_serial.c
189void HSR_WriteEPPROM_v2(uint8 addr, uint8 data)
hsr_serial.h
105void HSR_WriteEPPROM_v2(uint8 addr, uint8 data); //Write one byte data to the EPPROM

:: HSR_WriteMemory (f)

RCservo.c
40 {HSR_WriteMemory(_HSR_MEM_P1H,make8(tmp,1));
41 HSR_WriteMemory(_HSR_MEM_P1L,make8(tmp,0));
50 {HSR_WriteMemory(_HSR_MEM_P1D,make8(tmp,0));
hsr_serial.c
234void HSR_WriteMemory(uint8 addr, uint8 data)
298 HSR_WriteMemory(_HSR_MEM_CurTargetPosL, _ServoPosL);
299 HSR_WriteMemory(_HSR_MEM_CurTargetPosH, _ServoPosH);
519 HSR_WriteMemory(_HSR_MEM_Speed, ActionSpeedByte);
520 HSR_WriteMemory(_HSR_MEM_CurSpeed, ActionSpeedByte);
556 HSR_WriteMemory(_HSR_MEM_Speed, ActionSpeedByte);
557 HSR_WriteMemory(_HSR_MEM_CurSpeed, ActionSpeedByte);
598 HSR_WriteMemory(_HSR_MEM_Speed, ActionSpeedByte);
599 HSR_WriteMemory(_HSR_MEM_CurSpeed, ActionSpeedByte);
hsr_serial.h
108void HSR_WriteMemory(uint8 addr, uint8 data); //Write Memory

:: HSR_WriteMemory_v2 (f)

RCservo.c
119 HSR_WriteMemory_v2(_HSR_MEM_Speed,ServoSpeed);
120 HSR_WriteMemory_v2(_HSR_MEM_CurSpeed, ServoSpeed);
94 HSR_WriteMemory_v2(_HSR_MEM_Speed,ServoSpeed);
95 HSR_WriteMemory_v2(_HSR_MEM_CurSpeed, ServoSpeed);
hsr_serial.c
252void HSR_WriteMemory_v2(uint8 addr, uint8 data)
hsr_serial.h
109void HSR_WriteMemory_v2(uint8 addr, uint8 data); //Write Memory

:: IsRxDataReady (f)

hsr_serial.c
116short IsRxDataReady(void)
hsr_serial.h
100short IsRxDataReady(void); // Is incoming data ready

:: NUM_FILTER (d)

RB.h
202#define NUM_FILTER 6

:: NUM_MASK (d)

RB.h
201#define NUM_MASK 2

:: OD_lookup (f)

RB.c
107 if (OD_lookup(0x1A00, entry_num))
113 if (OD_lookup(0x1A01, entry_num))
119 if (OD_lookup(0x1A02, entry_num))
125 if (OD_lookup(0x1A03, entry_num))
163 // OD_lookup and others. However, URB_Sizeof and translate_microchip_to_ieee
236bool OD_lookup(int16 index, int8& num)
278 if ( OD_lookup(index, entry_num) )
81 if (OD_lookup(0x1600, entry_num)) // if the PM exists,
87 if (OD_lookup(0x1601, entry_num)) // if the PM exists,
93 if (OD_lookup(0x1602, entry_num)) // if the PM exists,
99 if (OD_lookup(0x1603, entry_num)) // if the PM exists,
RB.h
178bool OD_lookup(int16 index, int8& num);

:: OD_read_data (f)

ODaccess.c
109int OD_read_data(char* dest, int num, uint8 type)
RB.c
346 OD_read_data(&URBTxSDO.buf[4],entry_num,type);
370 OD_read_data(&URBTxSDO.buf[4],entry_num,type);

:: OD_write_data (f)

ODaccess.c
138int OD_write_data(char* source, int num, int type)
RB.c
367 OD_write_data(&data[4],entry_num,type);

:: RBReadEEPROM (f)

ODaccess.c
122 RBReadEEPROM(dest,(address & 0xFF),size);
28void RBReadEEPROM(byte *data, byte addr, byte len)
RCservo.c
38 RBReadEEPROM(&tmp,SERVO_KP,2);
48 RBReadEEPROM(&tmp,SERVO_KD,2);
58 RBReadEEPROM(&tmp,SERVO_SPEED,2);
61 RBReadEEPROM(&commandCenter, SERVO_CAL_CMD_CENTER, 2);
62 RBReadEEPROM(&tmpAmplitude, SERVO_CAL_CMD_AMPLITUDE, 2);
64 RBReadEEPROM(&tmps,SERVO_START_POS, 2);
67 RBReadEEPROM(&feed_freq,FEEDBACK, 2);

:: RBSetEEPROM (f)

ODaccess.c
154 RBSetEEPROM(source,(address & 0xFF),size);
19void RBSetEEPROM(int *data, byte addr, int len)
RCservo.c
45 {RBSetEEPROM(&P,SERVO_KP, 2);
54 {RBSetEEPROM(&D16,SERVO_KD, 2);
main.c
46 RBSetEEPROM(&tmps,SERVO_START_POS,2);
48 RBSetEEPROM(&tmp,SERVO_KP, 2);
50 RBSetEEPROM(&tmp,SERVO_KD,2);
53 RBSetEEPROM(&tmp,SERVO_SPEED,2);
55 RBSetEEPROM(&tmp,FEEDBACK,2);
57 RBSetEEPROM(&tmp,SERVO_CAL_CMD_CENTER,2);
59 RBSetEEPROM(&tmps,SERVO_CAL_CMD_AMPLITUDE,2);

:: RB_ALL (d)

RB.h
199#define RB_ALL 0x0700

:: RB_App_ResetApp (f)

RB.c
47// Initialize. called by RB_App_ResetApp from main().
600 RB_App_ResetApp();
RB.h
183void RB_App_ResetApp(void);
main.c
63void RB_App_ResetApp()
91 RB_App_ResetApp();

:: RB_App_SetFactoryDefaults (f)

RB.c
473 RB_App_SetFactoryDefaults();
RB.h
184void RB_App_SetFactoryDefaults(void);
main.c
37// RB_App_SetFactoryDefaults is a callback, and is called only once,
40void RB_App_SetFactoryDefaults()

:: RB_COMMAND (d)

RB.c
519 RB_RXCONFIG_0 = RB_NODEID + RB_COMMAND;
RB.h
191#define RB_COMMAND 0x0100
RBapp.h
93CONST UINT16 RB_RXMAPPING_0_DEFAULT = RB_COMMAND + RB_NODEID_DEFAULT;

:: RB_DICT_REQ (d)

RB.c
510 CANSetFilter(CAN_FILTER_B1_F1, RB_DICT_REQ + RB_NODEID, CAN_CONFIG_STD_MSG); // allow SDO messages for own node
610 else if (URBStackRcv.ID == RB_DICT_REQ + RB_NODEID) // is it an SDO request?
RB.h
196#define RB_DICT_REQ 0x0600

:: RB_DICT_RESP (d)

RB.c
292 URBTxSDO.ID = RB_DICT_RESP + RB_NODEID;
RB.h
195#define RB_DICT_RESP 0x0500

:: RB_EEPROM_NODEID (d)

RB.c
466 RB_NODEID = read_eeprom(RB_EEPROM_NODEID);
471 write_eeprom( RB_EEPROM_NODEID, RB_NODEID_DEFAULT);
475 RB_NODEID = read_eeprom(RB_EEPROM_NODEID);
RB.h
169#define RB_EEPROM_NODEID 0x80 // single byte stores the Node ID (can be 1-127)
RBapp.h
137{ 0x1000, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_IDENTITY, RB_EEPROM_NODEID, "V1.4"}, // name of device goes here

:: RB_END_OF_DICTIONARY (d)

RB.h
112#define RB_END_OF_DICTIONARY {0x0000,0,0,0,0}
RBapp.h
160RB_END_OF_DICTIONARY // end of dictionary marker

:: RB_Get_Rx_Map_Address (f)

ODaccess.c
282char* RB_Get_Rx_Map_Address(uint8 bufNum, uint8 mapCount)
RB.c
458 memcpy(RB_Get_Rx_Map_Address(myBuf,mapCount), &data[bufCount], URB_Sizeof(type));

:: RB_Get_Rx_Map_Index (f)

ODaccess.c
218uint16 RB_Get_Rx_Map_Index(uint8 bufNum, uint8 mapCount)
RB.c
201 tmpIndex = RB_Get_Rx_Map_Index(myBufNum, subindex-2);

:: RB_Get_Rx_Map_Type (f)

ODaccess.c
250uint8 RB_Get_Rx_Map_Type(uint8 bufNum, uint8 mapCount)
RB.c
457 type = RB_Get_Rx_Map_Type(myBuf,mapCount);

:: RB_Get_Rx_Mapping_Length (f)

ODaccess.c
166uint8 RB_Get_Rx_Mapping_Length(uint8 myBuf)
RB.c
196 tmpIndex = RB_Get_Rx_Mapping_Length(myBufNum);
451 numMappings = RB_Get_Rx_Mapping_Length(myBuf);

:: RB_Get_Tx_Map_Address (f)

ODaccess.c
266char* RB_Get_Tx_Map_Address(uint8 bufNum, uint8 mapCount)
RB.c
145 memcpy(&RBtPM[myBufNum].buf[RBtPM[myBufNum].len], RB_Get_Tx_Map_Address(myBufNum,mapCount), URB_Sizeof(type));

:: RB_Get_Tx_Map_Index (f)

ODaccess.c
202uint16 RB_Get_Tx_Map_Index(uint8 bufNum, uint8 mapCount)
RB.c
216 tmpIndex = RB_Get_Tx_Map_Index(myBufNum, subindex-2);

:: RB_Get_Tx_Map_Type (f)

ODaccess.c
234uint8 RB_Get_Tx_Map_Type(uint8 bufNum, uint8 mapCount)
RB.c
144 type = RB_Get_Tx_Map_Type(myBufNum,mapCount);

:: RB_Get_Tx_Mapping_Length (f)

ODaccess.c
184uint8 RB_Get_Tx_Mapping_Length(uint8 myBuf)
RB.c
139 numMappings = RB_Get_Tx_Mapping_Length(myBufNum);
211 tmpIndex = RB_Get_Tx_Mapping_Length(myBufNum);

:: RB_HEARTBEAT (d)

RB.c
478 URBhb.ID = RB_HEARTBEAT + (int16) RB_NODEID;
RB.h
197#define RB_HEARTBEAT 0x0700

:: RB_Handle_Mapping_Request (f)

RB.c
181void RB_Handle_Mapping_Request(int16 index, int8 subindex)
326 RB_Handle_Mapping_Request(index,subindex);
RB.h
177void RB_Handle_Mapping_Request(int16 index, int8 subindex);

:: RB_Initialize (f)

RB.c
51void RB_Initialize() {
main.c
38// by RB_Initialize, on first power up after wiping the ROM.
69 RB_Initialize();

:: RB_MEDIA_BIT (d)

ODaccess.c
118 if ( (objectDictionary[num].permissions & RB_MEDIA_BIT) == RB_MEDIA_NONV )
150 if ( (objectDictionary[num].permissions & RB_MEDIA_BIT) == RB_MEDIA_NONV )
RB.h
84#define RB_MEDIA_BIT 0b10000000

:: RB_MEDIA_NONV (d)

ODaccess.c
118 if ( (objectDictionary[num].permissions & RB_MEDIA_BIT) == RB_MEDIA_NONV )
150 if ( (objectDictionary[num].permissions & RB_MEDIA_BIT) == RB_MEDIA_NONV )
RB.h
85#define RB_MEDIA_NONV 0b10000000
RBapp.h
137{ 0x1000, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_IDENTITY, RB_EEPROM_NODEID, "V1.4"}, // name of device goes here
138{ 0x1001, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, FEEDBACK, "Feedback in Hz"},
145{ 0x1020, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_SINT16, SERVO_CAL_CMD_CENTER, "calccent"},
146{ 0x1021, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_CAL_CMD_AMPLITUDE,"calcamp"},
148//{ 0x1024, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_KP,"KP for position control"},
149//{ 0x1025, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_KD,"KD for position control"},
150{ 0x1026, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_SPEED,"Initial Speed at startup"},
151{ 0x1027, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_SINT16, SERVO_START_POS,"Initial Position"},

:: RB_MEDIA_RAM (d)

RB.h
86#define RB_MEDIA_RAM 0b00000000
RBapp.h
140{ 0x1050, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_SINT16, &servoPosCommand, "poscomm"},
141{ 0x1051, RB_MEDIA_RAM | RB_PERM_READONLY, RB_TYPE_SINT16, &actualPos, "Actual Pos"},
142{ 0x1052, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_UINT8, &ServoSpeed, "Current speed"},
144{ 0x1014, RB_MEDIA_RAM | RB_PERM_READONLY, RB_TYPE_UINT16, &raw_adc, "rawADC"},
153{ 0x1060, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_BOOLEAN, &calMode, "calMode"},

:: RB_MEDIA_ROM (d)

RB.h
87#define RB_MEDIA_ROM 0b00000000 // this one isn't used
RBapp.h
155{ 0x1800, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_CONFIG, &RB_TXCONFIG_0, "posfeed"} // Tx PM Config
156{ 0x1A00, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_MAPPING, RB_NULL, RB_NULL}, // Tx Mapping
158{ 0x1400, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_CONFIG, &RB_RXCONFIG_0, "poscomm PMID"}, // Rx PM Config
159{ 0x1600, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_MAPPING, RB_NULL, RB_NULL}, // Rx Mapping

:: RB_MSG_DICT_READ (d)

RB.c
298 if (cmd == RB_MSG_DICT_READ)
RB.h
75#define RB_MSG_DICT_READ 0x40

:: RB_MSG_DICT_WRITE (d)

RB.c
358 else if (cmd == RB_MSG_DICT_WRITE)
RB.h
76#define RB_MSG_DICT_WRITE 0x20

:: RB_NEIGHBOR (d)

RB.h
194#define RB_NEIGHBOR 0x0400

:: RB_NMT (d)

RB.c
511 CANSetFilter(CAN_FILTER_B1_F2, RB_NMT, CAN_CONFIG_STD_MSG); // also allow NMT msg with NodeID 0 (master node).
RB.h
190#define RB_NMT 0x0000

:: RB_NODEID (v)

RB.c
292 URBTxSDO.ID = RB_DICT_RESP + RB_NODEID;
466 RB_NODEID = read_eeprom(RB_EEPROM_NODEID);
469 if ((RB_NODEID == 0) || (RB_NODEID > 253))
475 RB_NODEID = read_eeprom(RB_EEPROM_NODEID);
478 URBhb.ID = RB_HEARTBEAT + (int16) RB_NODEID;
510 CANSetFilter(CAN_FILTER_B1_F1, RB_DICT_REQ + RB_NODEID, CAN_CONFIG_STD_MSG); // allow SDO messages for own node
519 RB_RXCONFIG_0 = RB_NODEID + RB_COMMAND;
520 RB_RXCONFIG_1 = RB_NODEID + RB_USART;
534 RB_TXCONFIG_0 = RB_NODEID + RB_SENSOR;
589 if ((URBStackRcv.buf[1] == RB_NODEID) || (URBStackRcv.buf[1] == 0)) {
610 else if (URBStackRcv.ID == RB_DICT_REQ + RB_NODEID) // is it an SDO request?
RB.h
160uint8 RB_NODEID=0;
19 Added "MEDIA" const and uint8 RB_NODEID variable, and changed many of the
usart.c
90 TXREG = RB_NODEID;

:: RB_NODEID_DEFAULT (d)

RB.c
471 write_eeprom( RB_EEPROM_NODEID, RB_NODEID_DEFAULT);
RBapp.h
113CONST UINT16 RB_TXMAPPING_0_DEFAULT = RB_SENSOR + RB_NODEID_DEFAULT;
47#define RB_NODEID_DEFAULT 0x22
93CONST UINT16 RB_RXMAPPING_0_DEFAULT = RB_COMMAND + RB_NODEID_DEFAULT;

:: RB_NODE_RESET (d)

RB.c
599 case RB_NODE_RESET:
RB.h
200#define RB_NODE_RESET 129

:: RB_NULL (d)

RB.c
521 RB_RXCONFIG_2 = RB_NULL;
522 RB_RXCONFIG_3 = RB_NULL;
RB.h
114#define RB_NULL 0
RBapp.h
101CONST UINT16 RB_RXMAPPING_1_DEFAULT = RB_NULL;
105CONST UINT16 RB_RXMAPPING_2_DEFAULT = RB_NULL;
109CONST UINT16 RB_RXMAPPING_3_DEFAULT = RB_NULL;
120CONST UINT16 RB_TXMAPPING_1_DEFAULT = RB_NULL;
124CONST UINT16 RB_TXMAPPING_2_DEFAULT = RB_NULL;
128CONST UINT16 RB_TXMAPPING_3_DEFAULT = RB_NULL;
156{ 0x1A00, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_MAPPING, RB_NULL, RB_NULL}, // Tx Mapping
159{ 0x1600, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_MAPPING, RB_NULL, RB_NULL}, // Rx Mapping

:: RB_PERM_BITS (d)

RB.c
314 URBTxSDO.buf[4] = (permissions & RB_PERM_BITS);
RB.h
91#define RB_PERM_BITS 0b00000011

:: RB_PERM_READONLY (d)

RB.h
93#define RB_PERM_READONLY 0b00000001
RBapp.h
141{ 0x1051, RB_MEDIA_RAM | RB_PERM_READONLY, RB_TYPE_SINT16, &actualPos, "Actual Pos"},
144{ 0x1014, RB_MEDIA_RAM | RB_PERM_READONLY, RB_TYPE_UINT16, &raw_adc, "rawADC"},
155{ 0x1800, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_CONFIG, &RB_TXCONFIG_0, "posfeed"} // Tx PM Config
156{ 0x1A00, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_MAPPING, RB_NULL, RB_NULL}, // Tx Mapping
158{ 0x1400, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_CONFIG, &RB_RXCONFIG_0, "poscomm PMID"}, // Rx PM Config
159{ 0x1600, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_MAPPING, RB_NULL, RB_NULL}, // Rx Mapping

:: RB_PERM_READWRITE (d)

RB.h
94#define RB_PERM_READWRITE 0b00000011
RBapp.h
137{ 0x1000, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_IDENTITY, RB_EEPROM_NODEID, "V1.4"}, // name of device goes here
138{ 0x1001, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, FEEDBACK, "Feedback in Hz"},
140{ 0x1050, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_SINT16, &servoPosCommand, "poscomm"},
142{ 0x1052, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_UINT8, &ServoSpeed, "Current speed"},
145{ 0x1020, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_SINT16, SERVO_CAL_CMD_CENTER, "calccent"},
146{ 0x1021, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_CAL_CMD_AMPLITUDE,"calcamp"},
148//{ 0x1024, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_KP,"KP for position control"},
149//{ 0x1025, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_KD,"KD for position control"},
150{ 0x1026, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_SPEED,"Initial Speed at startup"},
151{ 0x1027, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_SINT16, SERVO_START_POS,"Initial Position"},
153{ 0x1060, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_BOOLEAN, &calMode, "calMode"},

:: RB_PERM_READ_BIT (d)

RB.c
344 else if ((subindex == 1) && (permissions & RB_PERM_READ_BIT))
RB.h
92#define RB_PERM_READ_BIT 0b00000001

:: RB_PERM_WRITEONLY (d)

RB.h
96#define RB_PERM_WRITEONLY 0b00000010

:: RB_PERM_WRITE_BIT (d)

RB.c
361 if ((permissions & RB_PERM_WRITE_BIT) && (subindex == 1))
RB.h
95#define RB_PERM_WRITE_BIT 0b00000010

:: RB_PM_SetDefaults (f)

RB.c
472 RB_PM_SetDefaults(); // set identifiers on Process Messages
75void RB_PM_SetDefaults(void) {
RB.h
176void RB_PM_SetDefaults(void);

:: RB_ProcessStack (f)

RB.c
48// Also may be called by the main loop (RB_ProcessStack).
569byte RB_ProcessStack() {
main.c
36// it can be called at any time by RB_ProcessStack();
99 RB_ProcessStack();

:: RB_Process_Outgoing_PM (f)

RB.c
422bool RB_Process_Outgoing_PM() {
638 ret_val |= RB_Process_Outgoing_PM();

:: RB_RXCONFIG_0 (v)

RB.c
519 RB_RXCONFIG_0 = RB_NODEID + RB_COMMAND;
524 RBrPM[0].ID = RB_RXCONFIG_0;
528 CANSetFilter(CAN_FILTER_B2_F1,RB_RXCONFIG_0, CAN_CONFIG_STD_MSG);
85 RB_RXCONFIG_0 = tmpIdent;
RB.h
204uint16 RB_RXCONFIG_0;
RBapp.h
158{ 0x1400, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_CONFIG, &RB_RXCONFIG_0, "poscomm PMID"}, // Rx PM Config

:: RB_RXCONFIG_1 (v)

RB.c
520 RB_RXCONFIG_1 = RB_NODEID + RB_USART;
525 RBrPM[1].ID = RB_RXCONFIG_1;
529 CANSetFilter(CAN_FILTER_B2_F2,RB_RXCONFIG_1, CAN_CONFIG_STD_MSG);
91 RB_RXCONFIG_1 = tmpIdent;
RB.h
205uint16 RB_RXCONFIG_1;

:: RB_RXCONFIG_2 (v)

RB.c
521 RB_RXCONFIG_2 = RB_NULL;
526 RBrPM[2].ID = RB_RXCONFIG_2;
530 CANSetFilter(CAN_FILTER_B2_F3,RB_RXCONFIG_2, CAN_CONFIG_STD_MSG);
97 RB_RXCONFIG_2 = tmpIdent;
RB.h
206uint16 RB_RXCONFIG_2;

:: RB_RXCONFIG_3 (v)

RB.c
103 RB_RXCONFIG_3 = tmpIdent;
522 RB_RXCONFIG_3 = RB_NULL;
527 RBrPM[3].ID = RB_RXCONFIG_3;
531 CANSetFilter(CAN_FILTER_B2_F4,RB_RXCONFIG_3, CAN_CONFIG_STD_MSG);
RB.h
207uint16 RB_RXCONFIG_3;

:: RB_RXMAPPING_0 (v)

ODaccess.c
222 case (0): tmp = RB_RXMAPPING_0[mapCount].index;
254 case (0): tmp = RB_RXMAPPING_0[mapCount].data_type;
286 case (0): tmp = RB_RXMAPPING_0[mapCount].address;
RBapp.h
87 RB_RXMAPPING_0 - RB_RXMAPPING_3
94CONST pm_map RB_RXMAPPING_0[] =

:: RB_RXMAPPING_0_DEFAULT (v)

RB.c
82 tmpIdent = RB_RXMAPPING_0_DEFAULT;
RBapp.h
93CONST UINT16 RB_RXMAPPING_0_DEFAULT = RB_COMMAND + RB_NODEID_DEFAULT;

:: RB_RXMAPPING_0_LENGTH (v)

ODaccess.c
170 case (0): tmp = RB_RXMAPPING_0_LENGTH;
RBapp.h
92CONST UINT8 RB_RXMAPPING_0_LENGTH = 1;

:: RB_RXMAPPING_1 (v)

ODaccess.c
224 case (1): tmp = RB_RXMAPPING_1[mapCount].index;
256 case (1): tmp = RB_RXMAPPING_1[mapCount].data_type;
288 case (1): tmp = RB_RXMAPPING_1[mapCount].address;
RBapp.h
102CONST pm_map RB_RXMAPPING_1[] = RB_UNUSED_MAP;

:: RB_RXMAPPING_1_DEFAULT (v)

RB.c
88 tmpIdent = RB_RXMAPPING_1_DEFAULT;
RBapp.h
101CONST UINT16 RB_RXMAPPING_1_DEFAULT = RB_NULL;

:: RB_RXMAPPING_1_LENGTH (v)

ODaccess.c
172 case (1): tmp = RB_RXMAPPING_1_LENGTH;
RBapp.h
100CONST UINT8 RB_RXMAPPING_1_LENGTH = 0;

:: RB_RXMAPPING_2 (v)

ODaccess.c
226 case (2): tmp = RB_RXMAPPING_2[mapCount].index;
258 case (2): tmp = RB_RXMAPPING_2[mapCount].data_type;
290 case (2): tmp = RB_RXMAPPING_2[mapCount].address;
RBapp.h
106CONST pm_map RB_RXMAPPING_2[] = RB_UNUSED_MAP;

:: RB_RXMAPPING_2_DEFAULT (v)

RB.c
94 tmpIdent = RB_RXMAPPING_2_DEFAULT;
RBapp.h
105CONST UINT16 RB_RXMAPPING_2_DEFAULT = RB_NULL;

:: RB_RXMAPPING_2_LENGTH (v)

ODaccess.c
174 case (2): tmp = RB_RXMAPPING_2_LENGTH;
RBapp.h
104CONST UINT8 RB_RXMAPPING_2_LENGTH = 0;

:: RB_RXMAPPING_3 (v)

ODaccess.c
228 case (3): tmp = RB_RXMAPPING_3[mapCount].index;
260 case (3): tmp = RB_RXMAPPING_3[mapCount].data_type;
292 case (3): tmp = RB_RXMAPPING_3[mapCount].address;
RBapp.h
110CONST pm_map RB_RXMAPPING_3[] = RB_UNUSED_MAP;
87 RB_RXMAPPING_0 - RB_RXMAPPING_3

:: RB_RXMAPPING_3_DEFAULT (v)

RB.c
100 tmpIdent = RB_RXMAPPING_3_DEFAULT;
RBapp.h
109CONST UINT16 RB_RXMAPPING_3_DEFAULT = RB_NULL;

:: RB_RXMAPPING_3_LENGTH (v)

ODaccess.c
176 case (3): tmp = RB_RXMAPPING_3_LENGTH;
RBapp.h
108CONST UINT8 RB_RXMAPPING_3_LENGTH = 0;

:: RB_SENSOR (d)

RB.c
534 RB_TXCONFIG_0 = RB_NODEID + RB_SENSOR;
RB.h
192#define RB_SENSOR 0x0200
RBapp.h
113CONST UINT16 RB_TXMAPPING_0_DEFAULT = RB_SENSOR + RB_NODEID_DEFAULT;

:: RB_Send_PM (f)

RB.c
133void RB_Send_PM(byte myBufNum)
167} // end of RB_Send_PM()
main.c
84 RB_Send_PM(0);

:: RB_TXCONFIG_0 (v)

RB.c
111 RB_TXCONFIG_0 = tmpIdent;
534 RB_TXCONFIG_0 = RB_NODEID + RB_SENSOR;
538 RBtPM[0].ID = RB_TXCONFIG_0;
RB.h
208uint16 RB_TXCONFIG_0;
RBapp.h
155{ 0x1800, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_CONFIG, &RB_TXCONFIG_0, "posfeed"} // Tx PM Config

:: RB_TXCONFIG_1 (v)

RB.c
117 RB_TXCONFIG_1 = tmpIdent;
535 RB_TXCONFIG_1 = 0;
539 RBtPM[1].ID = RB_TXCONFIG_1;
RB.h
209uint16 RB_TXCONFIG_1;

:: RB_TXCONFIG_2 (v)

RB.c
123 RB_TXCONFIG_2 = tmpIdent;
536 RB_TXCONFIG_2 = 0;
540 RBtPM[2].ID = RB_TXCONFIG_2;
RB.h
210uint16 RB_TXCONFIG_2;

:: RB_TXCONFIG_3 (v)

RB.c
129 RB_TXCONFIG_3 = tmpIdent;
537 RB_TXCONFIG_3 = 0;
541 RBtPM[3].ID = RB_TXCONFIG_3;
RB.h
211uint16 RB_TXCONFIG_3;

:: RB_TXMAPPING_0 (v)

ODaccess.c
206 case (0): tmp = RB_TXMAPPING_0[mapCount].index;
238 case (0): tmp = RB_TXMAPPING_0[mapCount].data_type;
270 case (0): tmp = RB_TXMAPPING_0[mapCount].address;
RBapp.h
114CONST pm_map RB_TXMAPPING_0[] =
88 RB_TXMAPPING_0 - RB_TXMAPPING_3

:: RB_TXMAPPING_0_DEFAULT (v)

RB.c
108 tmpIdent = RB_TXMAPPING_0_DEFAULT;
RBapp.h
113CONST UINT16 RB_TXMAPPING_0_DEFAULT = RB_SENSOR + RB_NODEID_DEFAULT;

:: RB_TXMAPPING_0_LENGTH (v)

ODaccess.c
188 case (0): tmp = RB_TXMAPPING_0_LENGTH;
RBapp.h
112CONST UINT8 RB_TXMAPPING_0_LENGTH = 1;

:: RB_TXMAPPING_1 (v)

ODaccess.c
208 case (1): tmp = RB_TXMAPPING_1[mapCount].index;
240 case (1): tmp = RB_TXMAPPING_1[mapCount].data_type;
272 case (1): tmp = RB_TXMAPPING_1[mapCount].address;
RBapp.h
121CONST pm_map RB_TXMAPPING_1[] = RB_UNUSED_MAP;

:: RB_TXMAPPING_1_DEFAULT (v)

RB.c
114 tmpIdent = RB_TXMAPPING_1_DEFAULT;
RBapp.h
120CONST UINT16 RB_TXMAPPING_1_DEFAULT = RB_NULL;

:: RB_TXMAPPING_1_LENGTH (v)

ODaccess.c
190 case (1): tmp = RB_TXMAPPING_1_LENGTH;
RBapp.h
119CONST UINT8 RB_TXMAPPING_1_LENGTH = 0;

:: RB_TXMAPPING_2 (v)

ODaccess.c
210 case (2): tmp = RB_TXMAPPING_2[mapCount].index;
242 case (2): tmp = RB_TXMAPPING_2[mapCount].data_type;
274 case (2): tmp = RB_TXMAPPING_2[mapCount].address;
RBapp.h
125CONST pm_map RB_TXMAPPING_2[] = RB_UNUSED_MAP;

:: RB_TXMAPPING_2_DEFAULT (v)

RB.c
120 tmpIdent = RB_TXMAPPING_2_DEFAULT;
RBapp.h
124CONST UINT16 RB_TXMAPPING_2_DEFAULT = RB_NULL;

:: RB_TXMAPPING_2_LENGTH (v)

ODaccess.c
192 case (2): tmp = RB_TXMAPPING_2_LENGTH;
RBapp.h
123CONST UINT8 RB_TXMAPPING_2_LENGTH = 0;

:: RB_TXMAPPING_3 (v)

ODaccess.c
212 case (3): tmp = RB_TXMAPPING_3[mapCount].index;
244 case (3): tmp = RB_TXMAPPING_3[mapCount].data_type;
276 case (3): tmp = RB_TXMAPPING_3[mapCount].address;
RBapp.h
129CONST pm_map RB_TXMAPPING_3[] = RB_UNUSED_MAP;
88 RB_TXMAPPING_0 - RB_TXMAPPING_3

:: RB_TXMAPPING_3_DEFAULT (v)

RB.c
126 tmpIdent = RB_TXMAPPING_3_DEFAULT;
RBapp.h
128CONST UINT16 RB_TXMAPPING_3_DEFAULT = RB_NULL;

:: RB_TXMAPPING_3_LENGTH (v)

ODaccess.c
194 case (3): tmp = RB_TXMAPPING_3_LENGTH;
RBapp.h
127CONST UINT8 RB_TXMAPPING_3_LENGTH = 0;

:: RB_TYPES (d)

RBTypes.h
1#ifndef RB_TYPES
2#define RB_TYPES

:: RB_TYPE_BOOLEAN (d)

ODaccess.c
45 case RB_TYPE_BOOLEAN: return 1; break;
RB.h
99#define RB_TYPE_BOOLEAN 0x41
RBapp.h
153{ 0x1060, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_BOOLEAN, &calMode, "calMode"},

:: RB_TYPE_FLOAT (d)

ODaccess.c
131 if (type == RB_TYPE_FLOAT)
145 if (type == RB_TYPE_FLOAT)
52 case RB_TYPE_FLOAT: return 4; break;
RB.c
146 if (type == RB_TYPE_FLOAT) URB_translate_microchip_to_ieee(&RBtPM[myBufNum].buf[RBtPM[myBufNum].len]);
459 if (type == RB_TYPE_FLOAT) URB_translate_ieee_to_microchip(&data[bufCount]);
RB.h
106#define RB_TYPE_FLOAT 0x48

:: RB_TYPE_IDENTITY (d)

ODaccess.c
53 case RB_TYPE_IDENTITY: return 1; break;
RB.h
109#define RB_TYPE_IDENTITY 0x63
RBapp.h
137{ 0x1000, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_IDENTITY, RB_EEPROM_NODEID, "V1.4"}, // name of device goes here

:: RB_TYPE_PM_CONFIG (d)

ODaccess.c
54 case RB_TYPE_PM_CONFIG: return 2; break;
RB.h
107#define RB_TYPE_PM_CONFIG 0x60
RBapp.h
155{ 0x1800, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_CONFIG, &RB_TXCONFIG_0, "posfeed"} // Tx PM Config
158{ 0x1400, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_CONFIG, &RB_RXCONFIG_0, "poscomm PMID"}, // Rx PM Config

:: RB_TYPE_PM_MAPPING (d)

RB.c
288 if (len | (type == RB_TYPE_PM_MAPPING)) // make sure length is valid, known type.
319 else if (type == RB_TYPE_PM_MAPPING)
RB.h
108#define RB_TYPE_PM_MAPPING 0x61
RBapp.h
156{ 0x1A00, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_MAPPING, RB_NULL, RB_NULL}, // Tx Mapping
159{ 0x1600, RB_MEDIA_ROM | RB_PERM_READONLY, RB_TYPE_PM_MAPPING, RB_NULL, RB_NULL}, // Rx Mapping

:: RB_TYPE_SINT16 (d)

ODaccess.c
47 case RB_TYPE_SINT16: return 2; break; // two bytes long,
RB.h
101#define RB_TYPE_SINT16 0x43
RBapp.h
116{0x1051, RB_TYPE_SINT16, &actualPos}
140{ 0x1050, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_SINT16, &servoPosCommand, "poscomm"},
141{ 0x1051, RB_MEDIA_RAM | RB_PERM_READONLY, RB_TYPE_SINT16, &actualPos, "Actual Pos"},
145{ 0x1020, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_SINT16, SERVO_CAL_CMD_CENTER, "calccent"},
151{ 0x1027, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_SINT16, SERVO_START_POS,"Initial Position"},
96{0x1050, RB_TYPE_SINT16, &servoPosCommand},

:: RB_TYPE_SINT32 (d)

ODaccess.c
48 case RB_TYPE_SINT32: return 4; break; // etc.
RB.h
102#define RB_TYPE_SINT32 0x44

:: RB_TYPE_SINT8 (d)

ODaccess.c
46 case RB_TYPE_SINT8: return 1; break; // one byte long,
RB.h
100#define RB_TYPE_SINT8 0x42

:: RB_TYPE_UINT16 (d)

ODaccess.c
50 case RB_TYPE_UINT16: return 2; break;
RB.h
104#define RB_TYPE_UINT16 0x46
RBapp.h
138{ 0x1001, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, FEEDBACK, "Feedback in Hz"},
144{ 0x1014, RB_MEDIA_RAM | RB_PERM_READONLY, RB_TYPE_UINT16, &raw_adc, "rawADC"},
146{ 0x1021, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_CAL_CMD_AMPLITUDE,"calcamp"},
148//{ 0x1024, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_KP,"KP for position control"},
149//{ 0x1025, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_KD,"KD for position control"},
150{ 0x1026, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_SPEED,"Initial Speed at startup"},

:: RB_TYPE_UINT32 (d)

ODaccess.c
51 case RB_TYPE_UINT32: return 4; break;
RB.h
105#define RB_TYPE_UINT32 0x47

:: RB_TYPE_UINT8 (d)

ODaccess.c
49 case RB_TYPE_UINT8: return 1; break;
RB.h
103#define RB_TYPE_UINT8 0x45
RBapp.h
142{ 0x1052, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_UINT8, &ServoSpeed, "Current speed"},
97{0x1052, RB_TYPE_UINT8, &servoSpeed},

:: RB_UNUSED_MAP (d)

RB.h
115#define RB_UNUSED_MAP {{0,0,0}}
RBapp.h
102CONST pm_map RB_RXMAPPING_1[] = RB_UNUSED_MAP;
106CONST pm_map RB_RXMAPPING_2[] = RB_UNUSED_MAP;
110CONST pm_map RB_RXMAPPING_3[] = RB_UNUSED_MAP;
121CONST pm_map RB_TXMAPPING_1[] = RB_UNUSED_MAP;
125CONST pm_map RB_TXMAPPING_2[] = RB_UNUSED_MAP;
129CONST pm_map RB_TXMAPPING_3[] = RB_UNUSED_MAP;

:: RB_USART (d)

RB.c
520 RB_RXCONFIG_1 = RB_NODEID + RB_USART;
RB.h
193#define RB_USART 0x0300

:: RB_reset_from_eeprom (f)

RB.c
464void RB_reset_from_eeprom()
RB.h
213void RB_reset_from_eeprom(void);
RBapp.h
50// this condition is because of the condition as set in RB_reset_from_eeprom()
main.c
68 RB_reset_from_eeprom();// reads node id from eeprom and resets variables associated with it

:: RB_setup_CAN (f)

RB.c
483void RB_setup_CAN()
63 RB_setup_CAN();
RB.h
214void RB_setup_CAN(void);

:: RBrPM (v)

RB.c
524 RBrPM[0].ID = RB_RXCONFIG_0;
525 RBrPM[1].ID = RB_RXCONFIG_1;
526 RBrPM[2].ID = RB_RXCONFIG_2;
527 RBrPM[3].ID = RB_RXCONFIG_3;
619 if (URBStackRcv.ID == RBrPM[0].ID)
622 else if (URBStackRcv.ID == RBrPM[1].ID)
625 else if (URBStackRcv.ID == RBrPM[2].ID)
628 else if (URBStackRcv.ID == RBrPM[3].ID)
RB.h
153CAN_MSG RBrPM[4]; // caches the RPDOs when they are received. is this necessary?

:: RBtPM (v)

RB.c
140 RBtPM[myBufNum].len=0;
145 memcpy(&RBtPM[myBufNum].buf[RBtPM[myBufNum].len], RB_Get_Tx_Map_Address(myBufNum,mapCount), URB_Sizeof(type));
146 if (type == RB_TYPE_FLOAT) URB_translate_microchip_to_ieee(&RBtPM[myBufNum].buf[RBtPM[myBufNum].len]);
147 RBtPM[myBufNum].len += URB_Sizeof(type);
427 if (CANSendMessage(RBtPM[i].ID,(i % 2),RBtPM[i].buf,RBtPM[i].len,
538 RBtPM[0].ID = RB_TXCONFIG_0;
539 RBtPM[1].ID = RB_TXCONFIG_1;
540 RBtPM[2].ID = RB_TXCONFIG_2;
541 RBtPM[3].ID = RB_TXCONFIG_3;
RB.h
151CAN_MSG RBtPM[4]; // caches the TPDOs before they are sent.

:: RBtPMready (v)

RB.c
149 RBtPMready[myBufNum] = TRUE;
426 if (RBtPMready[i])
432 RBtPMready[i] = FALSE;
546 RBtPMready[i] = FALSE; // no data ready to send
RB.h
152bool RBtPMready[4]; // flag to indicate ready to transmit.

:: RCservo_init (f)

RCservo.c
28void RCservo_init() {
main.c
70 RCservo_init(); // sets up servo default values

:: RXB0CON (d)

canfunctions.c
204 *RXB0CON = config & CAN_CONFIG_MSG_BITS; //dgi changed
208 *RXB1CON = *RXB0CON;
670 *MsgFlags |= RXB0CON & CAN_RX_FILTER_BITS;
canfunctions.h
117#define RXB0CON 0xF60

:: RXB0D0 (d)

canfunctions.c
694 Data[i] = *(RXB0D0+i);
canfunctions.h
179#define RXB0D0 0xF66

:: RXB0D1 (d)

canfunctions.h
180#define RXB0D1 0xF67

:: RXB0D2 (d)

canfunctions.h
181#define RXB0D2 0xF68

:: RXB0D3 (d)

canfunctions.h
182#define RXB0D3 0xF69

:: RXB0D4 (d)

canfunctions.h
183#define RXB0D4 0xF6A

:: RXB0D5 (d)

canfunctions.h
184#define RXB0D5 0xF6B

:: RXB0D6 (d)

canfunctions.h
185#define RXB0D6 0xF6C

:: RXB0D7 (d)

canfunctions.h
186#define RXB0D7 0xF6D

:: RXB0DLC (d)

canfunctions.c
676 *DataLen = *RXB0DLC & 0b00001111;
canfunctions.h
128#define RXB0DLC 0xF65

:: RXB0EIDH (d)

canfunctions.h
175#define RXB0EIDH 0xF63

:: RXB0EIDL (d)

canfunctions.h
176#define RXB0EIDL 0xF64

:: RXB0SIDH (d)

canfunctions.c
689 *id =((int32)(*RXB0SIDH)) * 8;
canfunctions.h
173#define RXB0SIDH 0xF61

:: RXB0SIDL (d)

canfunctions.c
690 *id |= (int32)(((*RXB0SIDL) & 0xE0)>>5);
canfunctions.h
174#define RXB0SIDL 0xF62

:: RXB1CON (d)

canfunctions.c
208 *RXB1CON = *RXB0CON;
723 *MsgFlags |= RXB1CON & CAN_RX_FILTER_BITS;
canfunctions.h
122#define RXB1CON 0xF50

:: RXB1D0 (d)

canfunctions.c
745 //ptr = RXB1D0;
747 Data[i] = *(RXB1D0+i);
canfunctions.h
199#define RXB1D0 0xF56

:: RXB1D1 (d)

canfunctions.h
200#define RXB1D1 0xF57

:: RXB1D2 (d)

canfunctions.h
201#define RXB1D2 0xF58

:: RXB1D3 (d)

canfunctions.h
202#define RXB1D3 0xF59

:: RXB1D4 (d)

canfunctions.h
203#define RXB1D4 0xF5A

:: RXB1D5 (d)

canfunctions.h
204#define RXB1D5 0xF5B

:: RXB1D6 (d)

canfunctions.h
205#define RXB1D6 0xF5C

:: RXB1D7 (d)

canfunctions.h
206#define RXB1D7 0xF5D

:: RXB1DLC (d)

canfunctions.c
729 *DataLen = *RXB1DLC & 0b00001111;
canfunctions.h
189#define RXB1DLC 0xF55

:: RXB1EIDH (d)

canfunctions.h
196#define RXB1EIDH 0xF53

:: RXB1EIDL (d)

canfunctions.h
197#define RXB1EIDL 0xF54

:: RXB1SIDH (d)

canfunctions.c
740 *id =((int32)(*RXB1SIDH)) * 8;
canfunctions.h
195#define RXB1SIDH 0xF51

:: RXB1SIDL (d)

canfunctions.c
741 *id |= (int32)(((*RXB1SIDL) & 0xE0)>>5);
canfunctions.h
192#define RXB1SIDL 0xF52

:: RXF0EIDH (d)

canfunctions.h
144#define RXF0EIDH 0xF02

:: RXF0EIDL (d)

canfunctions.h
145#define RXF0EIDL 0xF03

:: RXF0SIDH (d)

canfunctions.c
588 ptr = RXF0SIDH;
canfunctions.h
142#define RXF0SIDH 0xF00

:: RXF0SIDL (d)

canfunctions.h
143#define RXF0SIDL 0xF01

:: RXF1EIDH (d)

canfunctions.h
149#define RXF1EIDH 0xF06

:: RXF1EIDL (d)

canfunctions.h
150#define RXF1EIDL 0xF07

:: RXF1SIDH (d)

canfunctions.c
592 ptr = RXF1SIDH;
canfunctions.h
147#define RXF1SIDH 0xF04

:: RXF1SIDL (d)

canfunctions.h
148#define RXF1SIDL 0xF05

:: RXF2EIDH (d)

canfunctions.h
154#define RXF2EIDH 0xF0A

:: RXF2EIDL (d)

canfunctions.h
155#define RXF2EIDL 0xF0B

:: RXF2SIDH (d)

canfunctions.c
596 ptr = RXF2SIDH;
canfunctions.h
152#define RXF2SIDH 0xF08

:: RXF2SIDL (d)

canfunctions.h
153#define RXF2SIDL 0xF09

:: RXF3EIDH (d)

canfunctions.h
159#define RXF3EIDH 0xF0E

:: RXF3EIDL (d)

canfunctions.h
160#define RXF3EIDL 0xF0F

:: RXF3SIDH (d)

canfunctions.c
600 ptr = RXF3SIDH;
canfunctions.h
157#define RXF3SIDH 0xF0C

:: RXF3SIDL (d)

canfunctions.h
158#define RXF3SIDL 0xF0D

:: RXF4EIDH (d)

canfunctions.h
164#define RXF4EIDH 0xF12

:: RXF4EIDL (d)

canfunctions.h
165#define RXF4EIDL 0xF13

:: RXF4SIDH (d)

canfunctions.c
604 ptr = RXF4SIDH;
canfunctions.h
162#define RXF4SIDH 0xF10

:: RXF4SIDL (d)

canfunctions.h
163#define RXF4SIDL 0xF11

:: RXF5EIDH (d)

canfunctions.h
169#define RXF5EIDH 0xF16

:: RXF5EIDL (d)

canfunctions.h
170#define RXF5EIDL 0xF17

:: RXF5SIDH (d)

canfunctions.c
608 ptr = RXF5SIDH;
canfunctions.h
167#define RXF5SIDH 0xF14

:: RXF5SIDL (d)

canfunctions.h
168#define RXF5SIDL 0xF15

:: RXM0EIDH (d)

canfunctions.h
133#define RXM0EIDH 0xF1A

:: RXM0EIDL (d)

canfunctions.h
134#define RXM0EIDL 0xF1B

:: RXM0SIDH (d)

canfunctions.c
552 ptr = RXM0SIDH;
canfunctions.h
131#define RXM0SIDH 0xF18

:: RXM0SIDL (d)

canfunctions.h
132#define RXM0SIDL 0xF19

:: RXM1EIDH (d)

canfunctions.h
138#define RXM1EIDH 0xF1E

:: RXM1EIDL (d)

canfunctions.h
139#define RXM1EIDL 0xF1F

:: RXM1SIDH (d)

canfunctions.c
554 ptr = RXM1SIDH;
canfunctions.h
136#define RXM1SIDH 0xF1C

:: RXM1SIDL (d)

canfunctions.h
137#define RXM1SIDL 0xF1D

:: ReadPos (f)

main.c
79void ReadPos()
96 ReadPos();

:: SERVO_CAL_CMD_AMPLITUDE (d)

RBapp.h
146{ 0x1021, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_CAL_CMD_AMPLITUDE,"calcamp"},
61#define SERVO_CAL_CMD_AMPLITUDE 4
RCservo.c
62 RBReadEEPROM(&tmpAmplitude, SERVO_CAL_CMD_AMPLITUDE, 2);
main.c
59 RBSetEEPROM(&tmps,SERVO_CAL_CMD_AMPLITUDE,2);

:: SERVO_CAL_CMD_CENTER (d)

RBapp.h
145{ 0x1020, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_SINT16, SERVO_CAL_CMD_CENTER, "calccent"},
60#define SERVO_CAL_CMD_CENTER 2
RCservo.c
61 RBReadEEPROM(&commandCenter, SERVO_CAL_CMD_CENTER, 2);
main.c
57 RBSetEEPROM(&tmp,SERVO_CAL_CMD_CENTER,2);

:: SERVO_SPEED (d)

RBapp.h
150{ 0x1026, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_UINT16, SERVO_SPEED,"Initial Speed at startup"},
64#define SERVO_SPEED 12
RCservo.c
58 RBReadEEPROM(&tmp,SERVO_SPEED,2);
main.c
53 RBSetEEPROM(&tmp,SERVO_SPEED,2);

:: SERVO_START_POS (d)

RBapp.h
151{ 0x1027, RB_MEDIA_NONV | RB_PERM_READWRITE, RB_TYPE_SINT16, SERVO_START_POS,"Initial Position"},
65#define SERVO_START_POS 14
RCservo.c
64 RBReadEEPROM(&tmps,SERVO_START_POS, 2);
main.c
46 RBSetEEPROM(&tmps,SERVO_START_POS,2);

:: TAngle ()

RCservo.c
107 if (TAngle!=servoPosCommand)
108 {TAngle=servoPosCommand;
73static sint16 TAngle = 0; //Target Position -9000 -- 9000

:: TXB0D0 (d)

canfunctions.c
16on the ptr=TXB0D0; assignment. Appears that CCS does not accept
18this: *(TXB0D0+i) = Data[i];
306 *(TXB0D0+i) = Data[i];
468 *(TXB0D0+i) = Data[i];
canfunctions.h
52#define TXB0D0 0xF46

:: TXB0D1 (d)

canfunctions.h
53#define TXB0D1 0xF47

:: TXB0D2 (d)

canfunctions.h
54#define TXB0D2 0xF48

:: TXB0D3 (d)

canfunctions.h
55#define TXB0D3 0xF49

:: TXB0D4 (d)

canfunctions.h
56#define TXB0D4 0xF4A

:: TXB0D5 (d)

canfunctions.h
57#define TXB0D5 0xF4B

:: TXB0D6 (d)

canfunctions.h
58#define TXB0D6 0xF4C

:: TXB0D7 (d)

canfunctions.h
59#define TXB0D7 0xF4D

:: TXB1D0 (d)

canfunctions.c
331 *(TXB1D0+i) = Data[i];
canfunctions.h
61#define TXB1D0 0xF36

:: TXB1D1 (d)

canfunctions.h
62#define TXB1D1 0xF37

:: TXB1D2 (d)

canfunctions.h
63#define TXB1D2 0xF38

:: TXB1D3 (d)

canfunctions.h
64#define TXB1D3 0xF39

:: TXB1D4 (d)

canfunctions.h
65#define TXB1D4 0xF3A

:: TXB1D5 (d)

canfunctions.h
66#define TXB1D5 0xF3B

:: TXB1D6 (d)

canfunctions.h
67#define TXB1D6 0xF3C

:: TXB1D7 (d)

canfunctions.h
68#define TXB1D7 0xF3D

:: TXB2D0 (d)

canfunctions.c
353 //ptr=TXB2D0;
356 *(TXB2D0+i) = Data[i];
canfunctions.h
70#define TXB2D0 0xF26

:: TXB2D1 (d)

canfunctions.h
71#define TXB2D1 0xF27

:: TXB2D2 (d)

canfunctions.h
72#define TXB2D2 0xF28

:: TXB2D3 (d)

canfunctions.h
73#define TXB2D3 0xF29

:: TXB2D4 (d)

canfunctions.h
74#define TXB2D4 0xF2A

:: TXB2D5 (d)

canfunctions.h
75#define TXB2D5 0xF2B

:: TXB2D6 (d)

canfunctions.h
76#define TXB2D6 0xF2C

:: TXB2D7 (d)

canfunctions.h
77#define TXB2D7 0xF2D

:: TargetAngle (v)

RCservo.c
114 TargetAngle = commandCenter + (sint16)(((float) servoPosCommand) * commandScaleFactor);
115 TargetPos = TargetAngle+14500;
78sint16 TargetAngle;
89 TargetAngle=servoPosCommand;
90 TargetPos = TargetAngle+14500;
hsr_serial.c
490void HSR_SetAction(sint16 TargetAngle, uint16 ActionTime)
499 TargetPos = TargetAngle+14500;
526void HSR_SetAction_v2(sint16 TargetAngle, uint16 ActionTime)
535 TargetPos = TargetAngle+14500;
563uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime)
573 TargetPos = TargetAngle+14500;
hsr_serial.h
123void HSR_SetAction(sint16 TargetAngle, uint16 ActionTime); //Set Action
124void HSR_SetAction_v2(sint16 TargetAngle, uint16 ActionTime); //Set Action
125uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime);//Set Action and estimaate time of motion

:: TargetPos (v)

RCservo.c
115 TargetPos = TargetAngle+14500;
116 TargetPos = TargetPos/10;
117 TargetPosH = make8(TargetPos,1);
118 TargetPosL = make8(TargetPos,0);
75sint16 TargetPos;
90 TargetPos = TargetAngle+14500;
91 TargetPos = TargetPos/10;
92 TargetPosH = make8(TargetPos,1);
93 TargetPosL = make8(TargetPos,0);
hsr_serial.c
493 uint16 TargetPos;
499 TargetPos = TargetAngle+14500;
500 TargetPos = TargetPos/10;
501 TargetPosH = make8(TargetPos,1);
502 TargetPosL = make8(TargetPos,0);
505 if (TargetPos>CurServoPos)
507 ActionSpeed = (TargetPos-CurServoPos)/10;
513 ActionSpeed = (CurServoPos-TargetPos)/10;
529 uint16 TargetPos;
535 TargetPos = TargetAngle+14500;
536 TargetPos = TargetPos/10;
537 TargetPosH = make8(TargetPos,1);
538 TargetPosL = make8(TargetPos,0);
540 if (TargetPos>CurServoPos)
542 ActionSpeed = (TargetPos-CurServoPos);
549 ActionSpeed = (CurServoPos-TargetPos);
566 uint16 TargetPos;
573 TargetPos = TargetAngle+14500;
574 TargetPos = TargetPos/10;
575 TargetPosH = make8(TargetPos,1);
576 TargetPosL = make8(TargetPos,0);
578 if (TargetPos>CurServoPos)
580 ActionSpeed = (TargetPos-CurServoPos);
589 ActionSpeed = (CurServoPos-TargetPos);

:: TargetPosH (v)

RCservo.c
117 TargetPosH = make8(TargetPos,1);
121 HSR_SetPosition(TargetPosH,TargetPosL);
76uint8 TargetPosH;
92 TargetPosH = make8(TargetPos,1);
96 HSR_SetPosition(TargetPosH,TargetPosL);
hsr_serial.c
494 uint8 TargetPosH;
501 TargetPosH = make8(TargetPos,1);
521 HSR_SetPosition(TargetPosH,TargetPosL);
530 uint8 TargetPosH;
537 TargetPosH = make8(TargetPos,1);
558 HSR_SetPosition(TargetPosH,TargetPosL);
567 uint8 TargetPosH;
575 TargetPosH = make8(TargetPos,1);
600 HSR_SetPosition(TargetPosH,TargetPosL);

:: TargetPosL (v)

RCservo.c
118 TargetPosL = make8(TargetPos,0);
121 HSR_SetPosition(TargetPosH,TargetPosL);
77uint8 TargetPosL;
93 TargetPosL = make8(TargetPos,0);
96 HSR_SetPosition(TargetPosH,TargetPosL);
hsr_serial.c
495 uint8 TargetPosL;
502 TargetPosL = make8(TargetPos,0);
521 HSR_SetPosition(TargetPosH,TargetPosL);
531 uint8 TargetPosL;
538 TargetPosL = make8(TargetPos,0);
558 HSR_SetPosition(TargetPosH,TargetPosL);
568 uint8 TargetPosL;
576 TargetPosL = make8(TargetPos,0);
600 HSR_SetPosition(TargetPosH,TargetPosL);

:: Timer_100 (v)

RCservo.c
79uint16 Timer_100 = ((int)URB_HEARTBEAT_INTERVAL)/100; // Timer count for 60 Hz
99 if(get_timer0() >= Timer_100*feed_mult)

:: URBErrorCode (v)

ODaccess.c
56default: URBErrorCode = URB_ERROR_SDO_UNKNOWN_TYPE;
RB.c
175 URBErrorCode = URB_ERROR_WAITING_FOR_TXBUF;
178 URBErrorCode = URB_ERROR_OK;
266 URBErrorCode = URB_ERROR_SDO_IN_PROCESS;
300 URBErrorCode = URB_ERROR_READ_IN_PROCESS;
309 URBErrorCode = URB_ERROR_OK;
317 URBErrorCode = URB_ERROR_OK;
321 URBErrorCode = URB_ERROR_MAPPING_IN_PROCESS;
342 URBErrorCode = URB_ERROR_OK;
350 URBErrorCode = URB_ERROR_OK;
355 URBErrorCode = URB_ERROR_SDO_PERMISSIONS;
375 URBErrorCode = URB_ERROR_OK;
380 URBErrorCode = URB_ERROR_SDO_PERMISSIONS;
385 URBErrorCode = URB_ERROR_SDO_UNKNOWN_COMMAND;
394 URBErrorCode = URB_ERROR_SDO_NOT_FOUND; // index not found in object dictionary
409 URBhb.buf[3] = URBErrorCode;
551 URBErrorCode = URB_ERROR_OK;
579 URBErrorCode = (RcvMessageFlags & 0x60); // see URB.h for error codes.
586 URBErrorCode = URB_RX_IN_PROCESS;
590 //if (URBStackRcv.len != 2) URBErrorCode = URB_ERROR_NMT_INVALID_LENGTH; else
603 URBErrorCode = URB_ERROR_NMT_UNKNOWN_COMMAND;
607 else URBErrorCode = URB_ERROR_NMT_NOT_ADDRESSED;
615 URBErrorCode = URB_ERROR_SDO_MALFORMED;
RB.h
157byte URBErrorCode; // returns the exit code when something unexpected happens.

:: URBMaintainHeartbeat (f)

RB.c
400bool URBMaintainHeartbeat() {
635 ret_val |= URBMaintainHeartbeat();

:: URBOperational (d)

RB.c
135 if (URBOperational()) // send TPDO only if the node is operational
45#define URBOperational() (URBhb.buf[0] == URB_HEARTBEAT_NORMAL)
618 else if (URBOperational()) { // if node is operational, handle PMs

:: URBRecvCounter (v)

RB.c
549 URBRecvCounter = 0;
577 URBRecvCounter++;
RB.h
159byte URBRecvCounter;

:: URBRecvOverflowCounter (v)

RB.c
550 URBRecvOverflowCounter = 0;
583 URBRecvOverflowCounter++;
RB.h
158byte URBRecvOverflowCounter;

:: URBStackRcv (v)

RB.c
574 if (CANReceiveMessage (&URBStackRcv.ID, URBStackRcv.buf,&URBStackRcv.len,&RcvMessageFlags))
588 if (URBStackRcv.ID == 0) { // high-priority NMT (start/stop) message
589 if ((URBStackRcv.buf[1] == RB_NODEID) || (URBStackRcv.buf[1] == 0)) {
590 //if (URBStackRcv.len != 2) URBErrorCode = URB_ERROR_NMT_INVALID_LENGTH; else
591 switch (URBStackRcv.buf[0]) {
610 else if (URBStackRcv.ID == RB_DICT_REQ + RB_NODEID) // is it an SDO request?
612 if (URBStackRcv.len > 3)
613 URB_Handle_SDO_Request(URBStackRcv.buf);
619 if (URBStackRcv.ID == RBrPM[0].ID)
620 URB_Handle_rPDO(URBStackRcv.buf, 0); // copy bytes to rpdo 0
622 else if (URBStackRcv.ID == RBrPM[1].ID)
623 URB_Handle_rPDO(URBStackRcv.buf, 1); // copy bytes to rpdo 1
625 else if (URBStackRcv.ID == RBrPM[2].ID)
626 URB_Handle_rPDO(URBStackRcv.buf, 2); // copy bytes to rpdo 2
628 else if (URBStackRcv.ID == RBrPM[3].ID)
629 URB_Handle_rPDO(URBStackRcv.buf, 3); // copy bytes to rpdo 3
RB.h
155CAN_MSG URBStackRcv; // buffer used for incoming messages.

:: URBTxSDO (v)

RB.c
172 while (!(CANSendMessage(URBTxSDO.ID,2,URBTxSDO.buf,URBTxSDO.len,\
197 URBTxSDO.len = 5;
202 URBTxSDO.len = 6;
204 URBTxSDO.buf[4] = make8(tmpIndex,0);
205 URBTxSDO.buf[5] = make8(tmpIndex,1);
212 URBTxSDO.len = 5;
217 URBTxSDO.len = 6;
219 URBTxSDO.buf[4] = make8(tmpIndex,0);
220 URBTxSDO.buf[5] = make8(tmpIndex,1);
292 URBTxSDO.ID = RB_DICT_RESP + RB_NODEID;
293 URBTxSDO.buf[0] = cmd; // echo command.
294 URBTxSDO.buf[1] = subindex; // echo subindex, index ...
295 URBTxSDO.buf[2] = make8(index,0);
296 URBTxSDO.buf[3] = make8(index,1);
305 URBTxSDO.buf[4] = make8(index,0);
306 URBTxSDO.buf[5] = make8(index,1);
307 URBTxSDO.len = 6;
313 URBTxSDO.len = 6;
314 URBTxSDO.buf[4] = (permissions & RB_PERM_BITS);
315 URBTxSDO.buf[5] = type;
333 URBTxSDO.len = 8; // use all four data bytes for chars
338 URBTxSDO.buf[i] = objectDictionary[entry_num].name[s];
346 OD_read_data(&URBTxSDO.buf[4],entry_num,type);
347 URBTxSDO.len = 4+len;
370 OD_read_data(&URBTxSDO.buf[4],entry_num,type);
372 URBTxSDO.len = 4+len;
RB.h
156CAN_MSG URBTxSDO; // buffer used for responding to an SDO request

:: URB_ERROR_MAPPING_IN_PROCESS (d)

RB.c
321 URBErrorCode = URB_ERROR_MAPPING_IN_PROCESS;
RB.h
71#define URB_ERROR_MAPPING_IN_PROCESS 0xD1

:: URB_ERROR_NMT_INVALID_LENGTH (d)

RB.c
590 //if (URBStackRcv.len != 2) URBErrorCode = URB_ERROR_NMT_INVALID_LENGTH; else
RB.h
68#define URB_ERROR_NMT_INVALID_LENGTH 0xCE

:: URB_ERROR_NMT_NOT_ADDRESSED (d)

RB.c
607 else URBErrorCode = URB_ERROR_NMT_NOT_ADDRESSED;
RB.h
67#define URB_ERROR_NMT_NOT_ADDRESSED 0xCD

:: URB_ERROR_NMT_UNKNOWN_COMMAND (d)

RB.c
603 URBErrorCode = URB_ERROR_NMT_UNKNOWN_COMMAND;
RB.h
66#define URB_ERROR_NMT_UNKNOWN_COMMAND 0xCC

:: URB_ERROR_OK (d)

RB.c
178 URBErrorCode = URB_ERROR_OK;
309 URBErrorCode = URB_ERROR_OK;
317 URBErrorCode = URB_ERROR_OK;
342 URBErrorCode = URB_ERROR_OK;
350 URBErrorCode = URB_ERROR_OK;
375 URBErrorCode = URB_ERROR_OK;
551 URBErrorCode = URB_ERROR_OK;
RB.h
49#define URB_ERROR_OK 0x00

:: URB_ERROR_PM_NO_MAP (d)

RB.h
70#define URB_ERROR_PM_NO_MAP 0xD0

:: URB_ERROR_READ_IN_PROCESS (d)

RB.c
300 URBErrorCode = URB_ERROR_READ_IN_PROCESS;
RB.h
72#define URB_ERROR_READ_IN_PROCESS 0xD2

:: URB_ERROR_RX_INVALID_MSG (d)

RB.h
50#define URB_ERROR_RX_INVALID_MSG 0x10

:: URB_ERROR_RX_RTR_FRAME (d)

RB.h
52#define URB_ERROR_RX_RTR_FRAME 0x40

:: URB_ERROR_RX_XTD_FRAME (d)

RB.h
51#define URB_ERROR_RX_XTD_FRAME 0x20

:: URB_ERROR_SDO_IN_PROCESS (d)

RB.c
266 URBErrorCode = URB_ERROR_SDO_IN_PROCESS;
RB.h
57#define URB_ERROR_SDO_IN_PROCESS 0x33

:: URB_ERROR_SDO_MALFORMED (d)

RB.c
615 URBErrorCode = URB_ERROR_SDO_MALFORMED;
RB.h
58#define URB_ERROR_SDO_MALFORMED 0xA9

:: URB_ERROR_SDO_NOT_FOUND (d)

RB.c
394 URBErrorCode = URB_ERROR_SDO_NOT_FOUND; // index not found in object dictionary
RB.h
60#define URB_ERROR_SDO_NOT_FOUND 0xAB

:: URB_ERROR_SDO_PERMISSIONS (d)

RB.c
355 URBErrorCode = URB_ERROR_SDO_PERMISSIONS;
380 URBErrorCode = URB_ERROR_SDO_PERMISSIONS;
RB.h
64#define URB_ERROR_SDO_PERMISSIONS 0xAF

:: URB_ERROR_SDO_REPLY_SENT (d)

RB.h
56#define URB_ERROR_SDO_REPLY_SENT 0x22

:: URB_ERROR_SDO_TYPE_MISMATCH (d)

RB.h
61#define URB_ERROR_SDO_TYPE_MISMATCH 0xAC

:: URB_ERROR_SDO_UNKNOWN_COMMAND (d)

RB.c
385 URBErrorCode = URB_ERROR_SDO_UNKNOWN_COMMAND;
RB.h
63#define URB_ERROR_SDO_UNKNOWN_COMMAND 0xAE

:: URB_ERROR_SDO_UNKNOWN_TYPE (d)

ODaccess.c
56default: URBErrorCode = URB_ERROR_SDO_UNKNOWN_TYPE;
RB.h
59#define URB_ERROR_SDO_UNKNOWN_TYPE 0xAA

:: URB_ERROR_WAITING_FOR_TXBUF (d)

RB.c
175 URBErrorCode = URB_ERROR_WAITING_FOR_TXBUF;
RB.h
62#define URB_ERROR_WAITING_FOR_TXBUF 0xAD

:: URB_HEARTBEAT_INTERVAL (d)

RB.c
403 if ( get_timer0() > URB_HEARTBEAT_INTERVAL) {
RB.h
47#define URB_HEARTBEAT_INTERVAL 0x4C47
RCservo.c
69 feed_int = URB_HEARTBEAT_INTERVAL/feed_freq;
79uint16 Timer_100 = ((int)URB_HEARTBEAT_INTERVAL)/100; // Timer count for 60 Hz
hsr_serial.h
46uint16 _Reset_interval= URB_HEARTBEAT_INTERVAL/60;
main.c
80{ // feed_freq has to be less than 4C47 i.e. the URB_HEARTBEAT_INTERVAL

:: URB_HEARTBEAT_NORMAL (d)

RB.c
45#define URBOperational() (URBhb.buf[0] == URB_HEARTBEAT_NORMAL)
480 URBhb.buf[0] = URB_HEARTBEAT_NORMAL;
593 URBhb.buf[0] = URB_HEARTBEAT_NORMAL;
RB.h
42#define URB_HEARTBEAT_NORMAL 0x05

:: URB_HEARTBEAT_STOPPED (d)

RB.c
596 URBhb.buf[0] = URB_HEARTBEAT_STOPPED;
RB.h
43#define URB_HEARTBEAT_STOPPED 0x04

:: URB_Handle_SDO_Request (f)

RB.c
259void URB_Handle_SDO_Request(byte *data)
613 URB_Handle_SDO_Request(URBStackRcv.buf);

:: URB_Handle_rPDO (f)

RB.c
446void URB_Handle_rPDO(byte *data, byte myBuf)
620 URB_Handle_rPDO(URBStackRcv.buf, 0); // copy bytes to rpdo 0
623 URB_Handle_rPDO(URBStackRcv.buf, 1); // copy bytes to rpdo 1
626 URB_Handle_rPDO(URBStackRcv.buf, 2); // copy bytes to rpdo 2
629 URB_Handle_rPDO(URBStackRcv.buf, 3); // copy bytes to rpdo 3

:: URB_RX_IN_PROCESS (d)

RB.c
586 URBErrorCode = URB_RX_IN_PROCESS;
RB.h
54#define URB_RX_IN_PROCESS 0x34

:: URB_Send_SDO_Reply (f)

RB.c
170void URB_Send_SDO_Reply()
224 URB_Send_SDO_Reply();
308 URB_Send_SDO_Reply();
316 URB_Send_SDO_Reply();
341 URB_Send_SDO_Reply();
349 URB_Send_SDO_Reply();
374 URB_Send_SDO_Reply();

:: URB_Sizeof (f)

ODaccess.c
143 size = URB_Sizeof(type);
42byte URB_Sizeof(byte type) {
RB.c
145 memcpy(&RBtPM[myBufNum].buf[RBtPM[myBufNum].len], RB_Get_Tx_Map_Address(myBufNum,mapCount), URB_Sizeof(type));
147 RBtPM[myBufNum].len += URB_Sizeof(type);
163 // OD_lookup and others. However, URB_Sizeof and translate_microchip_to_ieee
285 len = URB_Sizeof(type); // number of bytes in value
458 memcpy(RB_Get_Rx_Map_Address(myBuf,mapCount), &data[bufCount], URB_Sizeof(type));
460 bufCount += URB_Sizeof(type);

:: URB_translate_ieee_to_microchip (f)

ODaccess.c
146 URB_translate_ieee_to_microchip(source);
89void URB_translate_ieee_to_microchip(int *Value)
RB.c
459 if (type == RB_TYPE_FLOAT) URB_translate_ieee_to_microchip(&data[bufCount]);

:: URB_translate_microchip_to_ieee (f)

ODaccess.c
132 URB_translate_microchip_to_ieee(dest);
63void URB_translate_microchip_to_ieee(int *Value)
RB.c
146 if (type == RB_TYPE_FLOAT) URB_translate_microchip_to_ieee(&RBtPM[myBufNum].buf[RBtPM[myBufNum].len]);

:: URBhb (v)

RB.c
407 URBhb.buf[1] = TXERRCNT;
408 URBhb.buf[2] = RXERRCNT;
409 URBhb.buf[3] = URBErrorCode;
410 memcpy(&URBhb.buf[4], &actualPos,2); // include actual position
412 CANSendMessage(URBhb.ID,2,URBhb.buf,URBhb.len, CAN_TX_PRIORITY_0 & CAN_TX_STD_FRAME);
45#define URBOperational() (URBhb.buf[0] == URB_HEARTBEAT_NORMAL)
478 URBhb.ID = RB_HEARTBEAT + (int16) RB_NODEID;
479 URBhb.len = 6;
480 URBhb.buf[0] = URB_HEARTBEAT_NORMAL;
55 // Set up heartbeat message in URBhb buffer.
593 URBhb.buf[0] = URB_HEARTBEAT_NORMAL;
596 URBhb.buf[0] = URB_HEARTBEAT_STOPPED;
RB.h
154CAN_MSG URBhb; // heartbeat message buffer

:: USART_search_active (v)

usart.c
115 while(USART_search_active)
26uint8 USART_search_active = 0;
34 USART_search_active = 1;
85 while(USART_search_active) //Try each rx mux port 8 times

:: USART_timer (v)

usart.c
27uint8 USART_timer = 0;
35 USART_timer = 0;

:: WaitRxDataReady (f)

hsr_serial.c
123void WaitRxDataReady(void)
150 WaitRxDataReady(); // Wait until receive is completed.
184 WaitRxDataReady();
213 WaitRxDataReady(); // Wait until receive is completed.
247 WaitRxDataReady(); // Wait until receive is completed.
297 WaitRxDataReady(); // Wait until data is receieved
319 WaitRxDataReady(); // Wait until receive is completed.
355 WaitRxDataReady(); // Wait until receive is completed.
393 WaitRxDataReady(); // Wait until receive is completed.
432 WaitRxDataReady(); // Wait until receive is completed.
439//wait 3ms or call WaitRxDataReady();
469 WaitRxDataReady(); // Wait until receive is completed.
476//wait 3ms or call WaitRxDataReady();
62 WaitRxDataReady();
92 WaitRxDataReady();
hsr_serial.h
101void WaitRxDataReady(void); // Wait until incoming data is ready.

:: _HSR_ComStart (d)

hsr_serial.c
105 _CheckSum=_HSR_ComStart+_HSR_ReadPosition;
110 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadPosition,0x00,0x00,_CheckSum);
141 _CheckSum=_HSR_ComStart+_HSR_ReadEPPROM+addr;
146 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadEPPROM,addr,0x00,_CheckSum);
159 _CheckSum=_HSR_ComStart+_HSR_ReadEPPROM+addr;
164 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadEPPROM,addr,0x00,_CheckSum);
175 _CheckSum = _HSR_ComStart + _HSR_WriteEPPROM + addr + data;
180 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_WriteEPPROM,addr,data,_CheckSum);
192 _CheckSum = _HSR_ComStart + _HSR_WriteEPPROM + addr + data;
195 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_WriteEPPROM,addr,data,_CheckSum);
204 _CheckSum=_HSR_ComStart+_HSR_ReadMemory+addr;
209 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadMemory,addr,0x00,_CheckSum);
222 _CheckSum=_HSR_ComStart+_HSR_ReadMemory+addr;
227 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadMemory,addr,0x00,_CheckSum);
238 _CheckSum=_HSR_ComStart+_HSR_WriteMemory+addr+data;
243 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_WriteMemory,addr,data,_CheckSum);
254 _CheckSum=_HSR_ComStart+_HSR_WriteMemory+addr+data;
258 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_WriteMemory,addr,data,_CheckSum);
267 _CheckSum = _HSR_ComStart + _HSR_SetPosition + PosH + PosL;
271 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetPosition,PosH,PosL,_CheckSum);
282 _CheckSum = _HSR_ComStart + ServoID + PosH + PosL;
286 printf("%c%c%c%c%c",_HSR_ComStart,ServoID,PosH,PosL,_CheckSum);
310 _CheckSum=_HSR_ComStart+_HSR_ReadVerID;
315 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadVerID,0x00,0x00,_CheckSum);
331 _CheckSum=_HSR_ComStart+_HSR_ReadVerID;
335 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadVerID,0x00,0x00,_CheckSum);
346 _CheckSum = _HSR_ComStart + _HSR_ReadPWM;
351 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadPWM,0x00,0x00,_CheckSum);
368 _CheckSum = _HSR_ComStart + _HSR_ReadPWM;
372 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadPWM,0x00,0x00,_CheckSum);
384 _CheckSum = _HSR_ComStart + _HSR_SetSpeed + ServoID + ServoSpeed;
389 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetSpeed,ServoID,ServoSpeed,_CheckSum);
407 _CheckSum = _HSR_ComStart + _HSR_SetSpeed + ServoID + ServoSpeed;
411 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetSpeed,ServoID,ServoSpeed,_CheckSum);
423 _CheckSum = _HSR_ComStart + _HSR_SelectControl + ControlSet;
428 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SelectControl,0x00,ControlSet,_CheckSum);
445 _CheckSum = _HSR_ComStart + _HSR_SelectControl + ControlSet;
449 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SelectControl,0x00,ControlSet,_CheckSum);
460 _CheckSum = _HSR_ComStart + _HSR_SetGoStop + GoStop;
465 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetGoStop,GoStop,0x00,_CheckSum);
480 _CheckSum = _HSR_ComStart + _HSR_SetGoStop + GoStop;
484 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetGoStop,GoStop,0x00,_CheckSum);
53 _CheckSum=_HSR_ComStart+_HSR_Release;
58 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_Release,0x00,0x00,_CheckSum);
71 _CheckSum=_HSR_ComStart+_HSR_Release;
74 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_Release,0x00,0x00,_CheckSum);
83 _CheckSum=_HSR_ComStart+_HSR_ReadPosition;
88 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadPosition,0x00,0x00,_CheckSum);
hsr_serial.h
6#define _HSR_ComStart 0x80 //Communication start byte

:: _HSR_EPPROM_DZ1 (d)

hsr_serial.h
51#define _HSR_EPPROM_DZ1 0x02 // Dead zone for parameter set 1

:: _HSR_EPPROM_DZ2 (d)

hsr_serial.h
55#define _HSR_EPPROM_DZ2 0x21 // Dead zone for parameter set 1

:: _HSR_EPPROM_DZ3 (d)

hsr_serial.h
59#define _HSR_EPPROM_DZ3 0x26 // Dead zone for parameter set 1

:: _HSR_EPPROM_ID (d)

hsr_serial.h
62#define _HSR_EPPROM_ID 0x29 // Servo ID

:: _HSR_EPPROM_MaxPosH (d)

hsr_serial.h
65#define _HSR_EPPROM_MaxPosH 0x0B // High byte of maximum servo position

:: _HSR_EPPROM_MaxPosL (d)

hsr_serial.h
66#define _HSR_EPPROM_MaxPosL 0x0C // Low byte of maximum servo positon

:: _HSR_EPPROM_MidPosH (d)

hsr_serial.h
67#define _HSR_EPPROM_MidPosH 0x11 // High byte of center servo position

:: _HSR_EPPROM_MidPosL (d)

hsr_serial.h
68#define _HSR_EPPROM_MidPosL 0x12 // Low byte of center servo positon

:: _HSR_EPPROM_MinPosH (d)

hsr_serial.h
63#define _HSR_EPPROM_MinPosH 0x09 // High byte of minimum servo position

:: _HSR_EPPROM_MinPosL (d)

hsr_serial.h
64#define _HSR_EPPROM_MinPosL 0x0A // Low byte of minimum servo positon

:: _HSR_EPPROM_P1D (d)

hsr_serial.h
52#define _HSR_EPPROM_P1D 0x03 // Derivative gain for parameter set 1

:: _HSR_EPPROM_P1H (d)

hsr_serial.h
49#define _HSR_EPPROM_P1H 0x00 // High byte of Proportional gain for parameter set 1

:: _HSR_EPPROM_P1L (d)

hsr_serial.h
50#define _HSR_EPPROM_P1L 0x01 // Low byte of Proportional gain for parameter set 1

:: _HSR_EPPROM_P2D (d)

hsr_serial.h
56#define _HSR_EPPROM_P2D 0x22 // Derivative gain for parameter set 1

:: _HSR_EPPROM_P2H (d)

hsr_serial.h
53#define _HSR_EPPROM_P2H 0x1F // High byte of Proportional gain for parameter set 1

:: _HSR_EPPROM_P2L (d)

hsr_serial.h
54#define _HSR_EPPROM_P2L 0x20 // Low byte of Proportional gain for parameter set 1

:: _HSR_EPPROM_P3D (d)

hsr_serial.h
60#define _HSR_EPPROM_P3D 0x27 // Derivative gain for parameter set 1

:: _HSR_EPPROM_P3H (d)

hsr_serial.h
57#define _HSR_EPPROM_P3H 0x24 // High byte of Proportional gain for parameter set 1

:: _HSR_EPPROM_P3L (d)

hsr_serial.h
58#define _HSR_EPPROM_P3L 0x25 // Low byte of Proportional gain for parameter set 1

:: _HSR_EPPROM_Speed (d)

hsr_serial.h
61#define _HSR_EPPROM_Speed 0x06 // EEPROM address for speed

:: _HSR_MEM_ActualPosH (d)

hsr_serial.h
76#define _HSR_MEM_ActualPosH 0xA7 // High byte of actual position

:: _HSR_MEM_ActualPosL (d)

hsr_serial.h
77#define _HSR_MEM_ActualPosL 0xA8 // Low byte of actual position

:: _HSR_MEM_CurSpeed (d)

RCservo.c
120 HSR_WriteMemory_v2(_HSR_MEM_CurSpeed, ServoSpeed);
95 HSR_WriteMemory_v2(_HSR_MEM_CurSpeed, ServoSpeed);
hsr_serial.c
520 HSR_WriteMemory(_HSR_MEM_CurSpeed, ActionSpeedByte);
557 HSR_WriteMemory(_HSR_MEM_CurSpeed, ActionSpeedByte);
599 HSR_WriteMemory(_HSR_MEM_CurSpeed, ActionSpeedByte);
hsr_serial.h
86#define _HSR_MEM_CurSpeed 0xC3 // Current Speed setting and sometimes updated from HSR_MEM_Speed

:: _HSR_MEM_CurTargetPosH (d)

hsr_serial.c
299 HSR_WriteMemory(_HSR_MEM_CurTargetPosH, _ServoPosH);
hsr_serial.h
73#define _HSR_MEM_CurTargetPosH 0x07 // High byte of current target set position

:: _HSR_MEM_CurTargetPosL (d)

hsr_serial.c
298 HSR_WriteMemory(_HSR_MEM_CurTargetPosL, _ServoPosL);
hsr_serial.h
72#define _HSR_MEM_CurTargetPosL 0x06 // Low byte of current target set position

:: _HSR_MEM_DZ1 (d)

hsr_serial.h
83#define _HSR_MEM_DZ1 0x82 // Dead zone for parameter set 1

:: _HSR_MEM_GoStop (d)

hsr_serial.h
80#define _HSR_MEM_GoStop 0xC9 // Go/Stop

:: _HSR_MEM_MaxPosH (d)

hsr_serial.h
89#define _HSR_MEM_MaxPosH 0x8B // High byte of maximum servo position

:: _HSR_MEM_MaxPosL (d)

hsr_serial.h
90#define _HSR_MEM_MaxPosL 0x8C // Low byte of maximum servo positon

:: _HSR_MEM_MidPosH (d)

hsr_serial.h
91#define _HSR_MEM_MidPosH 0x91 // High byte of center servo position

:: _HSR_MEM_MidPosL (d)

hsr_serial.h
92#define _HSR_MEM_MidPosL 0x92 // Low byte of center servo positon

:: _HSR_MEM_MinPosH (d)

hsr_serial.h
87#define _HSR_MEM_MinPosH 0x89 // High byte of minimum servo position

:: _HSR_MEM_MinPosL (d)

hsr_serial.h
88#define _HSR_MEM_MinPosL 0x8A // Low byte of minimum servo positon

:: _HSR_MEM_P1D (d)

RCservo.c
36 D=HSR_ReadMemory(_HSR_MEM_P1D);
50 {HSR_WriteMemory(_HSR_MEM_P1D,make8(tmp,0));
hsr_serial.h
84#define _HSR_MEM_P1D 0x83 // Derivative gain for parameter set 1

:: _HSR_MEM_P1H (d)

RCservo.c
34 PH=HSR_ReadMemory(_HSR_MEM_P1H);
40 {HSR_WriteMemory(_HSR_MEM_P1H,make8(tmp,1));
hsr_serial.h
81#define _HSR_MEM_P1H 0x80 // High byte of Proportional gain for parameter set 1

:: _HSR_MEM_P1L (d)

RCservo.c
33 PL=HSR_ReadMemory(_HSR_MEM_P1L);
41 HSR_WriteMemory(_HSR_MEM_P1L,make8(tmp,0));
hsr_serial.h
82#define _HSR_MEM_P1L 0x81 // Low byte of Proportional gain for parameter set 1

:: _HSR_MEM_PosErrorH (d)

hsr_serial.h
78#define _HSR_MEM_PosErrorH 0xA9 // High byte of position error (Target Position - Actual Position)

:: _HSR_MEM_PosErrorL (d)

hsr_serial.h
79#define _HSR_MEM_PosErrorL 0xAA // Low byte of position error (Target Position - Actual Position)

:: _HSR_MEM_Speed (d)

RCservo.c
119 HSR_WriteMemory_v2(_HSR_MEM_Speed,ServoSpeed);
94 HSR_WriteMemory_v2(_HSR_MEM_Speed,ServoSpeed);
hsr_serial.c
519 HSR_WriteMemory(_HSR_MEM_Speed, ActionSpeedByte);
556 HSR_WriteMemory(_HSR_MEM_Speed, ActionSpeedByte);
598 HSR_WriteMemory(_HSR_MEM_Speed, ActionSpeedByte);
hsr_serial.h
85#define _HSR_MEM_Speed 0x86 // Memory address for speed

:: _HSR_MEM_TargetPosH (d)

hsr_serial.h
74#define _HSR_MEM_TargetPosH 0xA5 // High byte of target position

:: _HSR_MEM_TargetPosL (d)

hsr_serial.h
75#define _HSR_MEM_TargetPosL 0xA6 // Low byte of target position

:: _HSR_ReadEPPROM (d)

hsr_serial.c
141 _CheckSum=_HSR_ComStart+_HSR_ReadEPPROM+addr;
146 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadEPPROM,addr,0x00,_CheckSum);
159 _CheckSum=_HSR_ComStart+_HSR_ReadEPPROM+addr;
164 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadEPPROM,addr,0x00,_CheckSum);
hsr_serial.h
7#define _HSR_ReadEPPROM 0xE1 // Read a specific location from EEPROM

:: _HSR_ReadMemory (d)

hsr_serial.c
204 _CheckSum=_HSR_ComStart+_HSR_ReadMemory+addr;
209 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadMemory,addr,0x00,_CheckSum);
222 _CheckSum=_HSR_ComStart+_HSR_ReadMemory+addr;
227 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadMemory,addr,0x00,_CheckSum);
hsr_serial.h
9#define _HSR_ReadMemory 0xE3 // Read a specific location from memory

:: _HSR_ReadPWM (d)

hsr_serial.c
346 _CheckSum = _HSR_ComStart + _HSR_ReadPWM;
351 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadPWM,0x00,0x00,_CheckSum);
368 _CheckSum = _HSR_ComStart + _HSR_ReadPWM;
372 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadPWM,0x00,0x00,_CheckSum);
hsr_serial.h
14#define _HSR_ReadPWM 0xE8 // Read pulsewidth and Voltage

:: _HSR_ReadPosition (d)

hsr_serial.c
105 _CheckSum=_HSR_ComStart+_HSR_ReadPosition;
110 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadPosition,0x00,0x00,_CheckSum);
83 _CheckSum=_HSR_ComStart+_HSR_ReadPosition;
88 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadPosition,0x00,0x00,_CheckSum);
hsr_serial.h
11#define _HSR_ReadPosition 0xE5 // Read current servo position

:: _HSR_ReadVerID (d)

hsr_serial.c
310 _CheckSum=_HSR_ComStart+_HSR_ReadVerID;
315 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadVerID,0x00,0x00,_CheckSum);
331 _CheckSum=_HSR_ComStart+_HSR_ReadVerID;
335 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_ReadVerID,0x00,0x00,_CheckSum);
hsr_serial.h
13#define _HSR_ReadVerID 0xE7 // Read servo version and ID

:: _HSR_Release (d)

hsr_serial.c
53 _CheckSum=_HSR_ComStart+_HSR_Release;
58 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_Release,0x00,0x00,_CheckSum);
71 _CheckSum=_HSR_ComStart+_HSR_Release;
74 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_Release,0x00,0x00,_CheckSum);
hsr_serial.h
18#define _HSR_Release 0xEF // Release

:: _HSR_SelectControl (d)

hsr_serial.c
423 _CheckSum = _HSR_ComStart + _HSR_SelectControl + ControlSet;
428 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SelectControl,0x00,ControlSet,_CheckSum);
445 _CheckSum = _HSR_ComStart + _HSR_SelectControl + ControlSet;
449 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SelectControl,0x00,ControlSet,_CheckSum);
hsr_serial.h
16#define _HSR_SelectControl 0xEA // Select control parameter set

:: _HSR_SetGoStop (d)

hsr_serial.c
460 _CheckSum = _HSR_ComStart + _HSR_SetGoStop + GoStop;
465 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetGoStop,GoStop,0x00,_CheckSum);
480 _CheckSum = _HSR_ComStart + _HSR_SetGoStop + GoStop;
484 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetGoStop,GoStop,0x00,_CheckSum);
hsr_serial.h
17#define _HSR_SetGoStop 0xEB // Set go/stop

:: _HSR_SetPosition (d)

hsr_serial.c
267 _CheckSum = _HSR_ComStart + _HSR_SetPosition + PosH + PosL;
271 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetPosition,PosH,PosL,_CheckSum);
hsr_serial.h
12#define _HSR_SetPosition 0xE6 // Set target position

:: _HSR_SetSpeed (d)

hsr_serial.c
384 _CheckSum = _HSR_ComStart + _HSR_SetSpeed + ServoID + ServoSpeed;
389 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetSpeed,ServoID,ServoSpeed,_CheckSum);
407 _CheckSum = _HSR_ComStart + _HSR_SetSpeed + ServoID + ServoSpeed;
411 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_SetSpeed,ServoID,ServoSpeed,_CheckSum);
hsr_serial.h
15#define _HSR_SetSpeed 0xE9 // Set servo speed and read position

:: _HSR_WriteEPPROM (d)

hsr_serial.c
175 _CheckSum = _HSR_ComStart + _HSR_WriteEPPROM + addr + data;
180 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_WriteEPPROM,addr,data,_CheckSum);
192 _CheckSum = _HSR_ComStart + _HSR_WriteEPPROM + addr + data;
195 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_WriteEPPROM,addr,data,_CheckSum);
hsr_serial.h
8#define _HSR_WriteEPPROM 0xE2 // Write a specific location from EEPROM

:: _HSR_WriteMemory (d)

hsr_serial.c
238 _CheckSum=_HSR_ComStart+_HSR_WriteMemory+addr+data;
243 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_WriteMemory,addr,data,_CheckSum);
254 _CheckSum=_HSR_ComStart+_HSR_WriteMemory+addr+data;
258 printf("%c%c%c%c%c",_HSR_ComStart,_HSR_WriteMemory,addr,data,_CheckSum);
hsr_serial.h
10#define _HSR_WriteMemory 0xE4 // Write a specific location from memory

:: _Reset_interval (v)

hsr_serial.c
127 { if (get_timer0()-_Start_time >_Reset_interval)
hsr_serial.h
46uint16 _Reset_interval= URB_HEARTBEAT_INTERVAL/60;

:: _RxLastData (v)

hsr_serial.c
151 return(_RxLastData[0]);
214 return(_RxLastData[0]);
320 _ServoID = _RxLastData[0];
321 _ServoVersion = _RxLastData[1];
327//second elements of _RxLastData at the end of communication.
356 _ServoPW = _RxLastData[0];
357 _ServoVoltage = _RxLastData[1];
363//available as the first and second elements of _RxLastData,
394 _ServoPosH = _RxLastData[0];
395 _ServoPosL = _RxLastData[1];
403//Current position will be available as _RxLastData
93 _ServoPosH = _RxLastData[0];
94 _ServoPosL = _RxLastData[1];
96 return(make16(_RxLastData[0],_RxLastData[1]));
hsr_serial.h
39char _RxLastData[2]; // Last Received Complete Data
main.c
24 _RxLastData[0]=_RxData[0];
25 _RxLastData[1]=_RxData[1];

:: _ServoPW (v)

hsr_serial.c
356 _ServoPW = _RxLastData[0];
hsr_serial.h
43uint8 _ServoPW; // Pulsewidth of PWM signal

:: _ServoPosL ()

hsr_serial.c
298 HSR_WriteMemory(_HSR_MEM_CurTargetPosL, _ServoPosL);
395 _ServoPosL = _RxLastData[1];
94 _ServoPosL = _RxLastData[1];
hsr_serial.h
26uint8 _ServoPosL; // Servo position low

:: _ServoVersion ()

hsr_serial.c
321 _ServoVersion = _RxLastData[1];
hsr_serial.h
24uint8 _ServoVersion; // Servo version

:: _ServoVoltage (v)

hsr_serial.c
357 _ServoVoltage = _RxLastData[1];
hsr_serial.h
44uint8 _ServoVoltage; // Voltage of PWM signal

:: _Start_time (v)

hsr_serial.c
125 _Start_time =get_timer0();
127 { if (get_timer0()-_Start_time >_Reset_interval)
hsr_serial.h
45uint16 _Start_time;

:: actualPos (v)

RB.c
410 memcpy(&URBhb.buf[4], &actualPos,2); // include actual position
9 - Included actualPos (servo position) in every heartbeat.
RBapp.h
116{0x1051, RB_TYPE_SINT16, &actualPos}
141{ 0x1051, RB_MEDIA_RAM | RB_PERM_READONLY, RB_TYPE_SINT16, &actualPos, "Actual Pos"},
30 Took out process messages for actualPos. The bluetooth module could not keep up.
322006-08-07, Mike Park: Reinstated process messages for actualPos. Frequency is set to a
75sint16 actualPos;
canfunctions.c
430// actualPos = (sint16) (((float) ((sint16) raw_adc - (sint16) feedbackCenter)) * feedbackScaleFactor);
main.c
82 //actualPos=(sint16)(((float)( raw_adc - commandCenter))/ commandScaleFactor);
83 actualPos=( raw_adc*10 - 14500 );

:: bool (t)

RB.c
236bool OD_lookup(int16 index, int8& num)
239 bool index_found = FALSE;
400bool URBMaintainHeartbeat() {
422bool RB_Process_Outgoing_PM() {
RB.h
152bool RBtPMready[4]; // flag to indicate ready to transmit.
178bool OD_lookup(int16 index, int8& num);
29typedef int8 bool;
RBTypes.h
7//#define boolean bool
8typedef int8 bool;
RBapp.h
78bool calMode;
project.h
6typedef int8 bool;

:: calMode (v)

RBapp.h
153{ 0x1060, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_BOOLEAN, &calMode, "calMode"},
78bool calMode;
RCservo.c
57 calMode = 0; // set normal mode
83 if (calMode)

:: commandCenter (v)

RCservo.c
114 TargetAngle = commandCenter + (sint16)(((float) servoPosCommand) * commandScaleFactor);
24sint16 commandCenter, tmpAmplitude, tmps;
61 RBReadEEPROM(&commandCenter, SERVO_CAL_CMD_CENTER, 2);
main.c
82 //actualPos=(sint16)(((float)( raw_adc - commandCenter))/ commandScaleFactor);

:: commandScaleFactor (v)

RCservo.c
114 TargetAngle = commandCenter + (sint16)(((float) servoPosCommand) * commandScaleFactor);
23float commandScaleFactor;
63 commandScaleFactor = ((float) tmpAmplitude) / ((float) 9000);
main.c
82 //actualPos=(sint16)(((float)( raw_adc - commandCenter))/ commandScaleFactor);

:: feed_freq (v)

RBapp.h
74uint16 feed_freq;
RCservo.c
67 RBReadEEPROM(&feed_freq,FEEDBACK, 2);
68 if ( feed_freq>0 )
69 feed_int = URB_HEARTBEAT_INTERVAL/feed_freq;
main.c
80{ // feed_freq has to be less than 4C47 i.e. the URB_HEARTBEAT_INTERVAL
94 if(get_timer0() >= feed_int*feed_mult && feed_freq != 0)

:: initUSART (f)

usart.c
32 initUSART();
70void initUSART(void)
usart.h
43void initUSART(void);

:: initiateUSART (f)

usart.c
30void initiateUSART(uint8 usart_Mode)
usart.h
48void initiateUSART(uint8 usart_Mode);

:: initiate_pulse (f)

RCservo.c
81void initiate_pulse() {
main.c
100 initiate_pulse();

:: listen (f)

usart.c
122 listen(muxPort);
147void listen(uint8 port)
usart.h
52void listen(int muxPort);

:: main (f)

ODaccess.c
41#inline // this #inline wastes ROM but prevents PM interrupts from interfering with main thread.
62#inline // this #inline wastes ROM but prevents PM interrupts from interfering with main thread.
RB.c
152 // Why, you ask, do we wait for main() to send process messages? Doesn't that
153 // add needless latency? The problem is, CANSendMessage is called in main()
158 // Therefore, ALL messages are sent from main() and interrupts can only
162 // the same functions called by main(). So interrupts should not call
31// This bus does its work when URB_Process_Stack() is called from main().
440* the main program has already found a match between RPDO[index]
47// Initialize. called by RB_App_ResetApp from main().
48// Also may be called by the main loop (RB_ProcessStack).
RB.h
128// the main dictionary
181// these two functions are "callback functions" which must be implemented by the application in "main.c"
hsr_serial.c
4//to your "main.c"
main.c
103// end main
35// it is called on startup from main(), and in addition,
88void main()

:: nextPort (f)

usart.c
130void nextPort()
usart.h
51void nextPort();

:: objectDictionary (v)

ODaccess.c
118 if ( (objectDictionary[num].permissions & RB_MEDIA_BIT) == RB_MEDIA_NONV )
121 address = objectDictionary[num].address;
127 source = objectDictionary[num].address;
150 if ( (objectDictionary[num].permissions & RB_MEDIA_BIT) == RB_MEDIA_NONV )
153 address = objectDictionary[num].address;
159 dest = objectDictionary[num].address;
RB.c
244 while ( (objectDictionary[num].index != 0) && (!index_found) )
246 temp_index = objectDictionary[num].index;
284 type = objectDictionary[entry_num].data_type;
286 permissions = objectDictionary[entry_num].permissions;
304 index = objectDictionary[entry_num + 1].index;
338 URBTxSDO.buf[i] = objectDictionary[entry_num].name[s];
RBapp.h
135CONST od_entry objectDictionary[] =

:: od_entry (t)

RB.h
137} od_entry;
17 2005-01-10 DGI: changed the od_entry type to explicitly include a permissions
RBapp.h
135CONST od_entry objectDictionary[] =

:: pm_map (t)

RB.h
145} pm_map;
RBapp.h
102CONST pm_map RB_RXMAPPING_1[] = RB_UNUSED_MAP;
106CONST pm_map RB_RXMAPPING_2[] = RB_UNUSED_MAP;
110CONST pm_map RB_RXMAPPING_3[] = RB_UNUSED_MAP;
114CONST pm_map RB_TXMAPPING_0[] =
121CONST pm_map RB_TXMAPPING_1[] = RB_UNUSED_MAP;
125CONST pm_map RB_TXMAPPING_2[] = RB_UNUSED_MAP;
129CONST pm_map RB_TXMAPPING_3[] = RB_UNUSED_MAP;
94CONST pm_map RB_RXMAPPING_0[] =

:: raw_adc (v)

RBapp.h
144{ 0x1014, RB_MEDIA_RAM | RB_PERM_READONLY, RB_TYPE_UINT16, &raw_adc, "rawADC"},
81uint16 raw_adc =0;
RCservo.c
100 { raw_adc = HSR_ReadPosition();
canfunctions.c
430// actualPos = (sint16) (((float) ((sint16) raw_adc - (sint16) feedbackCenter)) * feedbackScaleFactor);
main.c
81 raw_adc = HSR_ReadPosition();
82 //actualPos=(sint16)(((float)( raw_adc - commandCenter))/ commandScaleFactor);
83 actualPos=( raw_adc*10 - 14500 );

:: rxSearch (f)

usart.c
102void rxSearch(void)
50 rxSearch();
usart.h
45void rxSearch(void);

:: rxSearchRec (f)

usart.c
46 rxSearchRec();
81void rxSearchRec(void)
usart.h
47void rxSearchRec(void);

:: rxtx_time (d)

usart.c
20// #define rxtx_time 64000 // previous 55120 to 65535
21#define rxtx_time 55120
41 set_timer3(rxtx_time);

:: s (v)

RB.c
157 // configuration GUI programs, among other things, and it's not okay.
161 // Also, for the same reason, it's not OK for interrupts to call any of
331 int s;
334 s = 4*(subindex-0xF7);
338 URBTxSDO.buf[i] = objectDictionary[entry_num].name[s];
339 s++;
582 if (RcvMessageFlags & CAN_RX_OVERFLOW) { // it's not clear what this flag means, but count it.
634 // generate the heartbeat message (if it's time) but don't block on it
RCservo.c
26uint8 s;
59 s=make8(tmp,0);
60 ServoSpeed=s;
usart.c
76 TXSTA &= 0b11101111; // Sets of TX USART reg's

:: selectPort (f)

usart.c
121 selectPort(muxPort);
137void selectPort(uint8 port)
87 selectPort(muxPort); // choose the next muxPort
usart.h
50void selectPort(uint8 myPort);

:: serial_isr (f)

hsr_serial.c
10void serial_isr()
main.c
15void serial_isr()

:: servoPosCommand (v)

RBapp.h
140{ 0x1050, RB_MEDIA_RAM | RB_PERM_READWRITE, RB_TYPE_SINT16, &servoPosCommand, "poscomm"},
76sint16 servoPosCommand = 0;
96{0x1050, RB_TYPE_SINT16, &servoPosCommand},
RCservo.c
107 if (TAngle!=servoPosCommand)
108 {TAngle=servoPosCommand;
109 if( (servoPosCommand > 9000)||(servoPosCommand < -9000)) {
114 TargetAngle = commandCenter + (sint16)(((float) servoPosCommand) * commandScaleFactor);
65 servoPosCommand=tmps;
85 if (CAngle!=servoPosCommand)
86 {CAngle=servoPosCommand;
87 if ( !( (servoPosCommand > 9000)||(servoPosCommand < -9000)) )
89 TargetAngle=servoPosCommand;

:: servoSpeed (v)

RBapp.h
77uint8 servoSpeed;
97{0x1052, RB_TYPE_UINT8, &servoSpeed},

:: sint16 (t)

RB.h
31typedef signed int16 sint16;
RBTypes.h
10typedef signed int16 sint16;
RBapp.h
75sint16 actualPos;
76sint16 servoPosCommand = 0;
RCservo.c
114 TargetAngle = commandCenter + (sint16)(((float) servoPosCommand) * commandScaleFactor);
24sint16 commandCenter, tmpAmplitude, tmps;
73static sint16 TAngle = 0; //Target Position -9000 -- 9000
74static sint16 CAngle = 0; //Callibration Target Position -9000 -- 9000
75sint16 TargetPos;
78sint16 TargetAngle;
canfunctions.c
401// sint16 angleVal;
430// actualPos = (sint16) (((float) ((sint16) raw_adc - (sint16) feedbackCenter)) * feedbackScaleFactor);
431interp[RBSendNodeID] = (sint16) ((float)(gaitTable[nextRow][RBSendNodeID] - gaitTable[currRow][RBSendNodeID])*0.02);
hsr_serial.c
490void HSR_SetAction(sint16 TargetAngle, uint16 ActionTime)
526void HSR_SetAction_v2(sint16 TargetAngle, uint16 ActionTime)
563uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime)
hsr_serial.h
123void HSR_SetAction(sint16 TargetAngle, uint16 ActionTime); //Set Action
124void HSR_SetAction_v2(sint16 TargetAngle, uint16 ActionTime); //Set Action
125uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime);//Set Action and estimaate time of motion
main.c
44 sint16 tmps;
82 //actualPos=(sint16)(((float)( raw_adc - commandCenter))/ commandScaleFactor);
project.h
8typedef signed int16 sint16;

:: sint32 (t)

RB.h
32typedef signed int32 sint32;
RBTypes.h
11typedef signed int32 sint32;
project.h
9typedef signed int32 sint32;

:: sint8 (t)

RB.h
30typedef signed int8 sint8;
RBTypes.h
9typedef signed int8 sint8;
project.h
7typedef signed int8 sint8;

:: tmp (v)

ODaccess.c
168 uint8 tmp;
170 case (0): tmp = RB_RXMAPPING_0_LENGTH;
172 case (1): tmp = RB_RXMAPPING_1_LENGTH;
174 case (2): tmp = RB_RXMAPPING_2_LENGTH;
176 case (3): tmp = RB_RXMAPPING_3_LENGTH;
178 default: tmp = 0;
181 return tmp;
186 uint8 tmp;
188 case (0): tmp = RB_TXMAPPING_0_LENGTH;
190 case (1): tmp = RB_TXMAPPING_1_LENGTH;
192 case (2): tmp = RB_TXMAPPING_2_LENGTH;
194 case (3): tmp = RB_TXMAPPING_3_LENGTH;
196 default: tmp = 0;
199 return tmp;
204 uint16 tmp;
206 case (0): tmp = RB_TXMAPPING_0[mapCount].index;
208 case (1): tmp = RB_TXMAPPING_1[mapCount].index;
210 case (2): tmp = RB_TXMAPPING_2[mapCount].index;
212 case (3): tmp = RB_TXMAPPING_3[mapCount].index;
215 return tmp;
220 uint16 tmp;
222 case (0): tmp = RB_RXMAPPING_0[mapCount].index;
224 case (1): tmp = RB_RXMAPPING_1[mapCount].index;
226 case (2): tmp = RB_RXMAPPING_2[mapCount].index;
228 case (3): tmp = RB_RXMAPPING_3[mapCount].index;
231 return tmp;
236 uint8 tmp;
238 case (0): tmp = RB_TXMAPPING_0[mapCount].data_type;
240 case (1): tmp = RB_TXMAPPING_1[mapCount].data_type;
242 case (2): tmp = RB_TXMAPPING_2[mapCount].data_type;
244 case (3): tmp = RB_TXMAPPING_3[mapCount].data_type;
247 return tmp;
252 uint8 tmp;
254 case (0): tmp = RB_RXMAPPING_0[mapCount].data_type;
256 case (1): tmp = RB_RXMAPPING_1[mapCount].data_type;
258 case (2): tmp = RB_RXMAPPING_2[mapCount].data_type;
260 case (3): tmp = RB_RXMAPPING_3[mapCount].data_type;
263 return tmp;
268 char* tmp;
270 case (0): tmp = RB_TXMAPPING_0[mapCount].address;
272 case (1): tmp = RB_TXMAPPING_1[mapCount].address;
274 case (2): tmp = RB_TXMAPPING_2[mapCount].address;
276 case (3): tmp = RB_TXMAPPING_3[mapCount].address;
279 return tmp;
284 char* tmp;
286 case (0): tmp = RB_RXMAPPING_0[mapCount].address;
288 case (1): tmp = RB_RXMAPPING_1[mapCount].address;
290 case (2): tmp = RB_RXMAPPING_2[mapCount].address;
292 case (3): tmp = RB_RXMAPPING_3[mapCount].address;
295 return tmp;
RCservo.c
25uint16 tmp;
38 RBReadEEPROM(&tmp,SERVO_KP,2);
39 if ( tmp!=0 )
40 {HSR_WriteMemory(_HSR_MEM_P1H,make8(tmp,1));
41 HSR_WriteMemory(_HSR_MEM_P1L,make8(tmp,0));
48 RBReadEEPROM(&tmp,SERVO_KD,2);
49 if ( tmp!=0 )
50 {HSR_WriteMemory(_HSR_MEM_P1D,make8(tmp,0));
58 RBReadEEPROM(&tmp,SERVO_SPEED,2);
59 s=make8(tmp,0);
main.c
43 uint16 tmp;
47 /*tmp = 0;
48 RBSetEEPROM(&tmp,SERVO_KP, 2);
49 tmp = 0;
50 RBSetEEPROM(&tmp,SERVO_KD,2);
52 tmp=255;
53 RBSetEEPROM(&tmp,SERVO_SPEED,2);
54 tmp=0;
55 RBSetEEPROM(&tmp,FEEDBACK,2);
57 RBSetEEPROM(&tmp,SERVO_CAL_CMD_CENTER,2);

:: tmpAmplitude (v)

RCservo.c
24sint16 commandCenter, tmpAmplitude, tmps;
62 RBReadEEPROM(&tmpAmplitude, SERVO_CAL_CMD_AMPLITUDE, 2);
63 commandScaleFactor = ((float) tmpAmplitude) / ((float) 9000);

:: tmps (v)

RCservo.c
24sint16 commandCenter, tmpAmplitude, tmps;
64 RBReadEEPROM(&tmps,SERVO_START_POS, 2);
65 servoPosCommand=tmps;
main.c
44 sint16 tmps;
45 tmps = 9001;//starts limp
46 RBSetEEPROM(&tmps,SERVO_START_POS,2);
56 tmps=0;
58 tmps=9000;
59 RBSetEEPROM(&tmps,SERVO_CAL_CMD_AMPLITUDE,2);

:: uint16 (t)

ODaccess.c
202uint16 RB_Get_Tx_Map_Index(uint8 bufNum, uint8 mapCount)
204 uint16 tmp;
218uint16 RB_Get_Rx_Map_Index(uint8 bufNum, uint8 mapCount)
220 uint16 tmp;
RB.c
186 uint16 tmpIndex;
RB.h
131 uint16 index;
204uint16 RB_RXCONFIG_0;
205uint16 RB_RXCONFIG_1;
206uint16 RB_RXCONFIG_2;
207uint16 RB_RXCONFIG_3;
208uint16 RB_TXCONFIG_0;
209uint16 RB_TXCONFIG_1;
210uint16 RB_TXCONFIG_2;
211uint16 RB_TXCONFIG_3;
34typedef unsigned int16 uint16;
RBTypes.h
13typedef unsigned int16 uint16;
RBapp.h
74uint16 feed_freq;
79uint16 feed_mult=1;
80uint16 feed_int=0;
81uint16 raw_adc =0;
RCservo.c
25uint16 tmp;
30 uint16 D16,P;
79uint16 Timer_100 = ((int)URB_HEARTBEAT_INTERVAL)/100; // Timer count for 60 Hz
hsr_serial.c
490void HSR_SetAction(sint16 TargetAngle, uint16 ActionTime)
492 uint16 CurServoPos;
493 uint16 TargetPos;
496 uint16 ActionSpeed;
526void HSR_SetAction_v2(sint16 TargetAngle, uint16 ActionTime)
528 uint16 CurServoPos;
529 uint16 TargetPos;
563uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime)
565 uint16 CurServoPos;
566 uint16 TargetPos;
80uint16 HSR_ReadPosition(void)
hsr_serial.h
123void HSR_SetAction(sint16 TargetAngle, uint16 ActionTime); //Set Action
124void HSR_SetAction_v2(sint16 TargetAngle, uint16 ActionTime); //Set Action
125uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime);//Set Action and estimaate time of motion
29uint16 _ServoMinPos = 550; // Minimum Servo Position
32uint16 _ServoMaxPos = 2350; // Maximum Servo Position
35uint16 _ServoMidPos = 1500; // Center Servo Position
45uint16 _Start_time;
46uint16 _Reset_interval= URB_HEARTBEAT_INTERVAL/60;
98uint16 HSR_ReadPosition(void); // Read Servo Position
main.c
43 uint16 tmp;
project.h
11typedef unsigned int16 uint16;

:: uint32 (t)

RB.h
35typedef unsigned int32 uint32;
RBTypes.h
14typedef unsigned int32 uint32;
hsr_serial.c
532 uint32 ActionSpeed;
563uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime)
569 uint32 ActionSpeed;
570 uint32 EstimatedTime;
hsr_serial.h
125uint32 HSR_SetAction_v3(sint16 TargetAngle, uint16 ActionTime);//Set Action and estimaate time of motion
project.h
12typedef unsigned int32 uint32;

:: uint8 (t)

ODaccess.c
109int OD_read_data(char* dest, int num, uint8 type)
113 uint8 size;
141 uint8 size, address;
166uint8 RB_Get_Rx_Mapping_Length(uint8 myBuf)
168 uint8 tmp;
184uint8 RB_Get_Tx_Mapping_Length(uint8 myBuf)
186 uint8 tmp;
202uint16 RB_Get_Tx_Map_Index(uint8 bufNum, uint8 mapCount)
218uint16 RB_Get_Rx_Map_Index(uint8 bufNum, uint8 mapCount)
234uint8 RB_Get_Tx_Map_Type(uint8 bufNum, uint8 mapCount)
236 uint8 tmp;
250uint8 RB_Get_Rx_Map_Type(uint8 bufNum, uint8 mapCount)
252 uint8 tmp;
266char* RB_Get_Tx_Map_Address(uint8 bufNum, uint8 mapCount)
282char* RB_Get_Rx_Map_Address(uint8 bufNum, uint8 mapCount)
RB.c
137 uint8 numMappings, mapCount, type;
185 uint8 myBufNum;
449 uint8 numMappings, mapCount, bufCount, type, index;
485 uint8 i;
RB.h
132 uint8 permissions;
133 uint8 data_type;
143 uint8 data_type;
160uint8 RB_NODEID=0;
19 Added "MEDIA" const and uint8 RB_NODEID variable, and changed many of the
33typedef unsigned int8 uint8;
RBTypes.h
12typedef unsigned int8 uint8;
RBapp.h
77uint8 servoSpeed;
RCservo.c
26uint8 s;
31 uint8 D,PL,PH;
76uint8 TargetPosH;
77uint8 TargetPosL;
hsr_serial.c
138uint8 HSR_ReadEPPROM(uint8 addr)
156void HSR_ReadEPPROM_v2(uint8 addr)
171void HSR_WriteEPPROM(uint8 addr, uint8 data)
189void HSR_WriteEPPROM_v2(uint8 addr, uint8 data)
201uint8 HSR_ReadMemory(uint8 addr)
219void HSR_ReadMemory_v2(uint8 addr)
234void HSR_WriteMemory(uint8 addr, uint8 data)
252void HSR_WriteMemory_v2(uint8 addr, uint8 data)
264void HSR_SetPosition(uint8 PosH, uint8 PosL)
279void HSR_SetPosition(uint8 ServoID, uint8 PosH, uint8 PosL)
293void HSR_SetInitialPosition(uint8 PosH, uint8 PosL)
379void HSR_SetSpeed(uint8 ServoID, uint8 ServoSpeed)
404void HSR_SetSpeed_v2(uint8 ServoID, uint8 ServoSpeed)
417void HSR_SelectControl(uint8 ControlSet)
440void HSR_SelectControl_v2(uint8 ControlSet)
455void HSR_SetGoStop(uint8 GoStop)
477void HSR_SetGoStop_v2(uint8 GoStop)
494 uint8 TargetPosH;
495 uint8 TargetPosL;
497 uint8 ActionSpeedByte;
530 uint8 TargetPosH;
531 uint8 TargetPosL;
533 uint8 ActionSpeedByte;
567 uint8 TargetPosH;
568 uint8 TargetPosL;
571 uint8 ActionSpeedByte;
hsr_serial.h
102uint8 HSR_ReadEPPROM(uint8 addr); //Read a Specific EPPROM location
103void HSR_ReadEPPROM_v2(uint8 addr); //Read a Specific EPPROM location
104void HSR_WriteEPPROM(uint8 addr, uint8 data); //Write one byte data to the EPPROM
105void HSR_WriteEPPROM_v2(uint8 addr, uint8 data); //Write one byte data to the EPPROM
106uint8 HSR_ReadMemory(uint8 addr); //Read a specific memory location
107void HSR_ReadMemory_v2(uint8 addr); //Read a specific memory location
108void HSR_WriteMemory(uint8 addr, uint8 data); //Write Memory
109void HSR_WriteMemory_v2(uint8 addr, uint8 data); //Write Memory
110void HSR_SetPosition(uint8 PosH, uint8 PosL); //Set target position
111void HSR_SetPosition(uint8 ServoID, uint8 PosH, uint8 PosL); // Set target position of a specific servo. Overloaded version
112void HSR_SetInitialPosition(uint8 PosH, uint8 PosL); // Smooth Startup
117void HSR_SetSpeed(uint8 ServoID, uint8 ServoSpeed);// Set the peed of a single servo using its ID and read its current position
118void HSR_SetSpeed_v2(uint8 ServoID, uint8 ServoSpeed);// Set the peed of a single servo using its ID and read its current position
119void HSR_SelectControl(uint8 ControlSet); // Select control parameter set
120void HSR_SelectControl_v2(uint8 ControlSet); // Select control parameter set
121void HSR_SetGoStop(uint8 GoStop); // Set Go/Stop
122void HSR_SetGoStop_v2(uint8 GoStop); // Set Go/Stop
23uint8 _ServoID; // Servo ID
24uint8 _ServoVersion; // Servo version
25uint8 _ServoPosH; // Servo position high
26uint8 _ServoPosL; // Servo position low
27/*uint8 _ServoMinPosH; // Minimum servo position - High Byte
28uint8 _ServoMinPosL; // Minimum servo position - Low Byte
30uint8 _ServoMaxPosH; // Maximum servo position - High Byte
31uint8 _ServoMaxPosL; // Maximum servo position - Low Byte
33uint8 _ServoMidPosH; // Center servo position - High Byte
34uint8 _ServoMidPosL; // Center servo position - Low Byte
36uint8 _ServoSpeed; // Servo speed
37uint8 _temp=0; // */
40uint8 _RxCounter=0; // Counter for incoming data
42uint8 _CheckSum; // It is used for error checking
43uint8 _ServoPW; // Pulsewidth of PWM signal
44uint8 _ServoVoltage; // Voltage of PWM signal
project.h
10typedef unsigned int8 uint8;
usart.c
137void selectPort(uint8 port)
139 uint8 port_temp = 0;
147void listen(uint8 port)
149 uint8 rcData;
26uint8 USART_search_active = 0;
27uint8 USART_timer = 0;
28uint8 usart_rx_flag = 0;
30void initiateUSART(uint8 usart_Mode)
usart.h
44void txInitiate(uint8 sendByte);
48void initiateUSART(uint8 usart_Mode);
50void selectPort(uint8 myPort);

:: usart_rx_flag (v)

usart.c
154 while(usart_rx_flag)
166 usart_rx_flag = 1;
28uint8 usart_rx_flag = 0;
36 usart_rx_flag = 1;