mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
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
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user