nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
parent
079e2b8c7c
commit
e6b204f438
@ -31,6 +31,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
@ -224,14 +225,6 @@
|
|||||||
|
|
||||||
/* Misc commoly defined and re-defined things */
|
/* Misc commoly defined and re-defined things */
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef OK
|
#ifndef OK
|
||||||
# define OK 0
|
# define OK 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
@ -224,14 +225,6 @@
|
|||||||
|
|
||||||
/* Misc commoly defined and re-defined things */
|
/* Misc commoly defined and re-defined things */
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef OK
|
#ifndef OK
|
||||||
# define OK 0
|
# define OK 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -74,10 +75,6 @@
|
|||||||
#define EMMC_MSIZE (6) /* Burst size is 512B */
|
#define EMMC_MSIZE (6) /* Burst size is 512B */
|
||||||
#define EMMC_FIFO_DEPTH (0x100) /* FIFO size is 1KB */
|
#define EMMC_FIFO_DEPTH (0x100) /* FIFO size is 1KB */
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -99,14 +100,6 @@
|
|||||||
|
|
||||||
#define DECIMATION_OFF 15
|
#define DECIMATION_OFF 15
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -211,10 +212,6 @@
|
|||||||
#define SDIO_OCR_NUM_FUNCTIONS(ocr) (((ocr) >> 28) & 0x7)
|
#define SDIO_OCR_NUM_FUNCTIONS(ocr) (((ocr) >> 28) & 0x7)
|
||||||
#define SDIO_FUNC_NUM_MAX (7)
|
#define SDIO_FUNC_NUM_MAX (7)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SDIO_BLOCK_TIMEOUT 200
|
#define SDIO_BLOCK_TIMEOUT 200
|
||||||
#define SDIO_BLOCK_SIZE 512
|
#define SDIO_BLOCK_SIZE 512
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -258,16 +259,6 @@
|
|||||||
#define efm32_rqempty(ep) ((ep)->head == NULL)
|
#define efm32_rqempty(ep) ((ep)->head == NULL)
|
||||||
#define efm32_rqpeek(ep) ((ep)->head)
|
#define efm32_rqpeek(ep) ((ep)->head)
|
||||||
|
|
||||||
/* Standard stuff ***********************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -135,16 +136,6 @@
|
|||||||
#define EFM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define EFM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
#define EFM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define EFM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
|
|
||||||
/* Ever-present MIN/MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Tracing ******************************************************************/
|
/* Tracing ******************************************************************/
|
||||||
|
|
||||||
#define TR_FMT1 false
|
#define TR_FMT1 false
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -41,14 +42,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_ARMV7M_DCACHE
|
#ifndef CONFIG_ARMV7M_DCACHE
|
||||||
/* With Dcache off:
|
/* With Dcache off:
|
||||||
* Cacheable (MPU_RASR_C) and Bufferable (MPU_RASR_B) needs to be off
|
* Cacheable (MPU_RASR_C) and Bufferable (MPU_RASR_B) needs to be off
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -40,14 +41,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -342,16 +343,6 @@ const struct trace_msg_t g_usb_trace_strings_deverror[] =
|
|||||||
|
|
||||||
/* Misc Helper Macros *******************************************************/
|
/* Misc Helper Macros *******************************************************/
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <nuttx/kmalloc.h>
|
#include <nuttx/kmalloc.h>
|
||||||
#include <nuttx/semaphore.h>
|
#include <nuttx/semaphore.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -75,10 +76,6 @@
|
|||||||
#define DMACCFG_SRCPERI_SHIFT 1
|
#define DMACCFG_SRCPERI_SHIFT 1
|
||||||
#define DMACCFG_E (1 << 0)
|
#define DMACCFG_E (1 << 0)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) > (b) ? (b) : (a))
|
|
||||||
#endif /* MIN */
|
|
||||||
|
|
||||||
#define LC823450_DMA_EN (1 << 26)
|
#define LC823450_DMA_EN (1 << 26)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -38,14 +39,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -54,10 +55,6 @@
|
|||||||
|
|
||||||
#define DVFS_LINELEN 128
|
#define DVFS_LINELEN 128
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -141,10 +142,6 @@ int g_console_disable;
|
|||||||
# define HS_DMAACT_ACT2 3
|
# define HS_DMAACT_ACT2 3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) > (b) ? (b) : (a))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -53,10 +54,6 @@
|
|||||||
# error "SPI_EXCHANGE is not supported"
|
# error "SPI_EXCHANGE is not supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) > (b) ? (b) : (a))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -73,10 +74,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) > (b) ? (b) : (a))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
# define DPRINTF(fmt, args...) uinfo(fmt, ##args)
|
# define DPRINTF(fmt, args...) uinfo(fmt, ##args)
|
||||||
#else
|
#else
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,16 +24,14 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include "amebaz_coex.h"
|
#include "amebaz_coex.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HCI_VENDOR_MAILBOX_CMD 0xfc8f
|
#define HCI_VENDOR_MAILBOX_CMD 0xfc8f
|
||||||
|
|
||||||
/* static net_buf_simple *Xiaomi_buf; */
|
/* static net_buf_simple *Xiaomi_buf; */
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -37,14 +38,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) a > b ? a : b
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) a < b ? a : b
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_ARMV7M_DCACHE
|
#ifndef CONFIG_ARMV7M_DCACHE
|
||||||
/* With Dcache off:
|
/* With Dcache off:
|
||||||
* Cacheable (MPU_RASR_C) and Bufferable (MPU_RASR_B) needs to be off
|
* Cacheable (MPU_RASR_C) and Bufferable (MPU_RASR_B) needs to be off
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -175,16 +176,6 @@
|
|||||||
#define SAM_TRACEINTID_UPSTRRES 0x001f
|
#define SAM_TRACEINTID_UPSTRRES 0x001f
|
||||||
#define SAM_TRACEINTID_WAKEUP 0x0020
|
#define SAM_TRACEINTID_WAKEUP 0x0020
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -77,16 +78,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Common definitions *******************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Mailboxes ****************************************************************/
|
/* Mailboxes ****************************************************************/
|
||||||
|
|
||||||
#define SAMA5_CAN_NRECVMB MAX(CONFIG_SAMA5_CAN0_NRECVMB, CONFIG_SAMA5_CAN1_NRECVMB)
|
#define SAMA5_CAN_NRECVMB MAX(CONFIG_SAMA5_CAN0_NRECVMB, CONFIG_SAMA5_CAN1_NRECVMB)
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -338,16 +339,6 @@
|
|||||||
# define DEBUG_NCMDSAMPLES 2
|
# define DEBUG_NCMDSAMPLES 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Some semi-standard definitions */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
@ -62,16 +63,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Common definitions */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* dedicated RS and TX buffers are not supported */
|
/* dedicated RS and TX buffers are not supported */
|
||||||
|
|
||||||
#define DEDICATED_BUFFERS_NOT_USED
|
#define DEDICATED_BUFFERS_NOT_USED
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
@ -127,16 +128,6 @@
|
|||||||
# define TSD_PENMOVE (TOUCH_MOVE | TOUCH_ID_VALID | TOUCH_POS_VALID)
|
# define TSD_PENMOVE (TOUCH_MOVE | TOUCH_ID_VALID | TOUCH_POS_VALID)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BOARD_TSSCTIM
|
#ifndef BOARD_TSSCTIM
|
||||||
# define BOARD_TSSCTIM 0
|
# define BOARD_TSSCTIM 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -207,16 +208,6 @@
|
|||||||
#define SAM_TRACEINTID_UPSTRRES 0x0021
|
#define SAM_TRACEINTID_UPSTRRES 0x0021
|
||||||
#define SAM_TRACEINTID_WAKEUP 0x0022
|
#define SAM_TRACEINTID_WAKEUP 0x0022
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -211,16 +212,6 @@
|
|||||||
#define SAM_TRACEINTID_EP0WRSTATUS 0x002a
|
#define SAM_TRACEINTID_EP0WRSTATUS 0x002a
|
||||||
#define SAM_TRACEINTID_EPTRCPT0_LEN 0x002b
|
#define SAM_TRACEINTID_EPTRCPT0_LEN 0x002b
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
@ -140,16 +141,6 @@
|
|||||||
|
|
||||||
#define SAMD5E5_PROGMEM_ERASEDVAL (0xffu)
|
#define SAMD5E5_PROGMEM_ERASEDVAL (0xffu)
|
||||||
|
|
||||||
/* Misc stuff */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -66,6 +66,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -233,16 +234,6 @@
|
|||||||
#define SAM_TRACEINTID_PENDING_PIPE 0x002c
|
#define SAM_TRACEINTID_PENDING_PIPE 0x002c
|
||||||
#define SAM_TRACEINTID_PIPENO 0x002d
|
#define SAM_TRACEINTID_PIPENO 0x002d
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -271,16 +272,6 @@
|
|||||||
# define DEBUG_NCMDSAMPLES 2
|
# define DEBUG_NCMDSAMPLES 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Some semi-standard definitions */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
@ -59,16 +60,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Common definitions *******************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Clock source *************************************************************/
|
/* Clock source *************************************************************/
|
||||||
|
|
||||||
/* PCK5 is the programmable clock source, common to all MCAN controllers */
|
/* PCK5 is the programmable clock source, common to all MCAN controllers */
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -37,18 +38,6 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_ARM_MPU
|
#ifdef CONFIG_ARM_MPU
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
@ -138,16 +139,6 @@
|
|||||||
|
|
||||||
#define SAMV7_PROGMEM_ERASEDVAL (0xffu)
|
#define SAMV7_PROGMEM_ERASEDVAL (0xffu)
|
||||||
|
|
||||||
/* Misc stuff */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -271,16 +272,6 @@
|
|||||||
#define SAM_TRACEINTID_UPSTRRES 0x0025
|
#define SAM_TRACEINTID_UPSTRRES 0x0025
|
||||||
#define SAM_TRACEINTID_WAKEUP 0x0026
|
#define SAM_TRACEINTID_WAKEUP 0x0026
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
@ -573,10 +574,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Helper */
|
|
||||||
|
|
||||||
#define MIN(x,y) ((x) < (y) ? (x) : (y))
|
|
||||||
|
|
||||||
/* Color normalization */
|
/* Color normalization */
|
||||||
|
|
||||||
#if defined(CONFIG_STM32_LTDC_L1_RGB565)
|
#if defined(CONFIG_STM32_LTDC_L1_RGB565)
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -301,16 +302,6 @@
|
|||||||
#define stm32_rqempty(ep) ((ep)->head == NULL)
|
#define stm32_rqempty(ep) ((ep)->head == NULL)
|
||||||
#define stm32_rqpeek(ep) ((ep)->head)
|
#define stm32_rqpeek(ep) ((ep)->head)
|
||||||
|
|
||||||
/* Standard stuff ***********************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -145,16 +146,6 @@
|
|||||||
#define STM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
#define STM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
|
|
||||||
/* Ever-present MIN/MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -257,16 +258,6 @@
|
|||||||
#define stm32_rqempty(ep) ((ep)->head == NULL)
|
#define stm32_rqempty(ep) ((ep)->head == NULL)
|
||||||
#define stm32_rqpeek(ep) ((ep)->head)
|
#define stm32_rqpeek(ep) ((ep)->head)
|
||||||
|
|
||||||
/* Standard stuff ***********************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -150,16 +151,6 @@
|
|||||||
#define STM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
#define STM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
|
|
||||||
/* Ever-present MIN/MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -232,16 +233,6 @@
|
|||||||
#define STM32_TRACEINTID_EP0SETUPOUT 0x001f
|
#define STM32_TRACEINTID_EP0SETUPOUT 0x001f
|
||||||
#define STM32_TRACEINTID_EP0SETUPOUTDATA 0x0020
|
#define STM32_TRACEINTID_EP0SETUPOUTDATA 0x0020
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -213,16 +214,6 @@
|
|||||||
#define STM32_TRACEINTID_EP0SETUPOUT 0x001f
|
#define STM32_TRACEINTID_EP0SETUPOUT 0x001f
|
||||||
#define STM32_TRACEINTID_EP0SETUPOUTDATA 0x0020
|
#define STM32_TRACEINTID_EP0SETUPOUTDATA 0x0020
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -217,16 +218,6 @@
|
|||||||
#define STM32_TRACEINTID_EP0SETUPOUT 0x001e
|
#define STM32_TRACEINTID_EP0SETUPOUT 0x001e
|
||||||
#define STM32_TRACEINTID_EP0SETUPOUTDATA 0x001f
|
#define STM32_TRACEINTID_EP0SETUPOUTDATA 0x001f
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -218,10 +219,6 @@
|
|||||||
# define CONFIG_STM32F7_ETH_NTXDESC 4
|
# define CONFIG_STM32F7_ETH_NTXDESC 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We need at least one more free buffer than transmit buffers */
|
/* We need at least one more free buffer than transmit buffers */
|
||||||
|
|
||||||
#define STM32_ETH_NFREEBUFFERS (CONFIG_STM32F7_ETH_NTXDESC+1)
|
#define STM32_ETH_NFREEBUFFERS (CONFIG_STM32F7_ETH_NTXDESC+1)
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
@ -574,10 +575,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Helper */
|
|
||||||
|
|
||||||
#define MIN(x,y) ((x) < (y) ? (x) : (y))
|
|
||||||
|
|
||||||
/* Color normalization */
|
/* Color normalization */
|
||||||
|
|
||||||
#if defined(CONFIG_STM32F7_LTDC_L1_RGB565)
|
#if defined(CONFIG_STM32F7_LTDC_L1_RGB565)
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -386,16 +387,6 @@
|
|||||||
# define stm32_rqempty(ep) ((ep)->head == NULL)
|
# define stm32_rqempty(ep) ((ep)->head == NULL)
|
||||||
# define stm32_rqpeek(ep) ((ep)->head)
|
# define stm32_rqpeek(ep) ((ep)->head)
|
||||||
|
|
||||||
/* Standard stuff ***********************************************************/
|
|
||||||
|
|
||||||
# ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -146,16 +147,6 @@
|
|||||||
#define STM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
#define STM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
|
|
||||||
/* Ever-present MIN/MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -333,16 +334,6 @@
|
|||||||
#define stm32_rqempty(ep) ((ep)->head == NULL)
|
#define stm32_rqempty(ep) ((ep)->head == NULL)
|
||||||
#define stm32_rqpeek(ep) ((ep)->head)
|
#define stm32_rqpeek(ep) ((ep)->head)
|
||||||
|
|
||||||
/* Standard stuff ***********************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -146,16 +147,6 @@
|
|||||||
#define STM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
#define STM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
|
|
||||||
/* Ever-present MIN/MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include "stm32l4_rcc.h"
|
#include "stm32l4_rcc.h"
|
||||||
#include "stm32l4_waste.h"
|
#include "stm32l4_waste.h"
|
||||||
@ -88,10 +89,6 @@
|
|||||||
FLASH_SR_PGAERR | FLASH_SR_WRPERR | \
|
FLASH_SR_PGAERR | FLASH_SR_WRPERR | \
|
||||||
FLASH_SR_PROGERR)
|
FLASH_SR_PROGERR)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -353,16 +354,6 @@
|
|||||||
#define stm32l4_rqempty(ep) ((ep)->head == NULL)
|
#define stm32l4_rqempty(ep) ((ep)->head == NULL)
|
||||||
#define stm32l4_rqpeek(ep) ((ep)->head)
|
#define stm32l4_rqpeek(ep) ((ep)->head)
|
||||||
|
|
||||||
/* Standard stuff ***********************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -143,16 +144,6 @@
|
|||||||
#define STM32L4_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32L4_SETUP_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
#define STM32L4_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
#define STM32L4_DATANAK_DELAY SEC2TICK(5) /* 5 seconds in system ticks */
|
||||||
|
|
||||||
/* Ever-present MIN/MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -217,16 +218,6 @@
|
|||||||
#define STM32L4_TRACEINTID_EP0SETUPOUT 0x001f
|
#define STM32L4_TRACEINTID_EP0SETUPOUT 0x001f
|
||||||
#define STM32L4_TRACEINTID_EP0SETUPOUTDATA 0x0020
|
#define STM32L4_TRACEINTID_EP0SETUPOUTDATA 0x0020
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <nuttx/mutex.h>
|
#include <nuttx/mutex.h>
|
||||||
|
|
||||||
#include "stm32l5_rcc.h"
|
#include "stm32l5_rcc.h"
|
||||||
@ -89,10 +90,6 @@
|
|||||||
FLASH_SR_PGAERR | FLASH_SR_WRPERR | \
|
FLASH_SR_PGAERR | FLASH_SR_WRPERR | \
|
||||||
FLASH_SR_PROGERR)
|
FLASH_SR_PROGERR)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <nuttx/mutex.h>
|
#include <nuttx/mutex.h>
|
||||||
|
|
||||||
#include "stm32_rcc.h"
|
#include "stm32_rcc.h"
|
||||||
@ -89,10 +90,6 @@
|
|||||||
FLASH_NSSR_PGAERR | FLASH_NSSR_WRPERR | \
|
FLASH_NSSR_PGAERR | FLASH_NSSR_WRPERR | \
|
||||||
FLASH_NSSR_PROGERR)
|
FLASH_NSSR_PROGERR)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
#include "stm32wb_rcc.h"
|
#include "stm32wb_rcc.h"
|
||||||
@ -75,10 +76,6 @@
|
|||||||
FLASH_SR_PGAERR | FLASH_SR_WRPERR | \
|
FLASH_SR_PGAERR | FLASH_SR_WRPERR | \
|
||||||
FLASH_SR_PROGERR)
|
FLASH_SR_PROGERR)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (a) > (b) ? (a) : (b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (a) < (b) ? (a) : (b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include "stm32wl5_rcc.h"
|
#include "stm32wl5_rcc.h"
|
||||||
#include "stm32wl5_waste.h"
|
#include "stm32wl5_waste.h"
|
||||||
@ -77,10 +78,6 @@
|
|||||||
FLASH_SR_PGAERR | FLASH_SR_WRPERR | \
|
FLASH_SR_PGAERR | FLASH_SR_WRPERR | \
|
||||||
FLASH_SR_PROGERR)
|
FLASH_SR_PROGERR)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,17 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
@ -46,16 +47,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* ADC calibration max count */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Default reference voltage 1175 mV */
|
/* Default reference voltage 1175 mV */
|
||||||
|
|
||||||
#define ADC_DEFAULT_VREF 1175
|
#define ADC_DEFAULT_VREF 1175
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
@ -44,8 +45,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#define MIN(a, b) (((a) > (b)) ? (b) : (a))
|
|
||||||
|
|
||||||
/* Flash size deifnitions */
|
/* Flash size deifnitions */
|
||||||
|
|
||||||
#define TLSR82_SECTOR_SHIFT 12
|
#define TLSR82_SECTOR_SHIFT 12
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/userspace.h>
|
#include <nuttx/userspace.h>
|
||||||
|
|
||||||
@ -33,18 +34,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_ARM_MPU)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -34,6 +34,8 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include "barriers.h"
|
#include "barriers.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -147,18 +149,6 @@
|
|||||||
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* define MAX(a, b)/MIN(a, b)
|
|
||||||
* The larger/smaller value between a and b.
|
|
||||||
* Arguments are evaluated twice.
|
|
||||||
*/
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GET_EL(mode) (((mode) >> MODE_EL_SHIFT) & MODE_EL_MASK)
|
#define GET_EL(mode) (((mode) >> MODE_EL_SHIFT) & MODE_EL_MASK)
|
||||||
|
|
||||||
/* MPIDR_EL1, Multiprocessor Affinity Register */
|
/* MPIDR_EL1, Multiprocessor Affinity Register */
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
@ -268,16 +269,6 @@
|
|||||||
#define PHYS_ADDR(va) ((uint32_t)(va) & 0x1fffffff)
|
#define PHYS_ADDR(va) ((uint32_t)(va) & 0x1fffffff)
|
||||||
#define VIRT_ADDR(pa) (KSEG1_BASE | (uint32_t)(pa))
|
#define VIRT_ADDR(pa) (KSEG1_BASE | (uint32_t)(pa))
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -240,16 +241,6 @@
|
|||||||
#define PHYS_ADDR(va) ((uint32_t)(va) & 0x1fffffff)
|
#define PHYS_ADDR(va) ((uint32_t)(va) & 0x1fffffff)
|
||||||
#define VIRT_ADDR(pa) (KSEG1_BASE | (uint32_t)(pa))
|
#define VIRT_ADDR(pa) (KSEG1_BASE | (uint32_t)(pa))
|
||||||
|
|
||||||
/* Ever-present MIN and MAX macros */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Byte ordering in host-based values */
|
/* Byte ordering in host-based values */
|
||||||
|
|
||||||
#ifdef CONFIG_ENDIAN_BIG
|
#ifdef CONFIG_ENDIAN_BIG
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
@ -114,14 +115,6 @@
|
|||||||
|
|
||||||
#define ADC_WORK_DELAY (1)
|
#define ADC_WORK_DELAY (1)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -46,10 +46,6 @@
|
|||||||
* Pre-processor Macros
|
* Pre-processor Macros
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#undef MIN
|
|
||||||
#undef MAX
|
|
||||||
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
|
|
||||||
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
|
|
||||||
#define SOC_RSA_MAX_BIT_LEN (3072)
|
#define SOC_RSA_MAX_BIT_LEN (3072)
|
||||||
|
|
||||||
#define CIL (sizeof(uint32_t)) /* chars in limb */
|
#define CIL (sizeof(uint32_t)) /* chars in limb */
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -55,10 +56,6 @@
|
|||||||
#define SET_BITS(_r, _ch, _b) modifyreg32((_r) + (_ch) * REG_OFF, 0, (_b))
|
#define SET_BITS(_r, _ch, _b) modifyreg32((_r) + (_ch) * REG_OFF, 0, (_b))
|
||||||
#define CLR_BITS(_r, _ch, _b) modifyreg32((_r) + (_ch) * REG_OFF, (_b), 0)
|
#define CLR_BITS(_r, _ch, _b) modifyreg32((_r) + (_ch) * REG_OFF, (_b), 0)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ALIGN_UP
|
#ifndef ALIGN_UP
|
||||||
# define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
|
# define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <nuttx/efuse/efuse.h>
|
#include <nuttx/efuse/efuse.h>
|
||||||
#include <arch/esp32c3/chip.h>
|
#include <arch/esp32c3/chip.h>
|
||||||
|
|
||||||
@ -46,8 +47,6 @@
|
|||||||
#define EFUSE_CMD_READ 0x01 /* Command to read. */
|
#define EFUSE_CMD_READ 0x01 /* Command to read. */
|
||||||
#define EFUSE_MAX_BLK_LEN 256 /* Max length of efuse block. */
|
#define EFUSE_MAX_BLK_LEN 256 /* Max length of efuse block. */
|
||||||
|
|
||||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/spinlock.h>
|
#include <nuttx/spinlock.h>
|
||||||
@ -68,10 +69,6 @@
|
|||||||
# define CONFIG_PM_SLEEP_WAKEUP_NSEC 0
|
# define CONFIG_PM_SLEEP_WAKEUP_NSEC 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EXPECTED_IDLE_TIME_US (800)
|
#define EXPECTED_IDLE_TIME_US (800)
|
||||||
#define EARLY_WAKEUP_US (200)
|
#define EARLY_WAKEUP_US (200)
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
@ -117,10 +118,6 @@
|
|||||||
#define SET_CHAN_BITS(c, r, b) setbits(b, LEDC_CHAN_REG(r, (c)->num));
|
#define SET_CHAN_BITS(c, r, b) setbits(b, LEDC_CHAN_REG(r, (c)->num));
|
||||||
#define SET_CHAN_REG(c, r, v) putreg32(v, LEDC_CHAN_REG(r, (c)->num));
|
#define SET_CHAN_REG(c, r, v) putreg32(v, LEDC_CHAN_REG(r, (c)->num));
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
@ -74,10 +75,6 @@
|
|||||||
|
|
||||||
#define RTC_MODULE_SLEEP_PREPARE_CYCLES (6)
|
#define RTC_MODULE_SLEEP_PREPARE_CYCLES (6)
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Time from VDD_SDIO power up to first flash read in ROM code */
|
/* Time from VDD_SDIO power up to first flash read in ROM code */
|
||||||
|
|
||||||
#define VDD_SDIO_POWERUP_TO_FLASH_READ_US (700)
|
#define VDD_SDIO_POWERUP_TO_FLASH_READ_US (700)
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -44,14 +45,6 @@
|
|||||||
#if defined(CONFIG_ESP32C3_RNG)
|
#if defined(CONFIG_ESP32C3_RNG)
|
||||||
#if defined(CONFIG_DEV_RANDOM) || defined(CONFIG_DEV_URANDOM_ARCH)
|
#if defined(CONFIG_DEV_RANDOM) || defined(CONFIG_DEV_URANDOM_ARCH)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -119,10 +120,6 @@
|
|||||||
|
|
||||||
#define SPI_MAX_BUF_SIZE (64)
|
#define SPI_MAX_BUF_SIZE (64)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -107,10 +108,6 @@
|
|||||||
|
|
||||||
#define SPI_SLAVE_HW_BUF_SIZE (64)
|
#define SPI_SLAVE_HW_BUF_SIZE (64)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define WORDS2BYTES(_priv, _wn) ((_wn) * ((_priv)->nbits / 8))
|
#define WORDS2BYTES(_priv, _wn) ((_wn) * ((_priv)->nbits / 8))
|
||||||
#define BYTES2WORDS(_priv, _bn) ((_bn) / ((_priv)->nbits / 8))
|
#define BYTES2WORDS(_priv, _bn) ((_bn) / ((_priv)->nbits / 8))
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <clock/clock.h>
|
#include <clock/clock.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -92,10 +93,6 @@
|
|||||||
# define NVS_FILE_MODE 0777
|
# define NVS_FILE_MODE 0777
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define WIFI_CONNECT_TIMEOUT CONFIG_ESP32C3_WIFI_CONNECT_TIMEOUT
|
#define WIFI_CONNECT_TIMEOUT CONFIG_ESP32C3_WIFI_CONNECT_TIMEOUT
|
||||||
#define WIFI_RECONNECT_COUNT (10)
|
#define WIFI_RECONNECT_COUNT (10)
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <netinet/arp.h>
|
#include <netinet/arp.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include <nuttx/kmalloc.h>
|
#include <nuttx/kmalloc.h>
|
||||||
#include <nuttx/wireless/wireless.h>
|
#include <nuttx/wireless/wireless.h>
|
||||||
@ -53,10 +54,6 @@
|
|||||||
|
|
||||||
#define SCAN_TIME_SEC (5)
|
#define SCAN_TIME_SEC (5)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Maximum number of channels for Wi-Fi 2.4Ghz */
|
/* Maximum number of channels for Wi-Fi 2.4Ghz */
|
||||||
|
|
||||||
#define CHANNEL_MAX_NUM (14)
|
#define CHANNEL_MAX_NUM (14)
|
||||||
|
@ -23,7 +23,9 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
#include "xtensa.h"
|
#include "xtensa.h"
|
||||||
#include "xtensa_attr.h"
|
#include "xtensa_attr.h"
|
||||||
@ -36,10 +38,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_ESP_CONSOLE_UART_NUM
|
#ifndef CONFIG_ESP_CONSOLE_UART_NUM
|
||||||
#define CONFIG_ESP_CONSOLE_UART_NUM 0
|
#define CONFIG_ESP_CONSOLE_UART_NUM 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "hardware/esp32_dma.h"
|
#include "hardware/esp32_dma.h"
|
||||||
@ -34,10 +35,6 @@
|
|||||||
* Preprocessor Definitions
|
* Preprocessor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ALIGN_UP
|
#ifndef ALIGN_UP
|
||||||
# define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
|
# define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <nuttx/efuse/efuse.h>
|
#include <nuttx/efuse/efuse.h>
|
||||||
|
|
||||||
#include "xtensa.h"
|
#include "xtensa.h"
|
||||||
@ -42,8 +43,6 @@
|
|||||||
#define EFUSE_CMD_PGM 0x02 /* Command to program. */
|
#define EFUSE_CMD_PGM 0x02 /* Command to program. */
|
||||||
#define EFUSE_CMD_READ 0x01 /* Command to read. */
|
#define EFUSE_CMD_READ 0x01 /* Command to read. */
|
||||||
|
|
||||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -168,13 +168,6 @@
|
|||||||
|
|
||||||
/* Operation ****************************************************************/
|
/* Operation ****************************************************************/
|
||||||
|
|
||||||
/* Get smaller values */
|
|
||||||
|
|
||||||
#ifdef MIN
|
|
||||||
# undef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Check if current TX description is busy */
|
/* Check if current TX description is busy */
|
||||||
|
|
||||||
#define TX_IS_BUSY(_priv) \
|
#define TX_IS_BUSY(_priv) \
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#ifdef CONFIG_ESP32_I2S
|
#ifdef CONFIG_ESP32_I2S
|
||||||
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -109,10 +110,6 @@
|
|||||||
# define I2S1_RX_ENABLED 0
|
# define I2S1_RX_ENABLED 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ALIGN_UP
|
#ifndef ALIGN_UP
|
||||||
# define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
|
# define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
@ -85,10 +86,6 @@
|
|||||||
# define CONFIG_PM_SLEEP_WAKEUP_NSEC 0
|
# define CONFIG_PM_SLEEP_WAKEUP_NSEC 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EXPECTED_IDLE_TIME_US (800)
|
#define EXPECTED_IDLE_TIME_US (800)
|
||||||
#define EARLY_WAKEUP_US (200)
|
#define EARLY_WAKEUP_US (200)
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
@ -132,10 +133,6 @@
|
|||||||
#define SET_CHAN_BITS(c, r, b) setbits(b, LEDC_CHAN_REG(r, (c)->num));
|
#define SET_CHAN_BITS(c, r, b) setbits(b, LEDC_CHAN_REG(r, (c)->num));
|
||||||
#define SET_CHAN_REG(c, r, v) putreg32(v, LEDC_CHAN_REG(r, (c)->num));
|
#define SET_CHAN_REG(c, r, v) putreg32(v, LEDC_CHAN_REG(r, (c)->num));
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -23,8 +23,10 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -80,10 +82,6 @@
|
|||||||
|
|
||||||
#define PARTITION_FLAG_ENCRYPTED (1 << 0)
|
#define PARTITION_FLAG_ENCRYPTED (1 << 0)
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include "hardware/esp32_rtccntl.h"
|
#include "hardware/esp32_rtccntl.h"
|
||||||
#include "hardware/esp32_uart.h"
|
#include "hardware/esp32_uart.h"
|
||||||
@ -65,10 +66,6 @@
|
|||||||
|
|
||||||
#define LIGHT_SLEEP_MIN_TIME_US 200
|
#define LIGHT_SLEEP_MIN_TIME_US 200
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Time from VDD_SDIO power up to first flash read in ROM code */
|
/* Time from VDD_SDIO power up to first flash read in ROM code */
|
||||||
|
|
||||||
#define VDD_SDIO_POWERUP_TO_FLASH_READ_US 700
|
#define VDD_SDIO_POWERUP_TO_FLASH_READ_US 700
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -46,14 +47,6 @@
|
|||||||
#if defined(CONFIG_ESP32_RNG)
|
#if defined(CONFIG_ESP32_RNG)
|
||||||
#if defined(CONFIG_DEV_RANDOM) || defined(CONFIG_DEV_URANDOM_ARCH)
|
#if defined(CONFIG_DEV_RANDOM) || defined(CONFIG_DEV_URANDOM_ARCH)
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#ifdef CONFIG_ESP32_SPI
|
#ifdef CONFIG_ESP32_SPI
|
||||||
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -108,10 +109,6 @@
|
|||||||
|
|
||||||
#define SPI_MAX_BUF_SIZE (64)
|
#define SPI_MAX_BUF_SIZE (64)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_ESP32_SPI
|
#ifdef CONFIG_ESP32_SPI
|
||||||
|
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -109,10 +110,6 @@
|
|||||||
#define SPI_DMA_RESET_MASK (SPI_AHBM_RST_M | SPI_AHBM_FIFO_RST_M | \
|
#define SPI_DMA_RESET_MASK (SPI_AHBM_RST_M | SPI_AHBM_FIFO_RST_M | \
|
||||||
SPI_OUT_RST_M | SPI_IN_RST_M)
|
SPI_OUT_RST_M | SPI_IN_RST_M)
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define WORDS2BYTES(_priv, _wn) (_wn * ((_priv)->nbits / 8))
|
#define WORDS2BYTES(_priv, _wn) (_wn * ((_priv)->nbits / 8))
|
||||||
#define BYTES2WORDS(_priv, _bn) (_bn / ((_priv)->nbits / 8))
|
#define BYTES2WORDS(_priv, _bn) (_bn / ((_priv)->nbits / 8))
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
@ -91,10 +92,6 @@
|
|||||||
& ~(SPI_FLASH_MMU_PAGE_SIZE - 1))
|
& ~(SPI_FLASH_MMU_PAGE_SIZE - 1))
|
||||||
#define MMU_ALIGNDOWN_SIZE(_s) ((_s) & ~(SPI_FLASH_MMU_PAGE_SIZE - 1))
|
#define MMU_ALIGNDOWN_SIZE(_s) ((_s) & ~(SPI_FLASH_MMU_PAGE_SIZE - 1))
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Flash MMU table for PRO CPU */
|
/* Flash MMU table for PRO CPU */
|
||||||
|
|
||||||
#define PRO_MMU_TABLE ((volatile uint32_t *)DPORT_PRO_FLASH_MMU_TABLE_REG)
|
#define PRO_MMU_TABLE ((volatile uint32_t *)DPORT_PRO_FLASH_MMU_TABLE_REG)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user