kopia lustrzana https://github.com/espressif/esp-idf
rodzic
47d28fdebc
commit
1741ae941e
|
@ -122,7 +122,7 @@ static void send_task(void *param)
|
|||
|
||||
static inline void start_task(const test_task_param_t *test_task_param)
|
||||
{
|
||||
xTaskCreate(send_task, "send_task", 4*1024, (void *) test_task_param, 5, NULL);
|
||||
xTaskCreate(send_task, "send_task", 8*1024, (void *) test_task_param, 5, NULL);
|
||||
}
|
||||
|
||||
static void init(int *uart_fd, int *socket_fd)
|
||||
|
@ -206,6 +206,9 @@ TEST_CASE("UART can do select()", "[vfs]")
|
|||
deinit(uart_fd, socket_fd);
|
||||
}
|
||||
|
||||
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3)
|
||||
// TODO ESP32C3 IDF-2457
|
||||
|
||||
TEST_CASE("UART can do poll()", "[vfs]")
|
||||
{
|
||||
int uart_fd;
|
||||
|
@ -267,6 +270,9 @@ TEST_CASE("UART can do poll()", "[vfs]")
|
|||
deinit(uart_fd, socket_fd);
|
||||
}
|
||||
|
||||
#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C3)
|
||||
|
||||
|
||||
TEST_CASE("socket can do select()", "[vfs]")
|
||||
{
|
||||
int uart_fd;
|
||||
|
|
|
@ -325,14 +325,14 @@ TEST_CASE("Can use termios for UART", "[vfs]")
|
|||
TEST_ASSERT_EQUAL(230423, baudrate);
|
||||
|
||||
tios.c_cflag |= BOTHER;
|
||||
tios.c_ispeed = tios.c_ospeed = 213;
|
||||
tios.c_ispeed = tios.c_ospeed = 42321;
|
||||
TEST_ASSERT_EQUAL(0, tcsetattr(uart_fd, TCSANOW, &tios));
|
||||
TEST_ASSERT_EQUAL(0, tcgetattr(uart_fd, &tios_result));
|
||||
TEST_ASSERT_EQUAL(BOTHER, tios_result.c_cflag & BOTHER);
|
||||
TEST_ASSERT_EQUAL(213, tios_result.c_ispeed);
|
||||
TEST_ASSERT_EQUAL(213, tios_result.c_ospeed);
|
||||
TEST_ASSERT_EQUAL(42321, tios_result.c_ispeed);
|
||||
TEST_ASSERT_EQUAL(42321, tios_result.c_ospeed);
|
||||
TEST_ASSERT_EQUAL(ESP_OK, uart_get_baudrate(UART_NUM_1, &baudrate));
|
||||
TEST_ASSERT_EQUAL(213, baudrate);
|
||||
TEST_ASSERT_EQUAL(42321, baudrate);
|
||||
|
||||
memset(&tios_result, 0xFF, sizeof(struct termios));
|
||||
}
|
||||
|
|
|
@ -114,6 +114,7 @@ static vfs_semihost_ctx_t s_semhost_ctx[CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS];
|
|||
|
||||
static inline int generic_syscall(int sys_nr, int arg1, int arg2, int arg3, int arg4, int* ret_errno)
|
||||
{
|
||||
#if !CONFIG_IDF_TARGET_ESP32C3 // TODO ESP32-C3 reenable semihost in C3 IDF-2287
|
||||
int host_ret, host_errno;
|
||||
|
||||
if (!esp_cpu_in_ocd_debug_mode()) {
|
||||
|
@ -134,6 +135,10 @@ static inline int generic_syscall(int sys_nr, int arg1, int arg2, int arg3, int
|
|||
:"a2","a3","a4","a5","a6");
|
||||
*ret_errno = host_errno;
|
||||
return host_ret;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
inline bool ctx_is_unused(const vfs_semihost_ctx_t* ctx)
|
||||
|
|
|
@ -291,6 +291,7 @@ static ssize_t uart_read(int fd, void* data, size_t size)
|
|||
static int uart_fstat(int fd, struct stat * st)
|
||||
{
|
||||
assert(fd >=0 && fd < 3);
|
||||
st->st_blksize = BUFSIZ;
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue