Skip to content

Commit

Permalink
Merge pull request #159 from ingchips/develop
Browse files Browse the repository at this point in the history
release 8.3.3
  • Loading branch information
zjli-2019 authored Apr 7, 2023
2 parents 4150658 + ea44168 commit 1300fa9
Show file tree
Hide file tree
Showing 199 changed files with 10,135 additions and 8,895 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ING918XX/ING9186XX SDK Source Code
# ING918XX/ING916XX SDK Source Code

This repository contains ING918XX/ING9186XX SDK source code, including platform header files,
This repository contains ING918XX/ING916XX SDK source code, including platform header files,
bundle binaries, and examples.

ING918XX/ING9186XX are fully integrated Bluetooth Low Energy wireless communication SoC(s)
ING918XX/ING916XX are fully integrated Bluetooth Low Energy wireless communication SoC(s)
targeting Bluetooth 5.1 and 5.3 specification.

## Get Started
Expand Down
685 changes: 344 additions & 341 deletions bundles/exp/ING9187xx/apis.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bundles/exp/ING9187xx/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
},
"ram": {
"base": 536870912,
"size": 29916
"size": 29924
},
"rom": {
"base": 16384,
"size": 143816
"size": 144232
},
"version": [
1,
9,
12
15
]
}
Binary file modified bundles/exp/ING9187xx/platform.bin
Binary file not shown.
723 changes: 363 additions & 360 deletions bundles/exp/ING9188xx/apis.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bundles/exp/ING9188xx/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
},
"ram": {
"base": 536870912,
"size": 29916
"size": 29924
},
"rom": {
"base": 16384,
"size": 150792
"size": 151176
},
"version": [
1,
9,
12
15
]
}
Binary file modified bundles/exp/ING9188xx/platform.bin
Binary file not shown.
54 changes: 27 additions & 27 deletions bundles/exp/inc/gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ typedef enum scan_type
* @brief set random address device
*
* @param address random address
* @return 0: Message is sent to controller; others: failed
*/
void gap_set_random_device_address(const uint8_t *address);
uint8_t gap_set_random_device_address(const uint8_t *address);

/**
* @brief Disconnect connection with handle
*
* @param handle Used to identify an advertising set. Range: 0x00 to 0xEF
* @return 0: Message is sent out or the connection alreay release
* @return 0: Message is sent out or the connection already release
*/
uint8_t gap_disconnect(hci_con_handle_t handle);

Expand All @@ -67,7 +68,7 @@ void gap_disconnect_all(void);
*
* @param[in] address BLE address
* @param[in] addtype BLE address type
* @return 0: Message is sent to controller
* @return 0: Message is sent to controller
*/
uint8_t gap_add_whitelist(const uint8_t *address,bd_addr_type_t addtype);

Expand Down Expand Up @@ -1312,42 +1313,41 @@ uint8_t gap_vendor_tx_continuous_wave(uint8_t enable, uint8_t power_level_index,
#define HCI_VENDOR_CCM 0xFC01

/**
* @brief host require controller to do AES-CCM functionality, and CCM referece to
* @brief Host require controller to do AES-CCM functionality, and CCM reference to
* the document rfc3610:Counter with CBC-MAC (CCM)
*
* @param type 0: encrypt 1:decrypt
*
* @param mic_size 8: mic size in 8 bytes 4: mic size in 4 bytes
*
* @param msg_len messge length to be encrypt or decrypt
*
* @param aad_len Additional authenticated data length
*
* @param tag a value to identify a AES-CCM request.
*
* @param key 128 bits long key as required by AES-CCM
*
* @param nonce random value of each AES-CCM require 13 bytes long
*
* @param msg pointer to the message input
* All input buffers (key, nonce, msg, aad) must be kept in memory until AES-CCM completed.
*
* @param aad Additional authenticated data
* `return_param` passed to `cb` is casted from `event_vendor_ccm_complete_t`.
*
* @param out_msg the output buffer to store the result of the AES-CCM ,calculated by controller.
* @param[in] type 0: encrypt 1:decrypt
* @param[in] mic_size 8: mic size in 8 bytes 4: mic size in 4 bytes
* @param[in] msg_len message length to be encrypt or decrypt (<= 384 bytes)
* @param[in] aad_len Additional authenticated data length (<= 16 bytes)
* @param[in] tag a value to identify a AES-CCM request.
* @param[in] key 128 bits long key as required by AES-CCM
* @param[in] nonce random value of each AES-CCM require 13 bytes long
* @param[in] msg pointer to the message input
* @param[in] aad Additional authenticated data
* @param[out] out_msg the output buffer to store the result of the AES-CCM
* @param[in] cb callback function on the corresponding command complete event
* @param[in] user_data user data for the callback function
*
* @return 0: success others: failed
* @return 0: success others: failed
*/
uint8_t gap_start_ccm(
uint8_t type, // 0: encrypt 1: decrypt
uint8_t mic_size,
uint16_t msg_len,
uint16_t aad_len,
uint32_t tag, // same value will be reported in event
uint8_t *key,
uint8_t *nonce,
uint8_t *msg,
uint8_t *aad,
uint8_t *out_msg);
const uint8_t *key,
const uint8_t *nonce,
const uint8_t *msg,
const uint8_t *aad,
uint8_t *out_msg,
gap_hci_cmd_complete_cb_t cb,
void *user_data);

//HCI func interface

Expand Down
57 changes: 57 additions & 0 deletions bundles/exp/inc/ll_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,48 @@ void ll_set_conn_coded_scheme(uint16_t conn_handle, int ci);
*/
void ll_set_conn_latency(uint16_t conn_handle, int latency);

/**
****************************************************************************************
* @brief Get connection basic information of a connection
*
* @param[in] conn_handle handle of an existing connection
* @param[out] access_addr Access address
* @param[out] crc_init CRC init value
* @param[out] interval interval (unit: us)
* @return 0 if successful else non-0
****************************************************************************************
*/
int ll_get_conn_info(const uint16_t conn_handle,
uint32_t *access_addr,
uint32_t *crc_init,
uint32_t *interval);

/**
****************************************************************************************
* @brief Get information of upcoming connection events of a connection
*
* Information of consecutive N connection events after `from_time` can be retrieved,
* where N = `number`.
*
* Sub-rating is ignored. If channel map updated within these events, then `channel_ids`
* are not reliable.
*
* @param[in] conn_handle handle of an existing connection
* @param[in] number number of connection events to be queried
* @param[in] from_time the first connection event shall be after `from_time` (unit: us)
* @param[out] time_offset time offset between the start of the first connection event and `from_time` (unit: us)
* @param[out] event_count connection event count of the first connection event
* @param[out] channel_ids physical channel IDs of the upcoming `number` connection events
* @return 0 if successful else non-0
****************************************************************************************
*/
int ll_get_conn_events_info(const uint16_t conn_handle,
int number,
uint64_t from_time,
uint32_t *time_offset,
uint16_t *event_count,
uint8_t *channel_ids);

/**
****************************************************************************************
* @brief Set default antenna ID
Expand Down Expand Up @@ -739,6 +781,21 @@ void ll_dhkey_generated(int status, const uint8_t *dh_key);
*/
void ll_install_ecc_engine(f_start_generate_p256_key_pair start_generate_p256_key_pair,
f_start_generate_dhkey start_generate_dhkey);

/**
****************************************************************************************
* @brief Low level AES encryption in blocking mode
*
* @param[in] key key (little-endian)
* @param[in] plaintext plaintext (little-endian)
* @param[out] ciphertext ciphertext (big-endian)
* @return 0 if completed successfully; non-0 if hardware is not ready or busy
* When non-0 is returned, it is possible to retry later.
****************************************************************************************
*/
int ll_aes_encrypt(const uint8_t *key, const uint8_t *plaintext,
uint8_t *ciphertext);

#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit 1300fa9

Please sign in to comment.