Classes | Defines | Functions
nfv2.h File Reference
#include <inttypes.h>
#include "../nfv2_config.h"
Include dependency graph for nfv2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  NF_STRUCT_ComBuf
struct  NF_STRUCT_ReadAnalogInputs
struct  NF_STRUCT_ReadDeviceVitals
struct  NF_STRUCT_Regulator
struct  NF_STRUCT_SetDigitalOutputs
struct  NF_STRUCT_SetDrivesMode
struct  NF_STRUCT_SetDrivesSpeed

Defines

#define NF_COMMAND_ReadAnalogInputs   0x3E
#define NF_COMMAND_ReadDeviceStatus   0x02
#define NF_COMMAND_ReadDeviceVitals   0x03
#define NF_COMMAND_ReadDigitalInputs   0x30
#define NF_COMMAND_ReadDistance   0x3D
#define NF_COMMAND_ReadDrivesCurrent   0x1B
#define NF_COMMAND_ReadDrivesPosition   0x1A
#define NF_COMMAND_ReadDrivesSpeed   0x1C
#define NF_COMMAND_ReadDrivesStatus   0x1F
#define NF_COMMAND_ReadServosCurrent   0x2B
#define NF_COMMAND_ReadServosPosition   0x2A
#define NF_COMMAND_ReadServosStatus   0x2F
#define NF_COMMAND_SetCurrentRegulator   0x40
#define NF_COMMAND_SetDigitalOutputs   0x31
#define NF_COMMAND_SetDisplayBacklight   0x52
#define NF_COMMAND_SetDisplayMode   0x50
#define NF_COMMAND_SetDisplayText   0x51
#define NF_COMMAND_SetDrivesCurrent   0x12
#define NF_COMMAND_SetDrivesMaxCurrent   0x15
#define NF_COMMAND_SetDrivesMaxPosition   0x18
#define NF_COMMAND_SetDrivesMaxSpeed   0x16
#define NF_COMMAND_SetDrivesMinPosition   0x17
#define NF_COMMAND_SetDrivesMisc   0x1E
#define NF_COMMAND_SetDrivesMode   0x10
#define NF_COMMAND_SetDrivesPosition   0x13
#define NF_COMMAND_SetDrivesPWM   0x14
#define NF_COMMAND_SetDrivesSpeed   0x11
#define NF_COMMAND_SetPositionRegulator   0x42
#define NF_COMMAND_SetServosMaxPosition   0x28
#define NF_COMMAND_SetServosMaxSpeed   0x26
#define NF_COMMAND_SetServosMinPosition   0x27
#define NF_COMMAND_SetServosMisc   0x2E
#define NF_COMMAND_SetServosMode   0x20
#define NF_COMMAND_SetServosPosition   0x21
#define NF_COMMAND_SetServosPositionAdj   0x29
#define NF_COMMAND_SetServosSpeed   0x22
#define NF_COMMAND_SetSpeedRegulator   0x41
#define NF_DATABYTES_ReadAnalogInputs   2
#define NF_DATABYTES_ReadDeviceVitals   2
#define NF_DATABYTES_Regulator   8
#define NF_DATABYTES_SetDigitalOutputs   1
#define NF_DATABYTES_SetDrivesMode   1
#define NF_DATABYTES_SetDrivesSpeed   4
#define NF_DEFAULT_SetServosMaxPosition   1700
#define NF_DEFAULT_SetServosMinPosition   1300
#define NF_DEFAULT_SetServosPosition   1500
#define NF_DEFAULT_SetServosPositionAdj   0
#define NF_DrivesMode_CURRENT   0x03
#define NF_DrivesMode_ERROR   0x00
#define NF_DrivesMode_MANUAL   0x01
#define NF_DrivesMode_POSITION   0x04
#define NF_DrivesMode_PWM   0x05
#define NF_DrivesMode_SPEED   0x02
#define NF_DrivesMode_SYNC_POS0   0x11
#define NF_DrivesMode_SYNC_PWM0   0x10
#define POLYNOMIAL   0xD8 /* 11011 followed by 0's */
#define TOPBIT   (1 << (WIDTH - 1))
#define WIDTH   (8 * sizeof(uint8_t))

Functions

void NF_ComBufReset (NF_STRUCT_ComBuf *NFComBuf)
uint8_t NF_Interpreter (NF_STRUCT_ComBuf *NFComBuf, uint8_t *rxBuf, uint8_t *rxPt, uint8_t *commandArray, uint8_t *commandCnt)
uint8_t NF_MakeCommandFrame (NF_STRUCT_ComBuf *NFComBuf, uint8_t *txBuf, const uint8_t *commandArray, uint8_t commandCnt, uint8_t addr)
void NFv2_Config (NF_STRUCT_ComBuf *NFComBuf, uint8_t myAddress)
void NFv2_Config2 (NF_STRUCT_ComBuf *NFComBuf, uint8_t myAddress, uint8_t slaveAddress)
uint8_t NFv2_CrcFast (const uint8_t message[], uint8_t nBytes)
void NFv2_CrcInit (void)

Define Documentation

#define NF_COMMAND_ReadAnalogInputs   0x3E

Definition at line 53 of file nfv2.h.

#define NF_COMMAND_ReadDeviceStatus   0x02

Definition at line 14 of file nfv2.h.

#define NF_COMMAND_ReadDeviceVitals   0x03

Definition at line 15 of file nfv2.h.

#define NF_COMMAND_ReadDigitalInputs   0x30

Definition at line 50 of file nfv2.h.

#define NF_COMMAND_ReadDistance   0x3D

Definition at line 55 of file nfv2.h.

#define NF_COMMAND_ReadDrivesCurrent   0x1B

Definition at line 28 of file nfv2.h.

#define NF_COMMAND_ReadDrivesPosition   0x1A

Definition at line 27 of file nfv2.h.

#define NF_COMMAND_ReadDrivesSpeed   0x1C

Definition at line 29 of file nfv2.h.

#define NF_COMMAND_ReadDrivesStatus   0x1F

Definition at line 31 of file nfv2.h.

#define NF_COMMAND_ReadServosCurrent   0x2B

Definition at line 46 of file nfv2.h.

#define NF_COMMAND_ReadServosPosition   0x2A

Definition at line 45 of file nfv2.h.

#define NF_COMMAND_ReadServosStatus   0x2F

Definition at line 48 of file nfv2.h.

#define NF_COMMAND_SetCurrentRegulator   0x40

Definition at line 33 of file nfv2.h.

#define NF_COMMAND_SetDigitalOutputs   0x31

Definition at line 51 of file nfv2.h.

#define NF_COMMAND_SetDisplayBacklight   0x52

Definition at line 59 of file nfv2.h.

#define NF_COMMAND_SetDisplayMode   0x50

Definition at line 57 of file nfv2.h.

#define NF_COMMAND_SetDisplayText   0x51

Definition at line 58 of file nfv2.h.

#define NF_COMMAND_SetDrivesCurrent   0x12

Definition at line 19 of file nfv2.h.

#define NF_COMMAND_SetDrivesMaxCurrent   0x15

Definition at line 22 of file nfv2.h.

Definition at line 25 of file nfv2.h.

#define NF_COMMAND_SetDrivesMaxSpeed   0x16

Definition at line 23 of file nfv2.h.

Definition at line 24 of file nfv2.h.

#define NF_COMMAND_SetDrivesMisc   0x1E

Definition at line 30 of file nfv2.h.

#define NF_COMMAND_SetDrivesMode   0x10

Definition at line 17 of file nfv2.h.

#define NF_COMMAND_SetDrivesPosition   0x13

Definition at line 20 of file nfv2.h.

#define NF_COMMAND_SetDrivesPWM   0x14

Definition at line 21 of file nfv2.h.

#define NF_COMMAND_SetDrivesSpeed   0x11

Definition at line 18 of file nfv2.h.

Definition at line 35 of file nfv2.h.

Definition at line 42 of file nfv2.h.

#define NF_COMMAND_SetServosMaxSpeed   0x26

Definition at line 40 of file nfv2.h.

Definition at line 41 of file nfv2.h.

#define NF_COMMAND_SetServosMisc   0x2E

Definition at line 47 of file nfv2.h.

#define NF_COMMAND_SetServosMode   0x20

Definition at line 37 of file nfv2.h.

#define NF_COMMAND_SetServosPosition   0x21

Definition at line 38 of file nfv2.h.

Definition at line 43 of file nfv2.h.

#define NF_COMMAND_SetServosSpeed   0x22

Definition at line 39 of file nfv2.h.

#define NF_COMMAND_SetSpeedRegulator   0x41

Definition at line 34 of file nfv2.h.

Definition at line 405 of file nfv2.h.

Definition at line 80 of file nfv2.h.

#define NF_DATABYTES_Regulator   8

Definition at line 243 of file nfv2.h.

Definition at line 394 of file nfv2.h.

Definition at line 91 of file nfv2.h.

Definition at line 109 of file nfv2.h.

Definition at line 63 of file nfv2.h.

Definition at line 62 of file nfv2.h.

#define NF_DEFAULT_SetServosPosition   1500

Definition at line 61 of file nfv2.h.

Definition at line 64 of file nfv2.h.

#define NF_DrivesMode_CURRENT   0x03

Definition at line 100 of file nfv2.h.

#define NF_DrivesMode_ERROR   0x00

Definition at line 97 of file nfv2.h.

#define NF_DrivesMode_MANUAL   0x01

Definition at line 98 of file nfv2.h.

#define NF_DrivesMode_POSITION   0x04

Definition at line 101 of file nfv2.h.

#define NF_DrivesMode_PWM   0x05

Definition at line 102 of file nfv2.h.

#define NF_DrivesMode_SPEED   0x02

Definition at line 99 of file nfv2.h.

#define NF_DrivesMode_SYNC_POS0   0x11

Definition at line 104 of file nfv2.h.

#define NF_DrivesMode_SYNC_PWM0   0x10

Definition at line 103 of file nfv2.h.

#define POLYNOMIAL   0xD8 /* 11011 followed by 0's */

Definition at line 635 of file nfv2.h.

#define TOPBIT   (1 << (WIDTH - 1))

Definition at line 637 of file nfv2.h.

#define WIDTH   (8 * sizeof(uint8_t))

Definition at line 636 of file nfv2.h.


Function Documentation

void NF_ComBufReset ( NF_STRUCT_ComBuf NFComBuf)

Definition at line 2070 of file nfv2.c.

uint8_t NF_Interpreter ( NF_STRUCT_ComBuf NFComBuf,
uint8_t *  rxBuf,
uint8_t *  rxPt,
uint8_t *  commandArray,
uint8_t *  commandCnt 
)

Definition at line 14 of file nfv2.c.

uint8_t NF_MakeCommandFrame ( NF_STRUCT_ComBuf NFComBuf,
uint8_t *  txBuf,
const uint8_t *  commandArray,
uint8_t  commandCnt,
uint8_t  addr 
)

Definition at line 1044 of file nfv2.c.

void NFv2_Config ( NF_STRUCT_ComBuf NFComBuf,
uint8_t  myAddress 
)

Definition at line 4 of file nfv2_config.c.

void NFv2_Config2 ( NF_STRUCT_ComBuf NFComBuf,
uint8_t  myAddress,
uint8_t  slaveAddress 
)
uint8_t NFv2_CrcFast ( const uint8_t  message[],
uint8_t  nBytes 
)

Definition at line 2359 of file nfv2.c.

void NFv2_CrcInit ( void  )

Definition at line 2317 of file nfv2.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


elektron_base
Author(s): Konrad Banachowicz
autogenerated on Thu Nov 14 2013 11:57:04