aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/AVR/pal_lld.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/AVR/pal_lld.h')
-rw-r--r--os/hal/platforms/AVR/pal_lld.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/os/hal/platforms/AVR/pal_lld.h b/os/hal/platforms/AVR/pal_lld.h
index a2d1f8714..fe64029d0 100644
--- a/os/hal/platforms/AVR/pal_lld.h
+++ b/os/hal/platforms/AVR/pal_lld.h
@@ -43,24 +43,30 @@
/*===========================================================================*/
/**
- * @brief Width, in bits, of an I/O port.
+ * @brief Width, in bits, of an I/O port.
*/
#define PAL_IOPORTS_WIDTH 8
/**
- * @brief Whole port mask.
- * @brief This macro specifies all the valid bits into a port.
+ * @brief Whole port mask.
+ * @details This macro specifies all the valid bits into a port.
*/
#define PAL_WHOLE_PORT ((ioportmask_t)0xFF)
/**
- * @brief AVR setup registers.
+ * @brief AVR setup registers.
*/
typedef struct {
uint8_t out;
uint8_t dir;
} avr_gpio_setup_t;
+/**
+ * @brief AVR registers block.
+ * @note On some devices registers do not follow this layout on some
+ * ports, the ports with abnormal layout cannot be used through
+ * the PAL driver. Example: PORT F on Mega128.
+ */
typedef struct {
volatile uint8_t in;
volatile uint8_t dir;
@@ -90,6 +96,12 @@ typedef struct {
#if defined(PORTE) || defined(__DOXYGEN__)
avr_gpio_setup_t porte;
#endif
+#if defined(PORTF) || defined(__DOXYGEN__)
+ avr_gpio_setup_t portf;
+#endif
+#if defined(PORTG) || defined(__DOXYGEN__)
+ avr_gpio_setup_t portg;
+#endif
} PALConfig;
/**
@@ -149,6 +161,20 @@ typedef avr_gpio_registers_t *ioportid_t;
#define IOPORT5 ((volatile avr_gpio_registers_t *)&PINE)
#endif
+#if defined(PORTF) || defined(__DOXYGEN__)
+/**
+ * @brief GPIO port F identifier.
+ */
+#define IOPORT6 ((volatile avr_gpio_registers_t *)&PINF)
+#endif
+
+#if defined(PORTG) || defined(__DOXYGEN__)
+/**
+ * @brief GPIO port G identifier.
+ */
+#define IOPORT7 ((volatile avr_gpio_registers_t *)&PING)
+#endif
+
/*===========================================================================*/
/* Implementation, some of the following macros could be implemented as */
/* functions, if so please put them in pal_lld.c. */