avoid 'enumerated type mixed with another type warnings' by IAR

This commit is contained in:
matthias.ringwald 2011-07-22 10:09:45 +00:00
parent 27571f8777
commit 7d3b3569b0
6 changed files with 10 additions and 7 deletions

View File

@ -108,7 +108,7 @@ static hci_connection_t * create_connection_for_addr(bd_addr_t addr){
if (!conn) return NULL;
BD_ADDR_COPY(conn->address, addr);
conn->con_handle = 0xffff;
conn->authentication_flags = 0;
conn->authentication_flags = AUTH_FLAGS_NONE;
#ifdef HAVE_TIME
linked_item_set_user(&conn->timeout.item, conn);
conn->timeout.process = hci_connection_timeout_handler;

View File

@ -153,6 +153,7 @@ extern "C" {
* Connection State
*/
typedef enum {
AUTH_FLAGS_NONE = 0x00,
RECV_LINK_KEY_REQUEST = 0x01,
HANDLE_LINK_KEY_REQUEST = 0x02,
SENT_LINK_KEY_REPLY = 0x04,

View File

@ -83,6 +83,7 @@ typedef enum {
} L2CAP_STATE;
typedef enum {
STATE_VAR_NONE = 0,
STATE_VAR_RCVD_CONF_REQ = 1 << 0,
STATE_VAR_RCVD_CONF_RSP = 1 << 1,
STATE_VAR_SEND_CONF_REQ = 1 << 2,
@ -501,7 +502,7 @@ void l2cap_create_channel_internal(void * connection, btstack_packet_handler_t p
// set initial state
chan->state = L2CAP_STATE_WILL_SEND_CREATE_CONNECTION;
chan->state_var = 0;
chan->state_var = STATE_VAR_NONE;
chan->remote_sig_id = L2CAP_SIG_ID_INVALID;
chan->local_sig_id = L2CAP_SIG_ID_INVALID;
@ -697,7 +698,7 @@ static void l2cap_handle_connection_request(hci_con_handle_t handle, uint8_t sig
// set initial state
channel->state = L2CAP_STATE_WAIT_CLIENT_ACCEPT_OR_REJECT;
channel->state_var = 0;
channel->state_var = STATE_VAR_NONE;
// add to connections list
linked_list_add(&l2cap_channels, (linked_item_t *) channel);

View File

@ -118,6 +118,7 @@ typedef enum {
} RFCOMM_CHANNEL_STATE;
typedef enum {
STATE_VAR_NONE = 0,
STATE_VAR_CLIENT_ACCEPTED = 1 << 0,
STATE_VAR_RCVD_PN = 1 << 1,
STATE_VAR_RCVD_RPN = 1 << 2,
@ -443,7 +444,7 @@ static void rfcomm_channel_initialize(rfcomm_channel_t *channel, rfcomm_multiple
bzero(channel, sizeof(rfcomm_channel_t));
channel->state = RFCOMM_CHANNEL_CLOSED;
channel->state_var = 0;
channel->state_var = STATE_VAR_NONE;
channel->multiplexer = multiplexer;
channel->service = service;

View File

@ -582,7 +582,7 @@ static void sdp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *p
switch (packet_type) {
case L2CAP_DATA_PACKET:
pdu_id = packet[0];
pdu_id = (SDP_PDU_ID_t) packet[0];
transaction_id = READ_NET_16(packet, 1);
param_len = READ_NET_16(packet, 3);
remote_mtu = l2cap_get_remote_mtu_for_local_cid(channel);

View File

@ -54,11 +54,11 @@ void sdp_normalize_uuid(uint8_t *uuid, uint32_t shortUUID){
// MARK: DataElement getter
de_size_t de_get_size_type(uint8_t *header){
return header[0] & 7;
return (de_size_t) (header[0] & 7);
}
de_type_t de_get_element_type(uint8_t *header){
return header[0] >> 3;
return (de_type_t) (header[0] >> 3);
}
int de_get_header_size(uint8_t * header){