Skip to content

Commit

Permalink
- remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepmistry committed Mar 14, 2015
1 parent 3a77d96 commit f7b8d0b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 100 deletions.
7 changes: 0 additions & 7 deletions utility/hal_aci_tl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,14 +405,7 @@ void hal_aci_tl_init(aci_pins_t *a_pins, bool debug)
hal_aci_tl_pin_reset();

/* Set the nRF8001 to a known state as required by the datasheet*/
// #if defined (__AVR__)
// digitalWrite(a_pins->miso_pin, 0);
// digitalWrite(a_pins->mosi_pin, 0);
// #endif
digitalWrite(a_pins->reqn_pin, 1);
// #if defined (__AVR__)
// digitalWrite(a_pins->sck_pin, 0);
// #endif

delay(30); //Wait for the nRF8001 to get hold of its lines - the lines float for a few ms after the reset

Expand Down
76 changes: 0 additions & 76 deletions utility/lib_aci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,6 @@ Global additionally used used in aci_setup
*/
hal_aci_data_t msg_to_send;


// static services_pipe_type_mapping_t * p_services_pipe_type_map;
// static hal_aci_data_t * p_setup_msgs;




// static bool is_request_operation_pending;
// static bool is_indicate_operation_pending;
// static bool is_open_remote_pipe_pending;
// static bool is_close_remote_pipe_pending;

// static uint8_t request_operation_pipe = 0;
// static uint8_t indicate_operation_pipe = 0;


// The following structure (aci_cmd_params_open_adv_pipe) will be used to store the complete command
// including the pipes to be opened.
static aci_cmd_params_open_adv_pipe_t aci_cmd_params_open_adv_pipe;
Expand Down Expand Up @@ -190,28 +174,6 @@ void lib_aci_init(aci_state_t *aci_stat, bool debug)
aci_cmd_params_open_adv_pipe.pipes[i] = 0;
}




// is_request_operation_pending = false;
// is_indicate_operation_pending = false;
// is_open_remote_pipe_pending = false;
// is_close_remote_pipe_pending = false;





// request_operation_pipe = 0;
// indicate_operation_pipe = 0;



// p_services_pipe_type_map = aci_stat->aci_setup_info.services_pipe_type_mapping;

// p_setup_msgs = aci_stat->aci_setup_info.setup_msgs;


hal_aci_tl_init(&aci_stat->aci_pins, debug);

lib_aci_board_init(aci_stat);
Expand Down Expand Up @@ -301,13 +263,6 @@ bool lib_aci_set_local_data(aci_state_t *aci_stat, uint8_t pipe, uint8_t *p_valu
{
aci_cmd_params_set_local_data_t aci_cmd_params_set_local_data;

// if ((p_services_pipe_type_map[pipe-1].location != ACI_STORE_LOCAL)
// ||
// (size > ACI_PIPE_TX_DATA_MAX_LEN))
// {
// return false;
// }

aci_cmd_params_set_local_data.tx_data.pipe_number = pipe;
memcpy(&(aci_cmd_params_set_local_data.tx_data.aci_data[0]), p_value, size);
acil_encode_cmd_set_local_data(&(msg_to_send.buffer[0]), &aci_cmd_params_set_local_data, size);
Expand Down Expand Up @@ -401,13 +356,6 @@ bool lib_aci_send_data(uint8_t pipe, uint8_t *p_value, uint8_t size)
bool ret_val = false;
aci_cmd_params_send_data_t aci_cmd_params_send_data;


// if(!((p_services_pipe_type_map[pipe-1].pipe_type == ACI_TX) ||
// (p_services_pipe_type_map[pipe-1].pipe_type == ACI_TX_ACK)))
// {
// return false;
// }

if (size > ACI_PIPE_TX_DATA_MAX_LEN)
{
return false;
Expand All @@ -428,12 +376,6 @@ bool lib_aci_request_data(aci_state_t *aci_stat, uint8_t pipe)
bool ret_val = false;
aci_cmd_params_request_data_t aci_cmd_params_request_data;

// if(!((p_services_pipe_type_map[pipe-1].location == ACI_STORE_REMOTE)&&(p_services_pipe_type_map[pipe-1].pipe_type == ACI_RX_REQ)))
// {
// return false;
// }


{

{
Expand Down Expand Up @@ -474,15 +416,6 @@ bool lib_aci_open_remote_pipe(aci_state_t *aci_stat, uint8_t pipe)
bool ret_val = false;
aci_cmd_params_open_remote_pipe_t aci_cmd_params_open_remote_pipe;

// if(!((p_services_pipe_type_map[pipe-1].location == ACI_STORE_REMOTE)&&
// ((p_services_pipe_type_map[pipe-1].pipe_type == ACI_RX)||
// (p_services_pipe_type_map[pipe-1].pipe_type == ACI_RX_ACK_AUTO)||
// (p_services_pipe_type_map[pipe-1].pipe_type == ACI_RX_ACK))))
// {
// return false;
// }


{

// is_request_operation_pending = true;
Expand All @@ -501,15 +434,6 @@ bool lib_aci_close_remote_pipe(aci_state_t *aci_stat, uint8_t pipe)
bool ret_val = false;
aci_cmd_params_close_remote_pipe_t aci_cmd_params_close_remote_pipe;

// if(!((p_services_pipe_type_map[pipe-1].location == ACI_STORE_REMOTE)&&
// ((p_services_pipe_type_map[pipe-1].pipe_type == ACI_RX)||
// (p_services_pipe_type_map[pipe-1].pipe_type == ACI_RX_ACK_AUTO)||
// (p_services_pipe_type_map[pipe-1].pipe_type == ACI_RX_ACK))))
// {
// return false;
// }


{

// is_request_operation_pending = true;
Expand Down
17 changes: 0 additions & 17 deletions utility/lib_aci.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,6 @@ typedef struct {

ACI_ASSERT_SIZE(hal_aci_evt_t, 34);

// typedef struct
// {
// uint8_t location; /**< enum aci_pipe_store_t */
// aci_pipe_type_t pipe_type;
// } services_pipe_type_mapping_t;
//
// typedef struct aci_setup_info_t
// {
// services_pipe_type_mapping_t *services_pipe_type_mapping;
// uint8_t number_of_pipes;
// hal_aci_data_t *setup_msgs;
// uint8_t num_setup_msgs;
// } aci_setup_info_t;



// aci_struct that will contain
// total initial credits
// current credit
Expand All @@ -81,7 +65,6 @@ ACI_ASSERT_SIZE(hal_aci_evt_t, 34);
typedef struct aci_state_t
{
aci_pins_t aci_pins; /* Pins on the MCU used to connect to the nRF8001 */
// aci_setup_info_t aci_setup_info; /* Data structures that are created from nRFgo Studio */
uint8_t bonded; /* ( aci_bond_status_code_t ) Is the nRF8001 bonded to a peer device */
uint8_t data_credit_total; /* Total data credit available for the specific version of the nRF8001, total equals available when a link is established */
aci_device_operation_mode_t device_state; /* Operating mode of the nRF8001 */
Expand Down

0 comments on commit f7b8d0b

Please sign in to comment.