Skip to content

Commit

Permalink
nrfx 1.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
anangl committed Sep 6, 2018
1 parent 3ab39a9 commit d19018e
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 16 deletions.
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Changelog
All notable changes to this project are documented in this file.

## [Unreleased]
## [1.2.0] - 2018-09-06
### Added
- Added function for checking if a specific channel is enabled in the GPIOTE HAL.
- Added support for using the QDEC driver without LED.
- Added functions for modifying only the event endpoint or only the task endpoint in the PPI HAL.
- Added function for reading the pin pull configuration in the GPIO HAL.

### Fixed
- Fixed starting TWIM TXRX transfer after preceding transfer was without stop condition.
- Fixed a double buffering bug that occurred in the UARTE driver after the RX abort.
- Fixed the TXRX transfers in the TWIM driver. They can now be started after transfers that are not ended with the stop condition.

### Changed
- Corrected ISOSPLIT enumerator names in the USBD HAL.

## [1.1.0] - 2018-06-15
### Added
Expand Down
2 changes: 1 addition & 1 deletion doc/nrfx.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PROJECT_NAME = "nrfx"
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = "1.1"
PROJECT_NUMBER = "1.2"
### EDIT THIS ###

# Using the PROJECT_BRIEF tag one can provide an optional one line description
Expand Down
9 changes: 6 additions & 3 deletions drivers/src/nrfx_qdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,15 @@ nrfx_err_t nrfx_qdec_init(nrfx_qdec_config_t const * p_config,
m_qdec_event_handler = event_handler;

nrf_qdec_sampleper_set(p_config->sampleper);
nrf_gpio_cfg_input(p_config->pselled, NRF_GPIO_PIN_NOPULL);
nrf_gpio_cfg_input(p_config->psela, NRF_GPIO_PIN_NOPULL);
nrf_gpio_cfg_input(p_config->pselb, NRF_GPIO_PIN_NOPULL);
if (p_config->pselled != NRF_QDEC_LED_NOT_CONNECTED)
{
nrf_gpio_cfg_input(p_config->pselled, NRF_GPIO_PIN_NOPULL);
nrf_qdec_ledpre_set(p_config->ledpre);
nrf_qdec_ledpol_set(p_config->ledpol);
}
nrf_qdec_pio_assign(p_config->psela, p_config->pselb, p_config->pselled);
nrf_qdec_ledpre_set(p_config->ledpre);
nrf_qdec_ledpol_set(p_config->ledpol);
nrf_qdec_shorts_enable(NRF_QDEC_SHORT_REPORTRDY_READCLRACC_MASK);

if (p_config->dbfen)
Expand Down
18 changes: 15 additions & 3 deletions drivers/src/nrfx_uarte.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,14 @@ void nrfx_uarte_tx_abort(nrfx_uarte_t const * p_instance)

void nrfx_uarte_rx_abort(nrfx_uarte_t const * p_instance)
{
uarte_control_block_t * p_cb = &m_cb[p_instance->drv_inst_idx];

// Short between ENDRX event and STARTRX task must be disabled before
// aborting transmission.
if (p_cb->rx_secondary_buffer_length != 0)
{
nrf_uarte_shorts_disable(p_instance->p_reg, NRF_UARTE_SHORT_ENDRX_STARTRX);
}
nrf_uarte_task_trigger(p_instance->p_reg, NRF_UARTE_TASK_STOPRX);
NRFX_LOG_INFO("RX transaction aborted.");
}
Expand Down Expand Up @@ -520,7 +528,7 @@ static void uarte_irq_handler(NRF_UARTE_Type * p_uarte,
// will not be equal to the buffer length. Interrupted transfer is ignored.
if (amount == p_cb->rx_buffer_length)
{
if (p_cb->rx_secondary_buffer_length)
if (p_cb->rx_secondary_buffer_length != 0)
{
uint8_t * p_data = p_cb->p_rx_buffer;
nrf_uarte_shorts_disable(p_uarte, NRF_UARTE_SHORT_ENDRX_STARTRX);
Expand All @@ -540,17 +548,21 @@ static void uarte_irq_handler(NRF_UARTE_Type * p_uarte,
if (nrf_uarte_event_check(p_uarte, NRF_UARTE_EVENT_RXTO))
{
nrf_uarte_event_clear(p_uarte, NRF_UARTE_EVENT_RXTO);
if (p_cb->rx_buffer_length)

if (p_cb->rx_buffer_length != 0)
{
p_cb->rx_buffer_length = 0;
// In case of using double-buffered reception both variables storing buffer length
// have to be cleared to prevent incorrect behaviour of the driver.
p_cb->rx_secondary_buffer_length = 0;
rx_done_event(p_cb, nrf_uarte_rx_amount_get(p_uarte), p_cb->p_rx_buffer);
}
}

if (nrf_uarte_event_check(p_uarte, NRF_UARTE_EVENT_ENDTX))
{
nrf_uarte_event_clear(p_uarte, NRF_UARTE_EVENT_ENDTX);
if (p_cb->tx_buffer_length)
if (p_cb->tx_buffer_length != 0)
{
tx_done_event(p_cb, nrf_uarte_tx_amount_get(p_uarte));
}
Expand Down
14 changes: 14 additions & 0 deletions hal/nrf_gpiote.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ __STATIC_INLINE void nrf_gpiote_task_force(uint32_t idx, nrf_gpiote_outinit_t in
*/
__STATIC_INLINE void nrf_gpiote_te_default(uint32_t idx);

/**@brief Function for checking if particular Task-Event is enabled.
*
* @param[in] idx Task-Event index.
*
* @retval true If the Task-Event mode is set to Task or Event.
* @retval false If the Task-Event mode is set to Disabled.
*/
__STATIC_INLINE bool nrf_gpiote_te_is_enabled(uint32_t idx);

#ifndef SUPPRESS_INLINE_IMPLEMENTATION
__STATIC_INLINE void nrf_gpiote_task_set(nrf_gpiote_tasks_t task)
{
Expand Down Expand Up @@ -408,6 +417,11 @@ __STATIC_INLINE void nrf_gpiote_te_default(uint32_t idx)
{
NRF_GPIOTE->CONFIG[idx] = 0;
}

__STATIC_INLINE bool nrf_gpiote_te_is_enabled(uint32_t idx)
{
return (NRF_GPIOTE->CONFIG[idx] & GPIOTE_CONFIG_MODE_Msk) != GPIOTE_CONFIG_MODE_Disabled;
}
#endif //SUPPRESS_INLINE_IMPLEMENTATION

/** @} */
Expand Down
7 changes: 7 additions & 0 deletions hal/nrf_qdec.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ extern "C" {
* @brief Hardware access layer for managing the Quadrature Decoder (QDEC) peripheral.
*/

/**
* @brief This value can be provided as a parameter for the @ref nrf_qdec_pio_assign
* function call to specify that a LED signal shall not be use by the QDEC and
* connected to a physical pin.
*/
#define NRF_QDEC_LED_NOT_CONNECTED 0xFFFFFFFF

/**
* @enum nrf_qdec_task_t
* @brief QDEC tasks.
Expand Down
14 changes: 7 additions & 7 deletions hal/nrf_usbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,11 @@ void nrf_usbd_int_disable(uint32_t int_mask)
*/
typedef enum
{
NRF_USBD_EVENTCAUSE_ISOOUTCRC_MASK = USBD_EVENTCAUSE_ISOOUTCRC_Msk, /**< CRC error was detected on isochronous OUT endpoint 8. */
NRF_USBD_EVENTCAUSE_SUSPEND_MASK = USBD_EVENTCAUSE_SUSPEND_Msk , /**< Signals that the USB lines have been seen idle long enough for the device to enter suspend. */
NRF_USBD_EVENTCAUSE_RESUME_MASK = USBD_EVENTCAUSE_RESUME_Msk , /**< Signals that a RESUME condition (K state or activity restart) has been detected on the USB lines. */
NRF_USBD_EVENTCAUSE_READY_MASK = USBD_EVENTCAUSE_READY_Msk, /**< MAC is ready for normal operation, rised few us after USBD enabling */
NRF_USBD_EVENTCAUSE_WUREQ_MASK = (1U << 10) /**< The USBD peripheral has exited Low Power mode */
NRF_USBD_EVENTCAUSE_ISOOUTCRC_MASK = USBD_EVENTCAUSE_ISOOUTCRC_Msk, /**< CRC error was detected on isochronous OUT endpoint 8. */
NRF_USBD_EVENTCAUSE_SUSPEND_MASK = USBD_EVENTCAUSE_SUSPEND_Msk, /**< Signals that the USB lines have been seen idle long enough for the device to enter suspend. */
NRF_USBD_EVENTCAUSE_RESUME_MASK = USBD_EVENTCAUSE_RESUME_Msk, /**< Signals that a RESUME condition (K state or activity restart) has been detected on the USB lines. */
NRF_USBD_EVENTCAUSE_WUREQ_MASK = USBD_EVENTCAUSE_USBWUALLOWED_Msk, /**< The USBD peripheral has exited Low Power mode */
NRF_USBD_EVENTCAUSE_READY_MASK = USBD_EVENTCAUSE_READY_Msk, /**< MAC is ready for normal operation, rised few us after USBD enabling */
}nrf_usbd_eventcause_mask_t;

/**
Expand Down Expand Up @@ -613,8 +613,8 @@ typedef enum
*/
typedef enum
{
NRF_USBD_ISOSPLIT_OneDir = USBD_ISOSPLIT_SPLIT_OneDir, /**< Full buffer dedicated to either iso IN or OUT */
NRF_USBD_ISOSPLIT_Half = USBD_ISOSPLIT_SPLIT_HalfIN, /**< Buffer divided in half */
NRF_USBD_ISOSPLIT_ONEDIR = USBD_ISOSPLIT_SPLIT_OneDir, /**< Full buffer dedicated to either iso IN or OUT */
NRF_USBD_ISOSPLIT_HALF = USBD_ISOSPLIT_SPLIT_HalfIN, /**< Buffer divided in half */
}nrf_usbd_isosplit_t;

/**
Expand Down

0 comments on commit d19018e

Please sign in to comment.