1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/nrf5x_common: move usbdev driver to nrf5x_common

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
This commit is contained in:
Dylan Laduranty 2023-07-07 10:53:55 +02:00
parent e487ac551a
commit 37cf43a132
4 changed files with 15 additions and 10 deletions

View File

@ -280,16 +280,6 @@ void nrf5x_spi_acquire(NRF_SPIM_Type *bus, spi_twi_irq_cb_t cb, void *arg);
*/
void nrf5x_spi_release(NRF_SPIM_Type *bus);
/**
* @brief USBDEV buffers must be word aligned because of DMA restrictions
*/
#define USBDEV_CPU_DMA_ALIGNMENT (4)
/**
* @brief USBDEV buffer instantiation requirement
*/
#define USBDEV_CPU_DMA_REQUIREMENTS __attribute__((aligned(USBDEV_CPU_DMA_ALIGNMENT)))
#ifdef __cplusplus
}
#endif

View File

@ -302,6 +302,16 @@ typedef struct {
#endif /* ndef CPU_MODEL_NRF52832XXAA && ndef CPU_FAM_NRF51 */
/**
* @brief USBDEV buffers must be word aligned because of DMA restrictions
*/
#define USBDEV_CPU_DMA_ALIGNMENT (4)
/**
* @brief USBDEV buffer instantiation requirement
*/
#define USBDEV_CPU_DMA_REQUIREMENTS __attribute__((aligned(USBDEV_CPU_DMA_ALIGNMENT)))
#ifdef __cplusplus
}
#endif

View File

@ -38,6 +38,11 @@
#define ENABLE_DEBUG 0
#include "debug.h"
/* Compatibility wrapper for nRF53 */
#ifdef NRF_USBD_S
#define NRF_USBD NRF_USBD_S
#endif
static nrfusb_t _usbdevs[NRF_USB_NUM_PERIPH];
static void _init(usbdev_t *usbdev);