Skip to content

Commit

Permalink
prepare 8.3.3
Browse files Browse the repository at this point in the history
* Bundles:
    * [NEW] `ll_aes_encrypt` (all bundles)
    * [NEW] `ll_get_conn_info`, `ll_get_conn_events_info` (_Experimental_ bundles)

* Library:
    * [UPD] SYSCTRL: fix wakup source detection & updates for PMU
  • Loading branch information
zjli-2019 committed Apr 7, 2023
1 parent 49da490 commit ea44168
Show file tree
Hide file tree
Showing 183 changed files with 8,408 additions and 7,773 deletions.
621 changes: 311 additions & 310 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": 144272
"size": 144232
},
"version": [
1,
9,
14
15
]
}
Binary file modified bundles/exp/ING9187xx/platform.bin
Binary file not shown.
659 changes: 330 additions & 329 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": 151248
"size": 151176
},
"version": [
1,
9,
14
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
15 changes: 15 additions & 0 deletions bundles/exp/inc/ll_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -781,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 ea44168

Please sign in to comment.