trikRuntime
usbMSP430Interface.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint32_t hex2num (char *string, uint16_t pos, uint16_t numsize)
 Extract number from packet. More...
 
void makeWriteRegPacket (char *msp_packet, uint8_t dev_addr, uint8_t reg_addr, uint32_t reg_val)
 Make write register packet. More...
 
void makeReadRegPacket (char *msp_packet, uint8_t dev_addr, uint8_t reg_addr)
 Make read register packet. More...
 
uint32_t init_USBTTYDevice ()
 Init USB TTY device. More...
 
uint32_t sendUSBPacket (char *in_msp_packet, char *out_msp_packet)
 Send USB packet. More...
 
uint32_t decodeReceivedPacket (char *msp_packet, uint8_t &dev_addr, uint8_t &func_code, uint8_t &reg_addr, uint32_t &reg_val)
 Function for decoding received packet. More...
 
uint32_t init_motors_USBMSP ()
 Init motors. More...
 
uint32_t init_servomotors_USBMSP ()
 Init servo motors. More...
 
uint32_t init_encoders_USBMSP ()
 Init encoders. More...
 
uint32_t init_sensors_USBMSP ()
 Init sensors. More...
 
uint32_t init_dhtxx_sensors_USBMSP ()
 Init DHTxx sensors. More...
 
uint32_t init_i2c_sensors_USBMSP ()
 Init I2C sensors. More...
 
uint32_t power_Motor (QByteArray const &i2c_data)
 Motor power control function. More...
 
uint32_t freq_Motor (QByteArray const &i2c_data)
 Set motor frequency function. More...
 
uint32_t reset_Encoder (QByteArray const &i2c_data)
 Reset encoder function. More...
 
uint32_t read_Encoder (QByteArray const &i2c_data)
 Read encoder function. More...
 
uint32_t read_Sensor (QByteArray const &i2c_data)
 Read sensor function. More...
 
uint32_t init_URM04 (uint8_t i2c_addr, uint8_t usart_addr)
 Init I2C + USART + URM04. More...
 
uint32_t read_URM04_dist (uint8_t dev_addr, uint8_t urm04_addr)
 Read URM04 distance function. More...
 
uint32_t connect_USBMSP ()
 Connect to USB MSP430 device. More...
 
uint32_t disconnect_USBMSP ()
 Disconnect from USB MSP430 device. More...
 
uint32_t send_USBMSP (QByteArray const &i2c_data)
 Send data to MSP430 via USB. More...
 
uint32_t read_USBMSP (QByteArray const &i2c_data)
 Read data from MSP430 via USB. More...
 

Function Documentation

uint32_t connect_USBMSP ( )

Connect to USB MSP430 device.

uint32_t decodeReceivedPacket ( char *  msp_packet,
uint8_t &  dev_addr,
uint8_t &  func_code,
uint8_t &  reg_addr,
uint32_t &  reg_val 
)

Function for decoding received packet.

uint32_t disconnect_USBMSP ( )

Disconnect from USB MSP430 device.

uint32_t freq_Motor ( QByteArray const &  i2c_data)

Set motor frequency function.

uint32_t hex2num ( char *  string,
uint16_t  pos,
uint16_t  numsize 
)

Extract number from packet.

uint32_t init_dhtxx_sensors_USBMSP ( )

Init DHTxx sensors.

uint32_t init_encoders_USBMSP ( )

Init encoders.

uint32_t init_i2c_sensors_USBMSP ( )

Init I2C sensors.

uint32_t init_motors_USBMSP ( )

Init motors.

Init motors.

uint32_t init_sensors_USBMSP ( )

Init sensors.

uint32_t init_servomotors_USBMSP ( )

Init servo motors.

uint32_t init_URM04 ( uint8_t  i2c_addr,
uint8_t  usart_addr 
)

Init I2C + USART + URM04.

uint32_t init_USBTTYDevice ( )

Init USB TTY device.

void makeReadRegPacket ( char *  msp_packet,
uint8_t  dev_addr,
uint8_t  reg_addr 
)

Make read register packet.

void makeWriteRegPacket ( char *  msp_packet,
uint8_t  dev_addr,
uint8_t  reg_addr,
uint32_t  reg_val 
)

Make write register packet.

uint32_t power_Motor ( QByteArray const &  i2c_data)

Motor power control function.

uint32_t read_Encoder ( QByteArray const &  i2c_data)

Read encoder function.

uint32_t read_Sensor ( QByteArray const &  i2c_data)

Read sensor function.

uint32_t read_URM04_dist ( uint8_t  dev_addr,
uint8_t  urm04_addr 
)

Read URM04 distance function.

uint32_t read_USBMSP ( QByteArray const &  i2c_data)

Read data from MSP430 via USB.

uint32_t reset_Encoder ( QByteArray const &  i2c_data)

Reset encoder function.

uint32_t send_USBMSP ( QByteArray const &  i2c_data)

Send data to MSP430 via USB.

uint32_t sendUSBPacket ( char *  in_msp_packet,
char *  out_msp_packet 
)

Send USB packet.