s/USBTMC488/USB488/ ; fix types in bitfield

This commit is contained in:
Nathan Conrad 2019-09-19 19:54:37 -04:00
parent 7e0490bbf3
commit d742c3e15c
2 changed files with 11 additions and 11 deletions

View File

@ -139,9 +139,9 @@ TU_VERIFY_STATIC(sizeof(usbtmc_msg_request_vendor_specific_in) == 12u, "struct w
/*
typedef struct TU_ATTR_PACKED {
struct {
uint8_t Recipient : 5 ; ///< EOM set on last byte
uint8_t Type : 2 ; ///< EOM set on last byte
uint8_t DirectionToHost : 1 ; ///< 0 is OUT, 1 is IN
unsigned int Recipient : 5 ; ///< EOM set on last byte
unsigned int Type : 2 ; ///< EOM set on last byte
unsigned int DirectionToHost : 1 ; ///< 0 is OUT, 1 is IN
} bmRequestType;
uint8_t bRequest ; ///< If bmRequestType.Type = Class, see usmtmc_request_type_enum
uint16_t wValue ;
@ -176,10 +176,10 @@ typedef enum {
USBTMC_bREQUEST_INDICATOR_PULSE = 64u, // Optional
/****** USBTMC 488 *************/
USBTMC488_bREQUEST_READ_STATUS_BYTE = 128u,
USBTMC488_bREQUEST_REN_CONTROL = 160u,
USBTMC488_bREQUEST_GO_TO_LOCAL = 161u,
USBTMC488_bREQUEST_LOCAL_LOCKOUT = 162u,
USB488_bREQUEST_READ_STATUS_BYTE = 128u,
USB488_bREQUEST_REN_CONTROL = 160u,
USB488_bREQUEST_GO_TO_LOCAL = 161u,
USB488_bREQUEST_LOCAL_LOCKOUT = 162u,
} usmtmc_request_type_enum;

View File

@ -727,7 +727,7 @@ bool usbtmcd_control_request(uint8_t rhport, tusb_control_request_t const * requ
#if (USBTMC_CFG_ENABLE_488)
// USB488 required requests
case USBTMC488_bREQUEST_READ_STATUS_BYTE:
case USB488_bREQUEST_READ_STATUS_BYTE:
{
usbtmc_read_stb_rsp_488_t rsp;
TU_VERIFY(request->bmRequestType == 0xA1); // in,class,interface
@ -763,9 +763,9 @@ bool usbtmcd_control_request(uint8_t rhport, tusb_control_request_t const * requ
return true;
}
// USB488 optional requests
case USBTMC488_bREQUEST_REN_CONTROL:
case USBTMC488_bREQUEST_GO_TO_LOCAL:
case USBTMC488_bREQUEST_LOCAL_LOCKOUT:
case USB488_bREQUEST_REN_CONTROL:
case USB488_bREQUEST_GO_TO_LOCAL:
case USB488_bREQUEST_LOCAL_LOCKOUT:
{
TU_VERIFY(request->bmRequestType == 0xA1); // in,class,interface
TU_VERIFY(false);