ESP8266 part of the f105-motor-demo project (see f105-motor-demo_stm32)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
f105-motor-demo_esp/user/datalink.c

28 lines
414 B

#include "esp8266.h"
#include "uart_driver.h"
#include "sbmp.h"
#include "datalink.h"
/** func used for sending bytes by SBMP */
static void u0_putc(uint8_t c)
{
UART_WriteCharCRLF(UART0, c, 0);
}
static void dg_handler(SBMP_Datagram *dg)
{
sbmp_info("Datagram received.");
}
static SBMP_Endpoint *ep;
/** Datalink */
void datalinkInit(void)
{
ep = sbmp_ep_init(NULL, NULL, 256, dg_handler, u0_putc);
}