Skip to content

Commit 2a1deb5

Browse files
committed
inline NanoBLESense
1 parent b6e850d commit 2a1deb5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/AudioI2S/I2SNanoSenseBLE.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
namespace audio_tools {
1212

13-
const int i2s_buffer_size = 1024;
14-
NBuffer<uint8_t> i2s_buffer(i2s_buffer_size, 5);
13+
inline const int i2s_buffer_size = 1024;
14+
inline NBuffer<uint8_t> i2s_buffer(i2s_buffer_size, 5);
1515

1616
/**
1717
* @brief Mapping Frequency constants to available frequencies
@@ -21,7 +21,7 @@ struct Nano_BLE_freq_info {
2121
double freq; // in mhz
2222
};
2323

24-
const Nano_BLE_freq_info freq_table[] = {
24+
inline const Nano_BLE_freq_info freq_table[] = {
2525
{ I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV8, 32.0 / 8 },
2626
{ I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV10, 32 / 10 },
2727
{ I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV11, 32.0 / 11 },
@@ -45,7 +45,7 @@ struct Nano_BLE_ratio_info {
4545
double ratio;
4646
};
4747

48-
const Nano_BLE_ratio_info ratio_table[] = {
48+
inline const Nano_BLE_ratio_info ratio_table[] = {
4949
{ I2S_CONFIG_RATIO_RATIO_32X, 32.0 },
5050
{ I2S_CONFIG_RATIO_RATIO_48X, 48.0 },
5151
{ I2S_CONFIG_RATIO_RATIO_64X, 64.0 },
@@ -61,7 +61,7 @@ const Nano_BLE_ratio_info ratio_table[] = {
6161
* I2S Event handler
6262
*/
6363

64-
extern "C" void I2S_IRQHandler(void) {
64+
extern "C" inline void I2S_IRQHandler(void) {
6565
if(NRF_I2S->EVENTS_TXPTRUPD != 0) {
6666
// reading from buffer to pins
6767
NRF_I2S->TXD.PTR = (uint32_t) i2s_buffer.readEnd().address(); // last buffer was processed

0 commit comments

Comments
 (0)