EV3 Ports. More...
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "modp_numtoa.h"
#include "ev3.h"
#include "ev3_port.h"
Functions | |
size_t | get_port_address (uint8_t sn, char *buf, size_t sz) |
Read "address" attribute of the EV3 port. More... | |
size_t | get_port_driver_name (uint8_t sn, char *buf, size_t sz) |
Read "driver_name" attribute of the EV3 port. More... | |
size_t | get_port_mode (uint8_t sn, char *buf, size_t sz) |
Read "mode" attribute of the EV3 port. More... | |
size_t | set_port_mode (uint8_t sn, char *value) |
Write "mode" attribute of the EV3 port. More... | |
size_t | multi_set_port_mode (uint8_t *sn, char *value) |
Write "mode" attribute of several EV3 ports. More... | |
size_t | get_port_modes (uint8_t sn, char *buf, size_t sz) |
Read "modes" attribute of the EV3 port. More... | |
size_t | set_port_set_device (uint8_t sn, char *value) |
Write "set_device" attribute of the EV3 port. More... | |
size_t | multi_set_port_set_device (uint8_t *sn, char *value) |
Write "set_device" attribute of several EV3 ports. More... | |
size_t | get_port_status (uint8_t sn, char *buf, size_t sz) |
Read "status" attribute of the EV3 port. More... | |
const char * | ev3_port_type (INX_T type_inx) |
Get name of the specified EV3 port type. More... | |
INX_T | get_port_type_inx (uint8_t sn) |
Read "driver_name" attribute and get index of the EV3 port type. More... | |
size_t | get_port_desc (uint8_t sn, EV3_PORT *desc) |
Read EV3 port attributes that are required for filling the descriptor. More... | |
EV3_PORT * | ev3_port_desc (uint8_t sn) |
Get descriptor of the EV3 port. More... | |
INX_T | ev3_port_desc_type_inx (uint8_t sn) |
Get type from the EV3 port descriptor. More... | |
uint8_t | ev3_port_desc_port (uint8_t sn) |
Get EV3 port from the EV3 port descriptor. More... | |
uint8_t | ev3_port_desc_extport (uint8_t sn) |
Get extended port from the EV3 port descriptor. More... | |
uint8_t | ev3_port_desc_addr (uint8_t sn) |
Get I2C address from the EV3 port descriptor. More... | |
char * | ev3_port_port_name (uint8_t sn, char *buf) |
Assemble EV3 port name from the EV3 port descriptor. More... | |
bool | ev3_search_port_type (INX_T type_inx, uint8_t *sn, uint8_t from) |
Search of a sequence number of the specified EV3 port type. More... | |
bool | ev3_search_port_plugged_in (uint8_t port, uint8_t extport, uint8_t *sn, uint8_t from) |
Search of a sequence number the EV3 port by plug-in attributes. More... | |
const char * | ev3_port_mode (INX_T mode_inx) |
Get name of the specified EV3 port mode. More... | |
INX_T | get_port_mode_inx_of_type (uint8_t sn, INX_T type_inx) |
Read "mode" attribute of the specified EV3 port type and get the index. More... | |
INX_T | get_port_mode_inx (uint8_t sn) |
Read "mode" attribute of the EV3 port and get the index. More... | |
size_t | set_port_mode_inx (uint8_t sn, INX_T mode_inx) |
Write "mode" attribute of the EV3 port by the index. More... | |
size_t | multi_set_port_mode_inx (uint8_t *sn, INX_T mode_inx) |
Write "mode" attribute of several EV3 ports by the index. More... | |
int | ev3_port_init (void) |
Detect connected EV3 ports. More... | |
void | ev3_parse_port_name (char *name, uint8_t *port, uint8_t *extport, uint8_t *addr) |
Parse name of the EV3 port. More... | |
char * | ev3_port_name (uint8_t port, uint8_t extport, uint8_t addr, char *buf) |
Assemble name of the EV3 port. More... | |
uint8_t | ev3_search_port (uint8_t port, uint8_t extport) |
Search of a port sequence number by the EV3 port and the extended port. More... | |
EV3 Ports.
(ev3_port.yu-c)