diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-05-14 09:23:32 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-05-14 09:23:32 +0000 |
commit | d6e56d6e7fee513c7436816a7abaaf6a6c3fb007 (patch) | |
tree | fb84ecc90539bd5c4f128e51669cf9e6423f7248 /os/hal/platforms/STM8 | |
parent | f0f02c897c2f5042cdd54896bb876a1d7dec1970 (diff) | |
download | ChibiOS-d6e56d6e7fee513c7436816a7abaaf6a6c3fb007.tar.gz ChibiOS-d6e56d6e7fee513c7436816a7abaaf6a6c3fb007.tar.bz2 ChibiOS-d6e56d6e7fee513c7436816a7abaaf6a6c3fb007.zip |
Fixed bug 3001528.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1920 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM8')
-rw-r--r-- | os/hal/platforms/STM8/hal_lld.c | 2 | ||||
-rw-r--r-- | os/hal/platforms/STM8/pal_lld.h | 24 |
2 files changed, 19 insertions, 7 deletions
diff --git a/os/hal/platforms/STM8/hal_lld.c b/os/hal/platforms/STM8/hal_lld.c index 7a2d1bc1f..b0d3883d6 100644 --- a/os/hal/platforms/STM8/hal_lld.c +++ b/os/hal/platforms/STM8/hal_lld.c @@ -40,7 +40,7 @@ * @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
*/
-ROMCONST STM8GPIOConfig pal_default_config =
+ROMCONST PALConfig pal_default_config =
{
{
{VAL_GPIOAODR, 0, VAL_GPIOADDR, VAL_GPIOACR1, VAL_GPIOACR2},
diff --git a/os/hal/platforms/STM8/pal_lld.h b/os/hal/platforms/STM8/pal_lld.h index 65ddeedea..0545986d9 100644 --- a/os/hal/platforms/STM8/pal_lld.h +++ b/os/hal/platforms/STM8/pal_lld.h @@ -34,6 +34,18 @@ /* Unsupported modes and specific modes */
/*===========================================================================*/
+#undef PAL_MODE_INPUT_PULLDOWN
+
+/**
+ * @brief STM8 specific alternate push-pull slow output mode.
+ */
+#define PAL_MODE_OUTPUT_PUSHPULL_SLOW 16
+
+/**
+ * @brief STM8 specific alternate open-drain slow output mode.
+ */
+#define PAL_MODE_OUTPUT_OPENDRAIN_SLOW 17
+
/*===========================================================================*/
/* I/O Ports Types and constants. */
/*===========================================================================*/
@@ -58,23 +70,23 @@ typedef struct { */
typedef struct {
gpio_t P[9];
-} STM8GPIOConfig;
+} PALConfig;
/**
* @brief Width, in bits, of an I/O port.
*/
-#define PAL_IOPORTS_WIDTH 32
+#define PAL_IOPORTS_WIDTH 8
/**
* @brief Whole port mask.
* @brief This macro specifies all the valid bits into a port.
*/
-#define PAL_WHOLE_PORT ((ioportmask_t)0xFFFFFFFF)
+#define PAL_WHOLE_PORT ((ioportmask_t)0xFF)
/**
* @brief Digital I/O port sized unsigned type.
*/
-typedef uint32_t ioportmask_t;
+typedef uint8_t ioportmask_t;
/**
* @brief Port Identifier.
@@ -88,7 +100,7 @@ typedef gpio_t *ioportid_t; /**
* @brief GPIO ports as a whole.
*/
-#define IOPORTS ((STM8GPIOConfig *)0x5000)
+#define IOPORTS ((PALConfig *)0x5000)
/**
* @brief GPIO port A identifier.
@@ -194,7 +206,7 @@ typedef gpio_t *ioportid_t; */
#define pal_lld_setgroupmode(port, mask, mode) ((void)(mode))
-extern ROMCONST STM8GPIOConfig pal_default_config;
+extern ROMCONST PALConfig pal_default_config;
#endif /* CH_HAL_USE_PAL */
|