test refractor

This commit is contained in:
hathach
2013-06-29 21:00:33 +07:00
parent 9e607f6dee
commit a943cce991
10 changed files with 80 additions and 179 deletions

View File

@@ -77,7 +77,7 @@ enum {
};
enum {
CDC_COMM_PROTOCOL_ATCOMMAND_ITU_V250 = 0x01 , // ITU-T V2.50
CDC_COMM_PROTOCOL_ATCOMMAND = 0x01 , // ITU-T V2.50
CDC_COMM_PROTOCOL_ATCOMMAND_PCCA_101 ,
CDC_COMM_PROTOCOL_ATCOMMAND_PCCA_101_AND_ANNEXO ,
CDC_COMM_PROTOCOL_ATCOMMAND_GSM_707 ,
@@ -217,8 +217,8 @@ typedef ATTR_PACKED_STRUCT(struct) {
uint8_t bLength ; ///< Size of this descriptor in bytes.
uint8_t bDescriptorType ; ///< Descriptor Type, must be Class-Specific
uint8_t bDescriptorSubType ; ///< Descriptor SubType one of above CDC_FUCN_DESC_
uint8_t bControlInterface ; ///< Interface number of Data Interface (zero-based)
uint8_t bSubordinateInterface[0] ; ///< Variable length array
uint8_t bControlInterface ; ///< Interface number of Communication Interface
uint8_t bSubordinateInterface[0] ; ///< Interface number of Data Interface
}tusb_cdc_func_union_t;
typedef ATTR_PACKED_STRUCT(struct) {

View File

@@ -79,17 +79,18 @@ typedef enum {
/// USB Descriptor Types (section 9.4 table 9-5)
typedef enum {
TUSB_DESC_TYPE_DEVICE =1 , ///< 1
TUSB_DESC_TYPE_CONFIGURATION , ///< 2
TUSB_DESC_TYPE_STRING , ///< 3
TUSB_DESC_TYPE_INTERFACE , ///< 4
TUSB_DESC_TYPE_ENDPOINT , ///< 5
TUSB_DESC_TYPE_DEVICE_QUALIFIER , ///< 6
TUSB_DESC_TYPE_OTHER_SPEED_CONFIGURATION , ///< 7
TUSB_DESC_TYPE_INTERFACE_POWER , ///< 8
TUSB_DESC_TYPE_OTG , ///< 9
TUSB_DESC_TYPE_DEBUG , ///< 10
TUSB_DESC_TYPE_INTERFACE_ASSOCIATION ///< 11
TUSB_DESC_TYPE_DEVICE = 0x01 ,
TUSB_DESC_TYPE_CONFIGURATION = 0x02 ,
TUSB_DESC_TYPE_STRING = 0x03 ,
TUSB_DESC_TYPE_INTERFACE = 0x04 ,
TUSB_DESC_TYPE_ENDPOINT = 0x05 ,
TUSB_DESC_TYPE_DEVICE_QUALIFIER = 0x06 ,
TUSB_DESC_TYPE_OTHER_SPEED_CONFIGURATION = 0x07 ,
TUSB_DESC_TYPE_INTERFACE_POWER = 0x08 ,
TUSB_DESC_TYPE_OTG = 0x09 ,
TUSB_DESC_TYPE_DEBUG = 0x0A ,
TUSB_DESC_TYPE_INTERFACE_ASSOCIATION = 0x0B ,
TUSB_DESC_TYPE_INTERFACE_CLASS_SPECIFIC = 0x24
}tusb_std_descriptor_type_t;
typedef enum {

View File

@@ -160,11 +160,11 @@ void osal_mutex_reset(osal_mutex_handle_t mutex_hdl);
// QUEUE API
//--------------------------------------------------------------------+
typedef struct{
uint32_t * const buffer ; ///< buffer pointer
uint8_t const depth ; ///< buffer size
volatile uint8_t count ; ///< bytes in fifo
volatile uint8_t wr_idx ; ///< write pointer
volatile uint8_t rd_idx ; ///< read pointer
uint32_t * const buffer ; ///< buffer pointer
uint8_t const depth ; ///< buffer size
volatile uint8_t count ; ///< bytes in fifo
volatile uint8_t wr_idx ; ///< write pointer
volatile uint8_t rd_idx ; ///< read pointer
} osal_queue_t;
typedef osal_queue_t * osal_queue_handle_t;

View File

@@ -68,7 +68,12 @@
/// define this symbol will make tinyusb look for external configure file
#include "mcu_capacity.h"
#include "tusb_config.h"
#ifdef TUSB_CFG_CONFIG_FILE
#include TUSB_CFG_CONFIG_FILE
#else
#include "tusb_config.h"
#endif
//--------------------------------------------------------------------+
// CONTROLLER