fix build warnings
This commit is contained in:
@@ -183,9 +183,9 @@ bool tcd_init(uint8_t rhport, uint32_t port_type) {
|
||||
|
||||
// Read Voltage State on CC1 & CC2 fore initial state
|
||||
uint32_t v_cc[2];
|
||||
(void) v_cc;
|
||||
v_cc[0] = (UCPD1->SR >> UCPD_SR_TYPEC_VSTATE_CC1_Pos) & 0x03;
|
||||
v_cc[1] = (UCPD1->SR >> UCPD_SR_TYPEC_VSTATE_CC2_Pos) & 0x03;
|
||||
|
||||
TU_LOG1("Initial VState CC1 = %lu, CC2 = %lu\r\n", v_cc[0], v_cc[1]);
|
||||
|
||||
// Enable CC1 & CC2 Interrupt
|
||||
@@ -308,8 +308,11 @@ void tcd_int_handler(uint8_t rhport) {
|
||||
|
||||
if (!(sr & UCPD_SR_RXERR)) {
|
||||
// response with good crc
|
||||
_good_crc.msg_id = ((pd_header_t const*) _rx_buf)->msg_id;
|
||||
dma_tx_start(rhport, &_good_crc, 2);
|
||||
// TODO move this to usbc stack
|
||||
if (_rx_buf) {
|
||||
_good_crc.msg_id = ((pd_header_t const *) _rx_buf)->msg_id;
|
||||
dma_tx_start(rhport, &_good_crc, 2);
|
||||
}
|
||||
|
||||
result = XFER_RESULT_SUCCESS;
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user