21#define v5_device_e_t pros::c::v5_device_e_t
32#define VALIDATE_PORT_NO(PORT) ((PORT) >= 0 && (PORT) < NUM_V5_PORTS)
34#define VALIDATE_PORT_NO_INTERNAL(PORT) ((PORT) >= 0 && (PORT) < V5_MAX_DEVICE_PORTS)
51#define claim_port(port, device_type, error_code) \
52 if (registry_validate_binding(port, device_type) != 0) { \
55 v5_smart_device_s_t* device = registry_get_device(port); \
56 if (!port_mutex_take(port)) { \
70#define claim_port_i(port, device_type) claim_port(port, device_type, PROS_ERR)
81#define claim_port_f(port, device_type) claim_port(port, device_type, PROS_ERR_F)
113#define return_port(port, rtn) \
114 port_mutex_give(port); \
237#define V5_PORT_BATTERY 24
238#define V5_PORT_CONTROLLER_1 25
239#define V5_PORT_CONTROLLER_2 26
void port_mutex_take_all()
int32_t claim_port_try(uint8_t port, v5_device_e_t type)
void vdml_unset_port_error(uint8_t port)
int internal_port_mutex_give(uint8_t port)
int port_mutex_take(uint8_t port)
bool vdml_get_port_error(uint8_t port)
void vdml_set_port_error(uint8_t port)
int port_mutex_give(uint8_t port)
void port_mutex_give_all()
int internal_port_mutex_take(uint8_t port)