15 #define EV3_VAR( decl ) \ 17 #define EV3_VAR_INIT( decl, ... ) \ 23 #define EV3_VAR( decl ) \ 25 #define EV3_VAR_INIT( decl, ... ) \ 28 #if __GNUC__ && !__GNUC_STDC_INLINE__ 57 #ifndef __ARM_ARCH_4T__ 74 typedef uint32_t dword;
78 typedef uint8_t INX_T;
79 typedef uint8_t FLAGS_T;
81 #define STR_unknown_ "<unknown>" 112 extern size_t ev3_write(
const char *fn,
char *value );
154 extern size_t ev3_write_char_array(
const char *fn,
char *value );
155 extern size_t ev3_write_byte_array(
const char *fn, uint8_t *value,
size_t sz );
168 extern size_t ev3_multi_write( uint8_t *sn, uint16_t pos,
const char *fn,
char *value );
169 extern size_t ev3_multi_write_bool( uint8_t *sn, uint16_t pos,
const char *fn,
bool value );
170 extern size_t ev3_multi_write_int( uint8_t *sn, uint16_t pos,
const char *fn,
int value );
171 extern size_t ev3_multi_write_dword( uint8_t *sn, uint16_t pos,
const char *fn, uint32_t value );
172 extern size_t ev3_multi_write_byte( uint8_t *sn, uint16_t pos,
const char *fn, uint8_t value );
173 extern size_t ev3_multi_write_float( uint8_t *sn, uint16_t pos,
const char *fn,
float value );
174 extern size_t ev3_multi_write_char_array( uint8_t *sn, uint16_t pos,
const char *fn,
char *value );
175 extern size_t ev3_multi_write_byte_array( uint8_t *sn, uint16_t pos,
const char *fn, uint8_t *value,
size_t sz );
193 extern size_t ev3_read(
const char *fn,
char *buf,
size_t sz );
235 extern size_t ev3_read_char_array(
const char *fn,
char *buf,
size_t sz );
236 extern size_t ev3_read_byte_array(
const char *fn, uint8_t *buf,
size_t sz );
245 extern size_t ev3_listdir(
const char *fn,
char *buf,
size_t sz );
size_t ev3_write_binary(const char *fn, char *data, size_t sz)
Write binary data into the specified file of the EV3 brick.
Definition: ev3.c:174
size_t ev3_write(const char *fn, char *value)
Write a string into the specified file.
Definition: ev3.c:207
size_t ev3_read_int(const char *fn, int *buf)
Read an integer value from the specified file.
Definition: ev3.c:316
size_t ev3_listdir(const char *fn, char *buf, size_t sz)
List files in the specified directory of the EV3 brick.
Definition: ev3.c:390
size_t ev3_read_float(const char *fn, float *buf)
Read a float value from the specified file.
Definition: ev3.c:344
void ev3_uninit(void)
Uninitialize the remote access.
Definition: ev3.c:169
size_t ev3_multi_write_binary(uint8_t *sn, uint16_t pos, const char *fn, char *data, size_t sz)
Write binary data into several specified files of the EV3 brick.
Definition: ev3.c:179
size_t ev3_write_float(const char *fn, float value)
Write a float value into the specified file.
Definition: ev3.c:249
bool ev3_poweroff(void)
Power-off the EV3 brick.
Definition: ev3.c:199
size_t ev3_write_int(const char *fn, int value)
Write an integer value into the specified file.
Definition: ev3.c:217
size_t ev3_read(const char *fn, char *buf, size_t sz)
Read a string from the specified file.
Definition: ev3.c:305
size_t ev3_read_byte(const char *fn, uint8_t *buf)
Read a byte value from the specified file.
Definition: ev3.c:369
size_t ev3_read_keys(uint8_t *buf)
Read state of the EV3 brick's keys.
Definition: ev3.c:189
size_t ev3_write_dword(const char *fn, uint32_t value)
Write an unsigned integer value into the specified file.
Definition: ev3.c:233
size_t ev3_write_byte(const char *fn, uint8_t value)
Write a byte value into the specified file.
Definition: ev3.c:275
size_t ev3_write_bool(const char *fn, bool value)
Write a boolean value into the specified file.
Definition: ev3.c:265
size_t ev3_read_binary(const char *fn, char *buf, size_t sz)
Read binary data from the specified file.
Definition: ev3.c:184
size_t ev3_read_bool(const char *fn, bool *buf)
Read a boolean value from the specified file.
Definition: ev3.c:358
EV3_VAR_INIT(char *ev3_brick_addr, NULL)
Predefined IP address of the EV3 brick.
int ev3_string_suffix(const char *prefix, char **s, uint32_t *buf)
Get a numerical suffix of the string.
Definition: ev3.c:401
int ev3_init(void)
Initialize the remote access and detect the EV3 brick. This function do nothing in the case of the lo...
Definition: ev3.c:154
size_t ev3_read_dword(const char *fn, uint32_t *buf)
Read an unsigned integer value from the specified file.
Definition: ev3.c:330