Added warning for IO callback stubs to make sure they get implemented.

pull/1117/head
David Garske 2017-09-12 08:41:08 -07:00
parent a02903c43e
commit d4b18a6d3f
1 changed files with 4 additions and 2 deletions

View File

@ -32,12 +32,13 @@
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
static int CbIORecv(WOLFSSL *ssl, char *buf, int sz, void *ctx) static int CbIORecv(WOLFSSL *ssl, char *buf, int sz, void *ctx)
{ {
int ret = sz; int ret = WOLFSSL_CBIO_ERR_GENERAL;
(void)ssl; (void)ssl;
(void)ctx; (void)ctx;
/* TODO: Exchange data over your own transport */ /* TODO: Exchange data over your own transport */
#warning TODO: Implement your own recv data transport
#if 0 #if 0
ret = usart_read_buffer_wait(&cdc_uart_module, buf, sz); ret = usart_read_buffer_wait(&cdc_uart_module, buf, sz);
if (ret == STATUS_ERR_TIMEOUT) if (ret == STATUS_ERR_TIMEOUT)
@ -51,12 +52,13 @@ static int CbIORecv(WOLFSSL *ssl, char *buf, int sz, void *ctx)
static int CbIOSend(WOLFSSL *ssl, char *buf, int sz, void *ctx) static int CbIOSend(WOLFSSL *ssl, char *buf, int sz, void *ctx)
{ {
int ret = sz; int ret = WOLFSSL_CBIO_ERR_GENERAL;
(void)ssl; (void)ssl;
(void)ctx; (void)ctx;
/* TODO: Exchange data over your own transport */ /* TODO: Exchange data over your own transport */
#warning TODO: Implement your own send data transport
#if 0 #if 0
ret = usart_write_buffer_wait(&cdc_uart_module, buf, sz); ret = usart_write_buffer_wait(&cdc_uart_module, buf, sz);
if (ret == STATUS_ERR_TIMEOUT) if (ret == STATUS_ERR_TIMEOUT)