Skip to content
Permalink
Browse files

ext: hal: nordic: Update nrfx to version 1.7.1

Updates nrfx to the recently released version. See
https://github.com/NordicSemiconductor/nrfx/blob/v1.7.1/CHANGELOG.md
for a list of changes that this version introduces.

Origin: nrfx
License: BSD 3-Clause
URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.7.1
commit: 9d68726e41c321f1772c187bd12d82f5b13104f1
Purpose: Provide peripheral drivers for Nordic SoCs
Maintained-by: External

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
  • Loading branch information...
anangl authored and carlescufi committed Apr 1, 2019
1 parent 56a2691 commit c28fdc7a0fefcffc59f4d10c292d184f40366ee7
Showing with 7,351 additions and 5,579 deletions.
  1. +4 −4 ext/hal/nordic/nrfx/README
  2. +22 −19 ext/hal/nordic/nrfx/drivers/include/nrf_bitmask.h
  3. +24 −30 ext/hal/nordic/nrfx/drivers/include/nrfx_adc.h
  4. +30 −47 ext/hal/nordic/nrfx/drivers/include/nrfx_clock.h
  5. +32 −31 ext/hal/nordic/nrfx/drivers/include/nrfx_comp.h
  6. +22 −22 ext/hal/nordic/nrfx/drivers/include/nrfx_dppi.h
  7. +109 −88 ext/hal/nordic/nrfx/drivers/include/nrfx_gpiote.h
  8. +36 −37 ext/hal/nordic/nrfx/drivers/include/nrfx_i2s.h
  9. +35 −32 ext/hal/nordic/nrfx/drivers/include/nrfx_lpcomp.h
  10. +36 −58 ext/hal/nordic/nrfx/drivers/include/nrfx_nfct.h
  11. +281 −0 ext/hal/nordic/nrfx/drivers/include/nrfx_nvmc.h
  12. +34 −41 ext/hal/nordic/nrfx/drivers/include/nrfx_pdm.h
  13. +54 −60 ext/hal/nordic/nrfx/drivers/include/nrfx_power.h
  14. +3 −1 ext/hal/nordic/nrfx/drivers/include/nrfx_power_clock.h
  15. +62 −57 ext/hal/nordic/nrfx/drivers/include/nrfx_ppi.h
  16. +45 −66 ext/hal/nordic/nrfx/drivers/include/nrfx_pwm.h
  17. +57 −45 ext/hal/nordic/nrfx/drivers/include/nrfx_qdec.h
  18. +84 −54 ext/hal/nordic/nrfx/drivers/include/nrfx_qspi.h
  19. +19 −25 ext/hal/nordic/nrfx/drivers/include/nrfx_rng.h
  20. +111 −102 ext/hal/nordic/nrfx/drivers/include/nrfx_rtc.h
  21. +55 −65 ext/hal/nordic/nrfx/drivers/include/nrfx_saadc.h
  22. +35 −53 ext/hal/nordic/nrfx/drivers/include/nrfx_spi.h
  23. +75 −86 ext/hal/nordic/nrfx/drivers/include/nrfx_spim.h
  24. +29 −27 ext/hal/nordic/nrfx/drivers/include/nrfx_spis.h
  25. +30 −30 ext/hal/nordic/nrfx/drivers/include/nrfx_swi.h
  26. +20 −20 ext/hal/nordic/nrfx/drivers/include/nrfx_systick.h
  27. +153 −0 ext/hal/nordic/nrfx/drivers/include/nrfx_temp.h
  28. +21 −25 ext/hal/nordic/nrfx/drivers/include/nrfx_timer.h
  29. +108 −114 ext/hal/nordic/nrfx/drivers/include/nrfx_twi.h
  30. +131 −138 ext/hal/nordic/nrfx/drivers/include/nrfx_twim.h
  31. +91 −101 ext/hal/nordic/nrfx/drivers/include/nrfx_twis.h
  32. +54 −70 ext/hal/nordic/nrfx/drivers/include/nrfx_uart.h
  33. +62 −74 ext/hal/nordic/nrfx/drivers/include/nrfx_uarte.h
  34. +7 −7 ext/hal/nordic/nrfx/drivers/include/nrfx_usbd.h
  35. +25 −26 ext/hal/nordic/nrfx/drivers/include/nrfx_wdt.h
  36. +41 −47 ext/hal/nordic/nrfx/drivers/nrfx_common.h
  37. +4 −1 ext/hal/nordic/nrfx/drivers/nrfx_errors.h
  38. +34 −30 ext/hal/nordic/nrfx/drivers/src/nrfx_clock.c
  39. +421 −0 ext/hal/nordic/nrfx/drivers/src/nrfx_nvmc.c
  40. +2 −0 ext/hal/nordic/nrfx/drivers/src/nrfx_power.c
  41. +123 −45 ext/hal/nordic/nrfx/drivers/src/nrfx_qspi.c
  42. +146 −0 ext/hal/nordic/nrfx/drivers/src/nrfx_temp.c
  43. +2 −2 ext/hal/nordic/nrfx/drivers/src/nrfx_twis.c
  44. +28 −2 ext/hal/nordic/nrfx/drivers/src/nrfx_uarte.c
  45. +19 −0 ext/hal/nordic/nrfx/drivers/src/nrfx_usbd.c
  46. +1 −1 ext/hal/nordic/nrfx/drivers/src/prs/nrfx_prs.h
  47. +376 −0 ext/hal/nordic/nrfx/hal/nrf_aar.h
  48. +7 −7 ext/hal/nordic/nrfx/hal/nrf_acl.h
  49. +35 −47 ext/hal/nordic/nrfx/hal/nrf_adc.h
  50. +44 −62 ext/hal/nordic/nrfx/hal/nrf_ccm.h
  51. +46 −55 ext/hal/nordic/nrfx/hal/nrf_clock.h
  52. +122 −180 ext/hal/nordic/nrfx/hal/nrf_comp.h
  53. +4 −4 ext/hal/nordic/nrfx/hal/nrf_dppi.h
  54. +0 −2 ext/hal/nordic/nrfx/hal/nrf_ecb.c
  55. +29 −38 ext/hal/nordic/nrfx/hal/nrf_ecb.h
  56. +60 −56 ext/hal/nordic/nrfx/hal/nrf_egu.h
  57. +150 −0 ext/hal/nordic/nrfx/hal/nrf_ficr.h
  58. +62 −87 ext/hal/nordic/nrfx/hal/nrf_gpio.h
  59. +113 −106 ext/hal/nordic/nrfx/hal/nrf_gpiote.h
  60. +37 −61 ext/hal/nordic/nrfx/hal/nrf_i2s.h
  61. +22 −22 ext/hal/nordic/nrfx/hal/nrf_kmu.h
  62. +90 −111 ext/hal/nordic/nrfx/hal/nrf_lpcomp.h
  63. +43 −43 ext/hal/nordic/nrfx/hal/nrf_mwu.h
  64. +74 −81 ext/hal/nordic/nrfx/hal/nrf_nfct.h
  65. +355 −14 ext/hal/nordic/nrfx/hal/nrf_nvmc.h
  66. +72 −85 ext/hal/nordic/nrfx/hal/nrf_pdm.h
  67. +178 −183 ext/hal/nordic/nrfx/hal/nrf_power.h
  68. +49 −79 ext/hal/nordic/nrfx/hal/nrf_ppi.h
  69. +96 −115 ext/hal/nordic/nrfx/hal/nrf_pwm.h
  70. +127 −120 ext/hal/nordic/nrfx/hal/nrf_qdec.h
  71. +149 −121 ext/hal/nordic/nrfx/hal/nrf_qspi.h
  72. +67 −94 ext/hal/nordic/nrfx/hal/nrf_radio.h
  73. +2 −2 ext/hal/nordic/nrfx/hal/nrf_regulators.h
  74. +61 −75 ext/hal/nordic/nrfx/hal/nrf_rng.h
  75. +14 −15 ext/hal/nordic/nrfx/hal/nrf_rtc.h
  76. +96 −128 ext/hal/nordic/nrfx/hal/nrf_saadc.h
  77. +72 −84 ext/hal/nordic/nrfx/hal/nrf_spi.h
  78. +136 −147 ext/hal/nordic/nrfx/hal/nrf_spim.h
  79. +117 −136 ext/hal/nordic/nrfx/hal/nrf_spis.h
  80. +26 −26 ext/hal/nordic/nrfx/hal/nrf_spu.h
  81. +16 −17 ext/hal/nordic/nrfx/hal/nrf_systick.h
  82. +192 −6 ext/hal/nordic/nrfx/hal/nrf_temp.h
  83. +106 −102 ext/hal/nordic/nrfx/hal/nrf_timer.h
  84. +75 −85 ext/hal/nordic/nrfx/hal/nrf_twi.h
  85. +103 −99 ext/hal/nordic/nrfx/hal/nrf_twim.h
  86. +242 −275 ext/hal/nordic/nrfx/hal/nrf_twis.h
  87. +88 −103 ext/hal/nordic/nrfx/hal/nrf_uart.h
  88. +108 −126 ext/hal/nordic/nrfx/hal/nrf_uarte.h
  89. +303 −329 ext/hal/nordic/nrfx/hal/nrf_usbd.h
  90. +8 −8 ext/hal/nordic/nrfx/hal/nrf_vmc.h
  91. +42 −59 ext/hal/nordic/nrfx/hal/nrf_wdt.h
  92. +1 −1 ext/hal/nordic/nrfx/soc/nrfx_coredep.h
  93. +29 −3 ext/hal/nordic/nrfx_config_nrf51.h
  94. +37 −2 ext/hal/nordic/nrfx_config_nrf52810.h
  95. +35 −5 ext/hal/nordic/nrfx_config_nrf52832.h
  96. +34 −3 ext/hal/nordic/nrfx_config_nrf52840.h
  97. +135 −128 ext/hal/nordic/nrfx_config_nrf9160.h
  98. +39 −49 ext/hal/nordic/nrfx_glue.h
  99. +10 −10 ext/hal/nordic/nrfx_log.h
@@ -2,10 +2,10 @@ nrfx
####

Origin:
https://github.com/NordicSemiconductor/nrfx/tree/v1.6.2
https://github.com/NordicSemiconductor/nrfx/tree/v1.7.1

Status:
v1.6.2
v1.7.1

Purpose:
With added proper shims adapting it to Zephyr's APIs, nrfx will provide
@@ -32,7 +32,7 @@ URL:
https://github.com/NordicSemiconductor/nrfx

commit:
6f54f689e9555ea18f9aca87caf44a3419e5dd7a
9d68726e41c321f1772c187bd12d82f5b13104f1

Maintained-by:
External
@@ -41,4 +41,4 @@ License:
BSD-3-Clause

License Link:
https://github.com/NordicSemiconductor/nrfx/blob/v1.6.2/LICENSE
https://github.com/NordicSemiconductor/nrfx/blob/v1.7.1/LICENSE
@@ -45,14 +45,17 @@ extern "C" {
* @brief Bitmask managing module.
*/

/** @brief Macro for getting index of byte in byte stream where @c abs_bit is put. */
#define BITMASK_BYTE_GET(abs_bit) ((abs_bit)/8)

/** @brief Macro for getting relative index of bit in byte. */
#define BITMASK_RELBIT_GET(abs_bit) ((abs_bit) & 0x00000007)

/**
* Function for checking if bit in the multi-byte bit mask is set.
* @brief Function for checking if bit in the multi-byte bit mask is set.
*
* @param bit Bit index.
* @param p_mask A pointer to mask with bit fields.
* @param[in] bit Bit index.
* @param[in] p_mask Pointer to mask with bit fields.
*
* @return 0 if bit is not set, positive value otherwise.
*/
@@ -65,10 +68,10 @@ __STATIC_INLINE uint32_t nrf_bitmask_bit_is_set(uint32_t bit, void const * p_mas
}

/**
* Function for setting a bit in the multi-byte bit mask.
* @brief Function for setting a bit in the multi-byte bit mask.
*
* @param bit Bit index.
* @param p_mask A pointer to mask with bit fields.
* @param[in] bit Bit index.
* @param[in] p_mask Pointer to mask with bit fields.
*/
__STATIC_INLINE void nrf_bitmask_bit_set(uint32_t bit, void * p_mask)
{
@@ -79,10 +82,10 @@ __STATIC_INLINE void nrf_bitmask_bit_set(uint32_t bit, void * p_mask)
}

/**
* Function for clearing a bit in the multi-byte bit mask.
* @brief Function for clearing a bit in the multi-byte bit mask.
*
* @param bit Bit index.
* @param p_mask A pointer to mask with bit fields.
* @param[in] bit Bit index.
* @param[in] p_mask Pointer to mask with bit fields.
*/
__STATIC_INLINE void nrf_bitmask_bit_clear(uint32_t bit, void * p_mask)
{
@@ -93,12 +96,12 @@ __STATIC_INLINE void nrf_bitmask_bit_clear(uint32_t bit, void * p_mask)
}

/**
* Function for performing bitwise OR operation on two multi-byte bit masks.
* @brief Function for performing bitwise OR operation on two multi-byte bit masks.
*
* @param p_mask1 A pointer to the first bit mask.
* @param p_mask2 A pointer to the second bit mask.
* @param p_out_mask A pointer to the output bit mask.
* @param length Length of output mask in bytes.
* @param[in] p_mask1 Pointer to the first bit mask.
* @param[in] p_mask2 Pointer to the second bit mask.
* @param[in] p_out_mask Pointer to the output bit mask.
* @param[in] length Length of output mask in bytes.
*/
__STATIC_INLINE void nrf_bitmask_masks_or(void const * p_mask1,
void const * p_mask2,
@@ -116,12 +119,12 @@ __STATIC_INLINE void nrf_bitmask_masks_or(void const * p_mask1,
}

/**
* Function for performing bitwise AND operation on two multi-byte bit masks.
* @brief Function for performing bitwise AND operation on two multi-byte bit masks.
*
* @param p_mask1 A pointer to the first bit mask.
* @param p_mask2 A pointer to the second bit mask.
* @param p_out_mask A pointer to the output bit mask.
* @param length Length of output mask in bytes.
* @param[in] p_mask1 Pointer to the first bit mask.
* @param[in] p_mask2 Pointer to the second bit mask.
* @param[in] p_out_mask Pointer to the output bit mask.
* @param[in] length Length of output mask in bytes.
*/
__STATIC_INLINE void nrf_bitmask_masks_and(void const * p_mask1,
void const * p_mask2,
@@ -46,46 +46,38 @@ extern "C" {
* @brief Analog-to-Digital Converter (ADC) peripheral driver.
*/

/**
* @brief Driver event types.
*/
/** @brief Driver event types. */
typedef enum
{
NRFX_ADC_EVT_DONE, ///< Event generated when the buffer is filled with samples.
NRFX_ADC_EVT_SAMPLE, ///< Event generated when the requested channel is sampled.
} nrfx_adc_evt_type_t;

/**
* @brief Analog-to-digital converter driver DONE event.
*/
/** @brief ADC driver DONE event structure. */
typedef struct
{
nrf_adc_value_t * p_buffer; ///< Pointer to the buffer with converted samples.
uint16_t size; ///< Number of samples in the buffer.
} nrfx_adc_done_evt_t;

/**
* @brief Analog-to-digital converter driver SAMPLE event.
*/
/** @brief SAMPLE event structure. */
typedef struct
{
nrf_adc_value_t sample; ///< Converted sample.
} nrfx_adc_sample_evt_t;

/**
* @brief Analog-to-digital converter driver event.
*/
/** @brief ADC driver event. */
typedef struct
{
nrfx_adc_evt_type_t type; ///< Event type.
union
{
nrfx_adc_done_evt_t done; ///< Data for DONE event.
nrfx_adc_sample_evt_t sample; ///< Data for SAMPLE event.
} data;
} data; ///< Union to store event data.
} nrfx_adc_evt_t;

/**@brief Macro for initializing the ADC channel with the default configuration. */
/** @brief Macro for initializing the ADC channel with the default configuration. */
#define NRFX_ADC_DEFAULT_CHANNEL(analog_input) \
{ \
NULL, \
@@ -98,7 +90,7 @@ typedef struct
} \
}

// Forward declaration of the nrfx_adc_channel_t type.
/** @brief Forward declaration of the nrfx_adc_channel_t type. */
typedef struct nrfx_adc_channel_s nrfx_adc_channel_t;

/**
@@ -113,9 +105,7 @@ struct nrfx_adc_channel_s
nrf_adc_config_t config; ///< ADC configuration for the current channel.
};

/**
* @brief ADC configuration.
*/
/** @brief ADC configuration. */
typedef struct
{
uint8_t interrupt_priority; ///< Priority of ADC interrupt.
@@ -142,11 +132,11 @@ typedef void (*nrfx_adc_event_handler_t)(nrfx_adc_evt_t const * p_event);
* If a valid event handler is provided, the driver is initialized in non-blocking mode.
* If event_handler is NULL, the driver works in blocking mode.
*
* @param[in] p_config Pointer to the structure with initial configuration.
* @param[in] p_config Pointer to the structure with the initial configuration.
* @param[in] event_handler Event handler provided by the user.
*
* @retval NRFX_SUCCESS If initialization was successful.
* @retval NRFX_ERROR_INVALID_STATE If the driver is already initialized.
* @retval NRFX_SUCCESS Initialization was successful.
* @retval NRFX_ERROR_INVALID_STATE The driver is already initialized.
*/
nrfx_err_t nrfx_adc_init(nrfx_adc_config_t const * p_config,
nrfx_adc_event_handler_t event_handler);
@@ -169,6 +159,8 @@ void nrfx_adc_uninit(void);
*
* @note The channel instance variable @p p_channel is used by the driver as an item
* in a list. Therefore, it cannot be an automatic variable that is located on the stack.
*
* @param[in] p_channel Pointer to the channel instance.
*/
void nrfx_adc_channel_enable(nrfx_adc_channel_t * const p_channel);

@@ -177,6 +169,8 @@ void nrfx_adc_channel_enable(nrfx_adc_channel_t * const p_channel);
*
* This function can be called only when there is no conversion in progress
* (the ADC is not busy).
*
* @param p_channel Pointer to the channel instance.
*/
void nrfx_adc_channel_disable(nrfx_adc_channel_t * const p_channel);

@@ -206,11 +200,11 @@ void nrfx_adc_sample(void);
* fail if ADC is busy. The channel does not need to be enabled to perform a single conversion.
*
* @param[in] p_channel Channel.
* @param[out] p_value Pointer to the location where the result should be placed. Unless NULL is
* @param[out] p_value Pointer to the location where the result is to be placed. Unless NULL is
* provided, the function is blocking.
*
* @retval NRFX_SUCCESS If conversion was successful.
* @retval NRFX_ERROR_BUSY If the ADC driver is busy.
* @retval NRFX_SUCCESS Conversion was successful.
* @retval NRFX_ERROR_BUSY The ADC driver is busy.
*/
nrfx_err_t nrfx_adc_sample_convert(nrfx_adc_channel_t const * const p_channel,
nrf_adc_value_t * p_value);
@@ -241,16 +235,16 @@ nrfx_err_t nrfx_adc_sample_convert(nrfx_adc_channel_t const * const p_channel,
* @param[in] buffer Result buffer.
* @param[in] size Buffer size in samples.
*
* @retval NRFX_SUCCESS If conversion was successful.
* @retval NRFX_ERROR_BUSY If the driver is busy.
* @retval NRFX_SUCCESS Conversion was successful.
* @retval NRFX_ERROR_BUSY The driver is busy.
*/
nrfx_err_t nrfx_adc_buffer_convert(nrf_adc_value_t * buffer, uint16_t size);

/**
* @brief Function for retrieving the ADC state.
*
* @retval true If the ADC is busy.
* @retval false If the ADC is ready.
* @retval true The ADC is busy.
* @retval false The ADC is ready.
*/
bool nrfx_adc_is_busy(void);

@@ -273,11 +267,11 @@ __STATIC_INLINE uint32_t nrfx_adc_start_task_get(void)

#endif

/** @} */

void nrfx_adc_irq_handler(void);

void nrfx_adc_irq_handler(void);

/** @} */

#ifdef __cplusplus
}

0 comments on commit c28fdc7

Please sign in to comment.
You can’t perform that action at this time.