summaryrefslogtreecommitdiff
path: root/src/class/cdc
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-10-24 00:19:19 +0700
committerGitHub <[email protected]>2021-10-24 00:19:19 +0700
commitffde3bd33d1fcd66c1ebc6019cde8e82ff43db3b (patch)
tree4119b44658bc6d66947ba0e4605fea16ea4ea678 /src/class/cdc
parentb541c0f5e07696ead205666e43c726b14277e0d9 (diff)
parent311c05b401591507cbc4977926bcc878d3f119aa (diff)
Merge pull request #1159 from hathach/fix-warnings
Increase compiler warnings flags
Diffstat (limited to 'src/class/cdc')
-rw-r--r--src/class/cdc/cdc_device.c2
-rw-r--r--src/class/cdc/cdc_host.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c
index e622bd616..74c116192 100644
--- a/src/class/cdc/cdc_device.c
+++ b/src/class/cdc/cdc_device.c
@@ -229,7 +229,7 @@ void cdcd_init(void)
{
cdcd_interface_t* p_cdc = &_cdcd_itf[i];
- p_cdc->wanted_char = -1;
+ p_cdc->wanted_char = (char) -1;
// default line coding is : stop bit = 1, parity = none, data bits = 8
p_cdc->line_coding.bit_rate = 115200;
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c
index e7eaf4d05..f4fb6c1d6 100644
--- a/src/class/cdc/cdc_host.c
+++ b/src/class/cdc/cdc_host.c
@@ -105,7 +105,7 @@ bool tuh_cdc_send(uint8_t dev_addr, void const * p_data, uint32_t length, bool i
uint8_t const ep_out = cdch_data[dev_addr-1].ep_out;
if ( usbh_edpt_busy(dev_addr, ep_out) ) return false;
- return usbh_edpt_xfer(dev_addr, ep_out, (void *) p_data, length);
+ return usbh_edpt_xfer(dev_addr, ep_out, (void*)(uintptr_t) p_data, length);
}
bool tuh_cdc_receive(uint8_t dev_addr, void * p_buffer, uint32_t length, bool is_notify)