| aPad_ReadInt | Index |
Definition:
Parameters:
| stemRef | - | An opaque library reference representing the aStem library which manages the communication with the BrainStem modules. |
| module | - | The IIC address of the module whos scratch pad value is being accessed. This need not be the router. |
| padIndex | - | The index (zero-based) of the scratch pad int (2-byte) being read. |
| pValue | - | This is storage where the pad data (2-bytes) will be stored. |
Return Value:
Description:
This routine manages the BrainStem packet needed to retrieve a scratch pad 2-byte value from a Stem module. The data retrieved is a raw int.
Keep in mind that the TEAvm and scratch pad int size is two-bytes in network byte order. Your C compiler likely has a larger integer type. This routine will convert the byte order to be appropriate for your compiler. In other words, if you have 0x03 in scratchpad index 0 and 0xE8 in scratchpad 1. When you call this routine with padIndex = 0, the int returned will be 1000, regardless of what the word order is on your particular compiler.
Related: