123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #ifndef ZEPHYR_INCLUDE_DRIVERS_CONSOLE_IPM_CONSOLE_H_
- #define ZEPHYR_INCLUDE_DRIVERS_CONSOLE_IPM_CONSOLE_H_
- #include <kernel.h>
- #include <device.h>
- #include <sys/ring_buffer.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define IPM_CONSOLE_STDOUT (BIT(0))
- #define IPM_CONSOLE_PRINTK (BIT(1))
- #define IPM_CONSOLE_STACK_SIZE CONFIG_IPM_CONSOLE_STACK_SIZE
- #define IPM_CONSOLE_PRI 2
- struct ipm_console_receiver_config_info {
-
- char *bind_to;
-
- k_thread_stack_t *thread_stack;
-
- uint32_t *ring_buf_data;
-
- unsigned int rb_size32;
-
- char *line_buf;
-
- unsigned int lb_size;
-
- unsigned int flags;
- };
- struct ipm_console_receiver_runtime_data {
-
- struct ring_buf rb;
-
- struct k_sem sem;
-
- const struct device *ipm_device;
-
- int channel_disabled;
-
- struct k_thread rx_thread;
- };
- struct ipm_console_sender_config_info {
-
- char *bind_to;
-
- int flags;
- };
- #if CONFIG_IPM_CONSOLE_RECEIVER
- int ipm_console_receiver_init(const struct device *d);
- #endif
- #if CONFIG_IPM_CONSOLE_SENDER
- int ipm_console_sender_init(const struct device *d);
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
|