esp.h 675 B

1234567891011121314151617181920212223
  1. #ifndef RV32_ESP_H
  2. #define RV32_ESP_H
  3. #include "compiler.h"
  4. #include "esplink.h"
  5. extern void esp_init(void);
  6. extern void esp_ota(const void *, size_t);
  7. extern size_t esp_rb_read(enum esplink_ringbuf_user ring,
  8. void *data, size_t len);
  9. extern size_t esp_rb_write(enum esplink_ringbuf_user ring,
  10. const void *data, size_t len);
  11. extern int esp_rb_getc(enum esplink_ringbuf_user ring);
  12. extern int esp_rb_putc(enum esplink_ringbuf_user ring, uint8_t data);
  13. enum ringbuf_status {
  14. RB_RXDATA = 1,
  15. RB_TXFREE = 2,
  16. RB_SUSPEND = 4,
  17. RB_CONNECTED = 8
  18. };
  19. extern enum ringbuf_status esp_rb_status(enum esplink_ringbuf_user ring);
  20. #endif /* RV32_ESP_H */