Commit 73053612 authored by Astro's avatar Astro
Browse files

firmware: update to v1.13

parent ea39dcb0
Pipeline #4351 failed with stage
in 12 minutes and 41 seconds
Subproject commit 62c4ddcf0fa1687b0a49e062001bc2183ead0242
Subproject commit 7bea71cc5b32cf290313050384db2fcd717ef2a3
......@@ -158,16 +158,16 @@ int epic_read_thermistor_voltage(float *result)
}
/* Autogenerated stub for API_UART_WRITE_STR */
void epic_uart_write_str( const char *str, intptr_t length )
void epic_uart_write_str( const char *str, size_t length )
{
const int epc__apistub_size = sizeof(const char *) + sizeof(intptr_t);
const int epc__apistub_size = sizeof(const char *) + sizeof(size_t);
void*epc__apistub_buffer;
epc__apistub_buffer = _api_call_start(API_UART_WRITE_STR, epc__apistub_size);
/* TODO: Check if epc__apistub_buffer is not NULL */
*(const char **)(epc__apistub_buffer + 0) = str;
*(intptr_t*)(epc__apistub_buffer + sizeof(const char *)) = length;
*(size_t*)(epc__apistub_buffer + sizeof(const char *)) = length;
_api_call_transact(epc__apistub_buffer);
}
......@@ -1296,6 +1296,52 @@ void epic_ws2812_write(uint8_t pin, uint8_t *pixels, uint32_t n_bytes)
_api_call_transact(epc__apistub_buffer);
}
/* Autogenerated stub for API_CONFIG_GET_INTEGER */
int epic_config_get_integer(const char *key, int *value)
{
const int epc__apistub_size = sizeof(const char *) + sizeof(int *);
void*epc__apistub_buffer;
epc__apistub_buffer = _api_call_start(API_CONFIG_GET_INTEGER, epc__apistub_size);
/* TODO: Check if epc__apistub_buffer is not NULL */
*(const char **)(epc__apistub_buffer + 0) = key;
*(int **)(epc__apistub_buffer + sizeof(const char *)) = value;
return *(int*)_api_call_transact(epc__apistub_buffer);
}
/* Autogenerated stub for API_CONFIG_GET_BOOLEAN */
int epic_config_get_boolean(const char *key, _Bool *value)
{
const int epc__apistub_size = sizeof(const char *) + sizeof(_Bool *);
void*epc__apistub_buffer;
epc__apistub_buffer = _api_call_start(API_CONFIG_GET_BOOLEAN, epc__apistub_size);
/* TODO: Check if epc__apistub_buffer is not NULL */
*(const char **)(epc__apistub_buffer + 0) = key;
*(_Bool **)(epc__apistub_buffer + sizeof(const char *)) = value;
return *(int*)_api_call_transact(epc__apistub_buffer);
}
/* Autogenerated stub for API_CONFIG_GET_STRING */
int epic_config_get_string(const char *key, char *buf, size_t buf_len)
{
const int epc__apistub_size = sizeof(const char *) + sizeof(char *) + sizeof(size_t);
void*epc__apistub_buffer;
epc__apistub_buffer = _api_call_start(API_CONFIG_GET_STRING, epc__apistub_size);
/* TODO: Check if epc__apistub_buffer is not NULL */
*(const char **)(epc__apistub_buffer + 0) = key;
*(char **)(epc__apistub_buffer + sizeof(const char *)) = buf;
*(size_t*)(epc__apistub_buffer + sizeof(const char *) + sizeof(char *)) = buf_len;
return *(int*)_api_call_transact(epc__apistub_buffer);
}
/* Weakly linked stubs for ISRs */
void __epic_isr_reset(api_int_id_t id)
......
......@@ -61,7 +61,7 @@ void __api_dispatch_call(uint32_t id, void*epc__apistub_buffer)
case API_UART_WRITE_STR:
epic_uart_write_str(
*(const char **)(epc__apistub_buffer + 0),
*(intptr_t*)(epc__apistub_buffer + sizeof(const char *))
*(size_t*)(epc__apistub_buffer + sizeof(const char *))
);
break;
case API_UART_READ_CHAR:
......@@ -495,6 +495,25 @@ void __api_dispatch_call(uint32_t id, void*epc__apistub_buffer)
*(uint32_t*)(epc__apistub_buffer + sizeof(uint8_t) + sizeof(uint8_t *))
);
break;
case API_CONFIG_GET_INTEGER:
*((int*)epc__apistub_buffer) = epic_config_get_integer(
*(const char **)(epc__apistub_buffer + 0),
*(int **)(epc__apistub_buffer + sizeof(const char *))
);
break;
case API_CONFIG_GET_BOOLEAN:
*((int*)epc__apistub_buffer) = epic_config_get_boolean(
*(const char **)(epc__apistub_buffer + 0),
*(_Bool **)(epc__apistub_buffer + sizeof(const char *))
);
break;
case API_CONFIG_GET_STRING:
*((int*)epc__apistub_buffer) = epic_config_get_string(
*(const char **)(epc__apistub_buffer + 0),
*(char **)(epc__apistub_buffer + sizeof(const char *)),
*(size_t*)(epc__apistub_buffer + sizeof(const char *) + sizeof(char *))
);
break;
default:
/* TODO: Better error handling */
LOG_ERR("api-dispatcher", "API function 0x%lx is unknown!!", id);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment