added debugging

Fork of BLE_nRF8001 by RedBearLab

Embed: (wiki syntax)

« Back to documentation index

lib_aci.h File Reference

lib_aci.h File Reference

ACI library. More...

Go to the source code of this file.

Data Structures

struct  _aci_packed_
 aci_cmd_params_set_local_data_t More...

Functions

Functions for library management
void lib_aci_debug_print (bool enable)
 Function to enable printing of all ACI commands sent and ACI events received.
void lib_aci_pin_reset (void)
 Function to pin reset the nRF8001.
void lib_aci_init (aci_state_t *aci_stat, bool debug)
 Initialization function.
uint8_t lib_aci_get_nb_available_credits (aci_state_t *aci_stat)
 Gets the number of currently available ACI credits.
uint16_t lib_aci_get_cx_interval_ms (aci_state_t *aci_stat)
 Gets the connection interval in milliseconds.
uint16_t lib_aci_get_cx_interval (aci_state_t *aci_stat)
 Gets the connection interval in multiple of 1.25 ms.
uint16_t lib_aci_get_slave_latency (aci_state_t *aci_stat)
 Gets the current slave latency.
bool lib_aci_is_pipe_available (aci_state_t *aci_stat, uint8_t pipe)
 Checks if a given pipe is available.
bool lib_aci_is_pipe_closed (aci_state_t *aci_stat, uint8_t pipe)
 Checks if a given pipe is closed.
bool lib_aci_is_discovery_finished (aci_state_t *aci_stat)
 Checks if the discovery operation is finished.
ACI Commands available in all modes
bool lib_aci_sleep (void)
 Sets the radio in sleep mode.
bool lib_aci_radio_reset (void)
 Resets the radio.
bool lib_aci_direct_connect (void)
 Radio starts directed advertising to bonded device.
bool lib_aci_device_version (void)
 Gets the radio's version.
bool lib_aci_get_address (void)
 Gets the device address.
bool lib_aci_get_temperature (void)
 Gets the temperature.
bool lib_aci_get_battery_level (void)
 Gets the battery level.
ACI commands available in Sleep mode
bool lib_aci_wakeup (void)
 Wakes up the radio.
ACI commands available in Active mode
bool lib_aci_test (aci_test_mode_change_t enter_exit_test_mode)
 Sets the radio in test mode.
bool lib_aci_set_tx_power (aci_device_output_power_t tx_power)
 Sets the radio's TX power.
bool lib_aci_connect (uint16_t run_timeout, uint16_t adv_interval)
 Tries to connect to a peer device.
bool lib_aci_bond (uint16_t run_timeout, uint16_t adv_interval)
 Tries to bond with a peer device.
bool lib_aci_disconnect (aci_state_t *aci_stat, aci_disconnect_reason_t reason)
 Disconnects from peer device.
bool lib_aci_set_local_data (aci_state_t *aci_stat, uint8_t pipe, uint8_t *value, uint8_t size)
 Sets Local Data.
bool lib_aci_broadcast (const uint16_t timeout, const uint16_t adv_interval)
 Sends Broadcast message to the radio.
Open Advertising Pipes.
bool lib_aci_open_adv_pipe (const uint8_t pipe)
 Sends a command to the radio to set the input pipe to be placed in Advertisement Service Data.
Open Advertising Pipes
bool lib_aci_open_adv_pipes (const uint8_t *const adv_service_data_pipes)
 Sends a command to the radio to set the pipes to be placed in Advertisement Service Data.
ACI commands available in Connected mode
bool lib_aci_set_app_latency (uint16_t latency, aci_app_latency_mode_t latency_mode)
 Sets a given application latency.
bool lib_aci_open_remote_pipe (aci_state_t *aci_stat, uint8_t pipe)
 Opens a remote pipe.
bool lib_aci_close_remote_pipe (aci_state_t *aci_stat, uint8_t pipe)
 Closes a remote pipe.
bool lib_aci_send_data (uint8_t pipe, uint8_t *value, uint8_t size)
 Sends data on a given pipe.
bool lib_aci_request_data (aci_state_t *aci_stat, uint8_t pipe)
 Requests data from a given pipe.
bool lib_aci_change_timing (uint16_t minimun_cx_interval, uint16_t maximum_cx_interval, uint16_t slave_latency, uint16_t timeout)
 Sends a L2CAP change connection parameters request.
bool lib_aci_change_timing_GAP_PPCP (void)
 Sends a L2CAP change connection parameters request with the connection predefined preffered connection parameters.
bool lib_aci_send_ack (aci_state_t *aci_stat, const uint8_t pipe)
 Sends acknowledgement message to peer.
bool lib_aci_send_nack (aci_state_t *aci_stat, const uint8_t pipe, const uint8_t error_code)
 Sends negative acknowledgement message to peer.
bool lib_aci_read_dynamic_data (void)
 Sends ReadDynamicData command to the host.
bool lib_aci_write_dynamic_data (uint8_t sequence_number, uint8_t *dynamic_data, uint8_t length)
 Sends WriteDynamicData command to the host.
ACI commands available while connected in Bond mode
bool lib_aci_bond_request (void)
 Sends a SMP Security Request.
bool lib_aci_set_key (aci_key_type_t key_rsp_type, uint8_t *key, uint8_t len)
 Set the key requested by the 8001.
ACI commands available in Test mode
bool lib_aci_echo_msg (uint8_t message_size, uint8_t *message_data)
 Sends an echo message.
bool lib_aci_dtm_command (uint8_t dtm_command_msbyte, uint8_t dtm_command_lsbyte)
 Sends an DTM command.
bool lib_aci_event_get (aci_state_t *aci_stat, hal_aci_evt_t *aci_evt)
 Gets an ACI event from the ACI Event Queue.
bool lib_aci_event_peek (hal_aci_evt_t *p_aci_evt_data)
 Peeks an ACI event from the ACI Event Queue.
void lib_aci_flush (void)
 Flushes the events in the ACI command queues and ACI Event queue.
bool lib_aci_event_queue_full (void)
 Return full status of the Event queue.
bool lib_aci_event_queue_empty (void)
 Return empty status of the Event queue.
bool lib_aci_command_queue_full (void)
 Return full status of Command queue.
bool lib_aci_command_queue_empty (void)
 Return empty status of Command queue.

Detailed Description

ACI library.

Definition in file lib_aci.h.