Skip to content

Commit

Permalink
nrfx 1.3.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
kl-cruz committed Sep 28, 2018
1 parent 56e90fa commit d4ebe15
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 24 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project are documented in this file.

## [1.3.1] - 2018-09-28
### Fixed
- Corrected the type of nrfx_usbd_ep_status_get() return value.
- Corrected calls to undefined macros in NFCT and USBD drivers.

## [1.3.0] - 2018-09-21
### Added
- Added HAL and driver for NFCT.
Expand Down
35 changes: 18 additions & 17 deletions drivers/include/nrfx_usbd.h
Expand Up @@ -149,25 +149,27 @@ typedef enum
} nrfx_usbd_event_type_t;

/**
* @brief Possible endpoint error codes.
* @brief Endpoint status codes.
*
* Error codes that may be returned with @ref NRFX_USBD_EVT_EPTRANSFER.
* Status codes that may be returned by @ref nrfx_usbd_ep_status_get or, except for
* @ref NRFX_USBD_EP_BUSY, reported together with @ref NRFX_USBD_EVT_EPTRANSFER.
*/
typedef enum
{
NRFX_USBD_EP_OK, /**< No error */
NRFX_USBD_EP_OK, /**< No error occured. */
NRFX_USBD_EP_WAITING, /**< Data received, no buffer prepared already - waiting for configured transfer. */
NRFX_USBD_EP_OVERLOAD, /**< Received number of bytes cannot fit given buffer.
* This error would also be returned when next_transfer function has been defined
* but currently received data cannot fit completely in current buffer.
* No data split from single endpoint transmission is supported.
*
* When this error is reported - data is left inside endpoint buffer.
* Clear endpoint or prepare new buffer and read it.
*/
* This error would also be returned when next_transfer function has been defined
* but currently received data cannot fit completely in current buffer.
* No data split from single endpoint transmission is supported.
*
* When this error is reported - data is left inside endpoint buffer.
* Clear endpoint or prepare new buffer and read it.
*/
NRFX_USBD_EP_ABORTED, /**< EP0 transfer can be aborted when new setup comes.
* Any other transfer can be aborted by USB reset or driver stopping.
*/
* Any other transfer can be aborted by USB reset or driver stopping.
*/
NRFX_USBD_EP_BUSY, /**< A transfer is in progress. */
} nrfx_usbd_ep_status_t;

/**
Expand Down Expand Up @@ -702,12 +704,11 @@ void * nrfx_usbd_feeder_buffer_get(void);
* @param[in] ep Endpoint number.
* @param[out] p_size Information about the current/last transfer size.
*
* @retval NRFX_SUCCESS Transfer already finished.
* @retval NRFX_ERROR_BUSY Ongoing transfer.
* @retval NRFX_ERROR_DATA_SIZE Too much of data received that cannot fit into buffer and cannot be splited into chunks.
* This may happen if buffer size is not a multiplication of endpoint buffer size.
* @return Endpoint status.
*
* @sa nrfx_usbd_ep_status_t
*/
nrfx_err_t nrfx_usbd_ep_status_get(nrfx_usbd_ep_t ep, size_t * p_size);
nrfx_usbd_ep_status_t nrfx_usbd_ep_status_get(nrfx_usbd_ep_t ep, size_t * p_size);

/**
* @brief Get number of received bytes.
Expand Down
6 changes: 3 additions & 3 deletions drivers/src/nrfx_usbd.c
Expand Up @@ -2231,14 +2231,14 @@ void * nrfx_usbd_feeder_buffer_get(void)
return m_tx_buffer;
}

nrfx_err_t nrfx_usbd_ep_status_get(nrfx_usbd_ep_t ep, size_t * p_size)
nrfx_usbd_ep_status_t nrfx_usbd_ep_status_get(nrfx_usbd_ep_t ep, size_t * p_size)
{
nrfx_err_t ret;
nrfx_usbd_ep_status_t ret;

usbd_ep_state_t const * p_state = ep_state_access(ep);
NRFX_CRITICAL_SECTION_ENTER();
*p_size = p_state->transfer_cnt;
ret = (p_state->handler.consumer == NULL) ? p_state->status : NRFX_ERROR_BUSY;
ret = (p_state->handler.consumer == NULL) ? p_state->status : NRFX_USBD_EP_BUSY;
NRFX_CRITICAL_SECTION_EXIT();
return ret;
}
Expand Down
4 changes: 0 additions & 4 deletions soc/nrfx_atomic.c
Expand Up @@ -31,11 +31,7 @@
#include "nrfx_atomic.h"

#ifndef NRFX_ATOMIC_USE_BUILT_IN
#if (defined(__GNUC__) && defined(WIN32))
#define NRFX_ATOMIC_USE_BUILT_IN 1
#else
#define NRFX_ATOMIC_USE_BUILT_IN 0
#endif
#endif // NRFX_ATOMIC_USE_BUILT_IN

#if ((__CORTEX_M >= 0x03U) || (__CORTEX_SC >= 300U))
Expand Down

0 comments on commit d4ebe15

Please sign in to comment.