Skip to content

Commit

Permalink
Merge pull request #155 from ingchips/develop
Browse files Browse the repository at this point in the history
release 8.3.0
  • Loading branch information
zjli-2019 authored Mar 21, 2023
2 parents 2bb5e7d + c222152 commit 4150658
Show file tree
Hide file tree
Showing 478 changed files with 44,030 additions and 11,344 deletions.
677 changes: 341 additions & 336 deletions bundles/exp/ING9187xx/apis.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 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": 30084
"size": 29916
},
"rom": {
"base": 16384,
"size": 143252
"size": 143816
},
"version": [
1,
8,
6
9,
12
]
}
Binary file modified bundles/exp/ING9187xx/platform.bin
Binary file not shown.
715 changes: 360 additions & 355 deletions bundles/exp/ING9188xx/apis.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 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": 30084
"size": 29916
},
"rom": {
"base": 16384,
"size": 150232
"size": 150792
},
"version": [
1,
8,
6
9,
12
]
}
Binary file modified bundles/exp/ING9188xx/platform.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions bundles/exp/inc/att_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ int att_server_deferred_read_response(hci_con_handle_t con_handle, uint16_t attr
* @param value_len length of value
* @return 0 if ok, error otherwise
*/
int att_server_notify(hci_con_handle_t con_handle, uint16_t attribute_handle, uint8_t *value, uint16_t value_len);
int att_server_notify(hci_con_handle_t con_handle, uint16_t attribute_handle, const uint8_t *value, uint16_t value_len);

/**
* @brief indicate value change to client. client is supposed to reply with an indication_response
Expand All @@ -126,7 +126,7 @@ int att_server_notify(hci_con_handle_t con_handle, uint16_t attribute_handle, ui
* @param value_len length of value
* @return 0 if ok, error otherwise
*/
int att_server_indicate(hci_con_handle_t con_handle, uint16_t attribute_handle, uint8_t *value, uint16_t value_len);
int att_server_indicate(hci_con_handle_t con_handle, uint16_t attribute_handle, const uint8_t *value, uint16_t value_len);

/*
* @brief get current MTU size
Expand Down
125 changes: 122 additions & 3 deletions bundles/exp/inc/ll_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ void ll_legacy_adv_set_interval(uint16_t for_hdc, uint16_t not_hdc);
*
* IQ samples in periodic advertising or other extended advertising sets
* (see `ll_attach_cte_to_adv_set`) are sampled and reported through a vendor defined LE
* subevent.
* sub-events.
*
* Note: This function will fail if scannning has not been started. IQ sampling is
* Note: This function will fail if scanning has not been started. IQ sampling is
* disabled when scanning is disabled.
*
* @param[in] cte_type cte_type (0: AoA; 1: AoD 1us; 2: AoD 2us)
Expand All @@ -188,10 +188,52 @@ void ll_legacy_adv_set_interval(uint16_t for_hdc, uint16_t not_hdc);
int ll_scanner_enable_iq_sampling(uint8_t cte_type,
uint8_t slot_len,
uint8_t switching_pattern_len,
const uint8_t *swiching_pattern,
const uint8_t *switching_pattern,
uint8_t slot_sampling_offset,
uint8_t slot_sample_count);

/**
****************************************************************************************
* @brief Enable IQ sampling on legacy adv after scanning is enabled
*
* CAUTION: This feature might cause system into dead-lock, or hard fault. Be sure to enable watchdog.
*
* A portion of legacy advertising is treated as CTE, and IQ samples are sampled
* and reported through a vendor defined LE sub-events.
*
* Note: Before calling this function, scanning mode must be configured to LEGACY ONLY.
* This function will fail if scanning has not been started. IQ sampling is
* disabled when scanning is disabled.
*
* @param[in] sampling_offset CTE position (**bit** offset) in payload (>= 8bits)
* For example, in ADV_IND, to start CTE sampling
* from the first bit of AdvData, `sampling_offset`
* is 6 * 8 (bits).
* @param[in] cte_type cte_type (0: AoA; 1: AoD 1us; 2: AoD 2us)
* @param[in] slot_len slot length for AoA
* @param[in] switching_pattern_len switching pattern len
* @param[in] switching_pattern switching pattern
* @param[in] slot_sampling_offset sampling offset (0..23) in a slot
* @param[in] slot_sample_count sample count within a slot (1..5)
* @return 0 if successful else error code
*
* Note:
* Recommended value: slot_sampling_offset = 12, slot_sample_count = 1
* (slot_sampling_offset + slot_sample_count) should be <= 24
****************************************************************************************
*/
// int ll_scanner_enable_iq_sampling_on_legacy(
// uint16_t sampling_offset,
// uint8_t cte_type,
// uint8_t cte_time,
// uint8_t slot_len,
// uint8_t switching_pattern_len,
// const uint8_t *switching_pattern,
// uint8_t slot_sampling_offset,
// uint8_t slot_sample_count);
// WARNING: ^^^ this API is not available in this release


struct ll_raw_packet;

typedef void (* f_ll_raw_packet_done)(struct ll_raw_packet *packet, void *user_data);
Expand Down Expand Up @@ -506,6 +548,46 @@ int ll_ackable_packet_run(struct ll_raw_packet *packet,
uint64_t when,
uint32_t window);

/**
****************************************************************************************
* @brief Lock RF frequency
*
* Once locked, all RF activities will occur on the specified channel, no matter
* BLE ADV/SCAN/CONNECTION, or raw packets.
*
* `ll_raw_packet_set_bare_mode` with `freq_mhz != 0` also relies on this functionality.
* It will call this and `ll_unlock_frequency()` automatically.
*
* Locking is a low level configuration, of which BLE sub-system is totally unaware.
* Do NOT forget whitening: after locking to 2402MHz (channel 37), do not expecting
* all adv on 37/38/39 can be received, since BLE sub-system is still transmitting
* adv on 37/38/39 with whitening corresponding to each channel.
*
* To make all 3 adv on a single channel receivable (properly whitened as on channel 37),
* call `ll_override_whitening_init_value(1, 0x53)`.
*
* Nesting of locking:
* lock(f0); // locked to f0
* lock(f1); // locked to f1
* unlock();
* ... // stilling locked to f1
* unlock();
* ... // unlocked
*
* @param[in] freq_mhz channel frequency in MHz
****************************************************************************************
*/
void ll_lock_frequency(int freq_mhz);

/**
****************************************************************************************
* @brief Unlock RF frequency
*
* After unlocking, RF behaviors are back to normal again.
****************************************************************************************
*/
void ll_unlock_frequency(void);

/**
****************************************************************************************
* @brief Allocate memory from LL internal heap
Expand Down Expand Up @@ -569,6 +651,43 @@ void ll_set_adv_access_address(uint32_t acc_addr);
*/
void ll_set_conn_interval_unit(uint16_t unit);

/**
****************************************************************************************
* @brief Override standard whitening init value
*
* @param[in] override enable override: 1; disable override: 0 (default: disable)
* @param[in] value customized whitening init value when override is enabled:
* lfsr[0] = bit[0]; ...; lfsr[6] = bit[6].
* For example, standard value for channel 37 is 0x53.
****************************************************************************************
*/
// void ll_override_whitening_init_value(uint8_t override, uint8_t value);
// WARNING: ^^^ this API is not available in this release


/**
****************************************************************************************
* @brief Allow the reception of adv packets that use a nonstandard ADV TYPE
*
* @param[in] allowed allowed: 1; not allowed: 0 (default: not allowed)
* @param[in] type nonstandard ADV TYPE
****************************************************************************************
*/
// void ll_allow_nonstandard_adv_type(uint8_t allowed, uint8_t type);
// WARNING: ^^^ this API is not available in this release


/**
****************************************************************************************
* @brief Set CTE bit
*
* @param[in] bit CTE bit: 0/1 (default: 1)
****************************************************************************************
*/
// void ll_set_cte_bit(uint8_t bit);
// WARNING: ^^^ this API is not available in this release


/**
****************************************************************************************
* @brief Generate a new P-256 public/private key pair
Expand Down
Loading

0 comments on commit 4150658

Please sign in to comment.