mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-05 09:29:39 +00:00
Changes suggested by @bthebaudeau.
This commit is contained in:
parent
2cf730a1c6
commit
ee05810904
@ -58,7 +58,6 @@
|
|||||||
#define FLASH_CCA_BOOTLDR_CFG_ACTIVE_HIGH 0x08000000 /**< Selected pin on pad A active high */
|
#define FLASH_CCA_BOOTLDR_CFG_ACTIVE_HIGH 0x08000000 /**< Selected pin on pad A active high */
|
||||||
#define FLASH_CCA_BOOTLDR_CFG_PORT_A_PIN_M 0x07000000 /**< Selected pin on pad A mask */
|
#define FLASH_CCA_BOOTLDR_CFG_PORT_A_PIN_M 0x07000000 /**< Selected pin on pad A mask */
|
||||||
#define FLASH_CCA_BOOTLDR_CFG_PORT_A_PIN_S 24 /**< Selected pin on pad A shift */
|
#define FLASH_CCA_BOOTLDR_CFG_PORT_A_PIN_S 24 /**< Selected pin on pad A shift */
|
||||||
#define FLASH_CCA_BOOTLDR_CFG_PORT_A_LEVEL_S 27 /**< Pin level shift */
|
|
||||||
/** @} */
|
/** @} */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/** \name Image valid definitions
|
/** \name Image valid definitions
|
||||||
|
@ -53,8 +53,8 @@ typedef uint32_t rtimer_clock_t;
|
|||||||
#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN 3 /**< Pin PA_3 (Select button) activates the boot loader */
|
#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN 3 /**< Pin PA_3 (Select button) activates the boot loader */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef FLASH_CCA_CONF_BOOTLDR_BACKDOOR_LEVEL
|
#ifndef FLASH_CCA_CONF_BOOTLDR_BACKDOOR_ACTIVE_HIGH
|
||||||
#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_LEVEL 0 /**< A logic low level activates the boot loader */
|
#define FLASH_CCA_CONF_BOOTLDR_BACKDOOR_ACTIVE_HIGH 0 /**< A logic low level activates the boot loader */
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -67,8 +67,10 @@ void udma_err_isr(void);
|
|||||||
#if FLASH_CCA_CONF_BOOTLDR_BACKDOOR
|
#if FLASH_CCA_CONF_BOOTLDR_BACKDOOR
|
||||||
/* Backdoor enabled */
|
/* Backdoor enabled */
|
||||||
|
|
||||||
#if ( (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_LEVEL < 0) || (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_LEVEL > 1) )
|
#if FLASH_CCA_CONF_BOOTLDR_BACKDOOR_ACTIVE_HIGH
|
||||||
#error Invalid boot loader backdoor pin level. Please set FLASH_CCA_CONF_BOOTLDR_BACKDOOR_LEVEL to 0 (logic low) or 1 (logic high).
|
#define FLASH_CCA_BOOTLDR_CFG_ACTIVE_LEVEL FLASH_CCA_BOOTLDR_CFG_ACTIVE_HIGH
|
||||||
|
#else
|
||||||
|
#define FLASH_CCA_BOOTLDR_CFG_ACTIVE_LEVEL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN < 0) || (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN > 7) )
|
#if ( (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN < 0) || (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN > 7) )
|
||||||
@ -76,7 +78,7 @@ void udma_err_isr(void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FLASH_CCA_BOOTLDR_CFG ( FLASH_CCA_BOOTLDR_CFG_ENABLE \
|
#define FLASH_CCA_BOOTLDR_CFG ( FLASH_CCA_BOOTLDR_CFG_ENABLE \
|
||||||
| (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_LEVEL << FLASH_CCA_BOOTLDR_CFG_PORT_A_LEVEL_S) \
|
| FLASH_CCA_BOOTLDR_CFG_ACTIVE_LEVEL \
|
||||||
| (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN << FLASH_CCA_BOOTLDR_CFG_PORT_A_PIN_S) )
|
| (FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN << FLASH_CCA_BOOTLDR_CFG_PORT_A_PIN_S) )
|
||||||
#else
|
#else
|
||||||
#define FLASH_CCA_BOOTLDR_CFG FLASH_CCA_BOOTLDR_CFG_DISABLE
|
#define FLASH_CCA_BOOTLDR_CFG FLASH_CCA_BOOTLDR_CFG_DISABLE
|
||||||
|
Loading…
Reference in New Issue
Block a user