git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8853 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
Giovanni Di Sirio 2016-02-06 12:35:45 +00:00
parent 33c0aa4fa5
commit 22bb52a091
4 changed files with 14 additions and 14 deletions

View File

@ -163,7 +163,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
uint32_t moder = (mode & PAL_STM32_MODE_MASK) >> 0;
uint32_t otyper = (mode & PAL_STM32_OTYPE_MASK) >> 2;
uint32_t ospeedr = (mode & PAL_STM32_OSPEED_MASK) >> 3;
uint32_t pupdr = (mode & PAL_STM32_PUDR_MASK) >> 5;
uint32_t pupdr = (mode & PAL_STM32_PUPDR_MASK) >> 5;
uint32_t altr = (mode & PAL_STM32_ALTERNATE_MASK) >> 7;
uint32_t bit = 0;
while (true) {

View File

@ -64,10 +64,10 @@
#endif
#define PAL_STM32_OSPEED_HIGHEST (3U << 3U)
#define PAL_STM32_PUDR_MASK (3U << 5U)
#define PAL_STM32_PUDR_FLOATING (0U << 5U)
#define PAL_STM32_PUDR_PULLUP (1U << 5U)
#define PAL_STM32_PUDR_PULLDOWN (2U << 5U)
#define PAL_STM32_PUPDR_MASK (3U << 5U)
#define PAL_STM32_PUPDR_FLOATING (0U << 5U)
#define PAL_STM32_PUPDR_PULLUP (1U << 5U)
#define PAL_STM32_PUPDR_PULLDOWN (2U << 5U)
#define PAL_STM32_ALTERNATE_MASK (15U << 7U)
#define PAL_STM32_ALTERNATE(n) ((n) << 7U)
@ -104,13 +104,13 @@
* @brief Input pad with weak pull up resistor.
*/
#define PAL_MODE_INPUT_PULLUP (PAL_STM32_MODE_INPUT | \
PAL_STM32_PUDR_PULLUP)
PAL_STM32_PUPDR_PULLUP)
/**
* @brief Input pad with weak pull down resistor.
*/
#define PAL_MODE_INPUT_PULLDOWN (PAL_STM32_MODE_INPUT | \
PAL_STM32_PUDR_PULLDOWN)
PAL_STM32_PUPDR_PULLDOWN)
/**
* @brief Analog input mode.

View File

@ -146,7 +146,7 @@ void _pal_lld_setgroupmode(ioportid_t port,
uint32_t moder = (mode & PAL_STM32_MODE_MASK) >> 0;
uint32_t otyper = (mode & PAL_STM32_OTYPE_MASK) >> 2;
uint32_t ospeedr = (mode & PAL_STM32_OSPEED_MASK) >> 3;
uint32_t pupdr = (mode & PAL_STM32_PUDR_MASK) >> 5;
uint32_t pupdr = (mode & PAL_STM32_PUPDR_MASK) >> 5;
uint32_t altr = (mode & PAL_STM32_ALTERNATE_MASK) >> 7;
uint32_t ascr = (mode & PAL_STM32_ASCR_MASK) >> 11;
uint32_t lockr = (mode & PAL_STM32_LOCKR_MASK) >> 12;

View File

@ -60,10 +60,10 @@
#define PAL_STM32_OSPEED_FAST (2U << 3U)
#define PAL_STM32_OSPEED_HIGH (3U << 3U)
#define PAL_STM32_PUDR_MASK (3U << 5U)
#define PAL_STM32_PUDR_FLOATING (0U << 5U)
#define PAL_STM32_PUDR_PULLUP (1U << 5U)
#define PAL_STM32_PUDR_PULLDOWN (2U << 5U)
#define PAL_STM32_PUPDR_MASK (3U << 5U)
#define PAL_STM32_PUPDR_FLOATING (0U << 5U)
#define PAL_STM32_PUPDR_PULLUP (1U << 5U)
#define PAL_STM32_PUPDR_PULLDOWN (2U << 5U)
#define PAL_STM32_ALTERNATE_MASK (15U << 7U)
#define PAL_STM32_ALTERNATE(n) ((n) << 7U)
@ -110,13 +110,13 @@
* @brief Input pad with weak pull up resistor.
*/
#define PAL_MODE_INPUT_PULLUP (PAL_STM32_MODE_INPUT | \
PAL_STM32_PUDR_PULLUP)
PAL_STM32_PUPDR_PULLUP)
/**
* @brief Input pad with weak pull down resistor.
*/
#define PAL_MODE_INPUT_PULLDOWN (PAL_STM32_MODE_INPUT | \
PAL_STM32_PUDR_PULLDOWN)
PAL_STM32_PUPDR_PULLDOWN)
/**
* @brief Analog input mode.