diff options
Diffstat (limited to 'os/hal/ports/KINETIS/KL2x/pal_lld.h')
-rw-r--r-- | os/hal/ports/KINETIS/KL2x/pal_lld.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/os/hal/ports/KINETIS/KL2x/pal_lld.h b/os/hal/ports/KINETIS/KL2x/pal_lld.h index e08d77dfb..8b38709a5 100644 --- a/os/hal/ports/KINETIS/KL2x/pal_lld.h +++ b/os/hal/ports/KINETIS/KL2x/pal_lld.h @@ -147,7 +147,8 @@ typedef struct *
* @notapi
*/
-#define pal_lld_readlatch(port) 0
+#define pal_lld_readlatch(port) \
+ (port)->PDOR
/**
* @brief Writes a bits mask on a I/O port.
@@ -157,7 +158,8 @@ typedef struct *
* @notapi
*/
-#define pal_lld_writeport(port, bits)
+#define pal_lld_writeport(port, bits) \
+ (port)->PDOR = (bits)
/**
* @brief Sets a bits mask on a I/O port.
@@ -170,7 +172,8 @@ typedef struct *
* @notapi
*/
-#define pal_lld_setport(port, bits)
+#define pal_lld_setport(port, bits) \
+ (port)->PSOR = (bits)
/**
* @brief Clears a bits mask on a I/O port.
@@ -183,7 +186,8 @@ typedef struct *
* @notapi
*/
-#define pal_lld_clearport(port, bits)
+#define pal_lld_clearport(port, bits) \
+ (port)->PCOR = (bits)
/**
* @brief Toggles a bits mask on a I/O port.
@@ -196,7 +200,8 @@ typedef struct *
* @notapi
*/
-#define pal_lld_toggleport(port, bits)
+#define pal_lld_toggleport(port, bits) \
+ (port)->PTOR = (bits)
/**
* @brief Reads a group of bits.
@@ -256,7 +261,7 @@ typedef struct *
* @notapi
*/
-#define pal_lld_setpad(port, pad) (port)->PSOR |= ((uint32_t) 1 << (pad))
+#define pal_lld_setpad(port, pad) (port)->PSOR = ((uint32_t) 1 << (pad))
/**
* @brief Clears a pad logical state to @p PAL_LOW.
@@ -269,7 +274,7 @@ typedef struct *
* @notapi
*/
-#define pal_lld_clearpad(port, pad) (port)->PCOR |= ((uint32_t) 1 << (pad))
+#define pal_lld_clearpad(port, pad) (port)->PCOR = ((uint32_t) 1 << (pad))
/**
* @brief Toggles a pad logical state.
@@ -282,7 +287,7 @@ typedef struct *
* @notapi
*/
-#define pal_lld_togglepad(port, pad) (port)->PTOR |= ((uint32_t) 1 << (pad))
+#define pal_lld_togglepad(port, pad) (port)->PTOR = ((uint32_t) 1 << (pad))
/**
* @brief Pad mode setup.
|