Bluetooth: Controller: Fix memory required calculation macro
Change-id: I73b06983911590f63728d769c401c8a9a53053d7 Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
This commit is contained in:
parent
8d6b12f235
commit
5860686013
2 changed files with 13 additions and 13 deletions
|
@ -210,17 +210,15 @@ struct pdu_data_q_tx {
|
|||
(RADIO_PACKET_COUNT_TX_MAX + 2))
|
||||
|
||||
#define LL_MEM_RX_POOL_SZ (ALIGN4(__builtin_offsetof(struct radio_pdu_node_rx,\
|
||||
pdu_data) + (\
|
||||
((RADIO_ACPDU_SIZE_MAX + 1) < \
|
||||
pdu_data) + ((\
|
||||
(RADIO_ACPDU_SIZE_MAX + 1) < \
|
||||
(__builtin_offsetof(struct pdu_data, payload) + \
|
||||
RADIO_LL_LENGTH_OCTETS_RX_MAX)) ? \
|
||||
((__builtin_offsetof(struct pdu_data, payload) + \
|
||||
RADIO_LL_LENGTH_OCTETS_RX_MAX) * \
|
||||
(RADIO_PACKET_COUNT_RX_MAX + 3)) \
|
||||
(__builtin_offsetof(struct pdu_data, payload) + \
|
||||
RADIO_LL_LENGTH_OCTETS_RX_MAX) \
|
||||
: \
|
||||
((RADIO_ACPDU_SIZE_MAX + 1) * \
|
||||
(RADIO_PACKET_COUNT_RX_MAX + 3)) \
|
||||
)))
|
||||
(RADIO_ACPDU_SIZE_MAX + 1))) * \
|
||||
(RADIO_PACKET_COUNT_RX_MAX + 3))
|
||||
|
||||
#define LL_MEM_RX_LINK_POOL (sizeof(void *) * 2 * ((RADIO_PACKET_COUNT_RX_MAX +\
|
||||
4) + RADIO_CONNECTION_CONTEXT_MAX))
|
||||
|
@ -229,12 +227,13 @@ struct pdu_data_q_tx {
|
|||
struct radio_pdu_node_tx, pdu_data) + \
|
||||
__builtin_offsetof(struct pdu_data, payload) + 27)) * \
|
||||
PACKET_MEM_COUNT_TX_CTRL)
|
||||
#define LL_MEM_RX_DATA_POOL ((ALIGN4(__builtin_offsetof( \
|
||||
#define LL_MEM_TX_DATA_POOL ((ALIGN4(__builtin_offsetof( \
|
||||
struct radio_pdu_node_tx, pdu_data) + \
|
||||
__builtin_offsetof(struct pdu_data, payload) + \
|
||||
RADIO_LL_LENGTH_OCTETS_RX_MAX)) \
|
||||
* (RADIO_PACKET_COUNT_TX_MAX + 2))
|
||||
* (RADIO_PACKET_COUNT_TX_MAX + 1))
|
||||
|
||||
#define LL_MEM_TOTAL (LL_MEM_CONN + LL_MEM_RXQ + (LL_MEM_TXQ * 2) + \
|
||||
LL_MEM_RX_POOL_SZ + \
|
||||
LL_MEM_RX_LINK_POOL + LL_MEM_TX_CTRL_POOL + LL_MEM_RX_DATA_POOL)
|
||||
LL_MEM_RX_LINK_POOL + LL_MEM_TX_CTRL_POOL + LL_MEM_TX_DATA_POOL)
|
||||
|
||||
|
|
|
@ -343,8 +343,9 @@ static int native_open(void)
|
|||
sizeof(_radio)
|
||||
);
|
||||
if (retval) {
|
||||
BT_ERR("Required RAM Size: %d.", retval);
|
||||
return retval;
|
||||
BT_ERR("Required RAM size: %d, supplied: %u.", retval,
|
||||
sizeof(_radio));
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
IRQ_CONNECT(NRF52_IRQ_POWER_CLOCK_IRQn, 2, power_clock_nrf5_isr, 0, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue