Skip to content

Commit

Permalink
squash! cpu/stm32_common: unify gpio driver
Browse files Browse the repository at this point in the history
Move PORT_x enum back to stm32xx periph_cpu.h file
  • Loading branch information
Vincent Dupont committed Mar 7, 2017
1 parent b1b1364 commit fdabad2
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 16 deletions.
17 changes: 1 addition & 16 deletions cpu/stm32_common/include/periph_cpu_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,22 +176,7 @@ typedef enum {
} gpio_flank_t;
/** @} */
#endif /* ndef DOXYGEN */

/**
* @brief Available ports on the STM32F2 family
*/
enum {
PORT_A = 0, /**< port A */
PORT_B = 1, /**< port B */
PORT_C = 2, /**< port C */
PORT_D = 3, /**< port D */
PORT_E = 4, /**< port E */
PORT_F = 5, /**< port F */
PORT_G = 6, /**< port G */
PORT_H = 7, /**< port H */
PORT_I = 8 /**< port I */
};
#endif
#endif /* ndef CPU_FAM_STM32F1 */

/**
* @brief Timer configuration
Expand Down
12 changes: 12 additions & 0 deletions cpu/stm32f0/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
extern "C" {
#endif

/**
* @brief Available ports on the STM32F0 family
*/
enum {
PORT_A = 0, /**< port A */
PORT_B = 1, /**< port B */
PORT_C = 2, /**< port C */
PORT_D = 3, /**< port D */
PORT_E = 4, /**< port E */
PORT_F = 5, /**< port F */
};

#ifndef DOXYGEN
/**
* @brief Override ADC resolution values
Expand Down
15 changes: 15 additions & 0 deletions cpu/stm32f2/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@
extern "C" {
#endif

/**
* @brief Available ports on the STM32F2 family
*/
enum {
PORT_A = 0, /**< port A */
PORT_B = 1, /**< port B */
PORT_C = 2, /**< port C */
PORT_D = 3, /**< port D */
PORT_E = 4, /**< port E */
PORT_F = 5, /**< port F */
PORT_G = 6, /**< port G */
PORT_H = 7, /**< port H */
PORT_I = 8 /**< port I */
};

/**
* @brief Available number of ADC devices
*/
Expand Down
14 changes: 14 additions & 0 deletions cpu/stm32f3/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@
extern "C" {
#endif

/**
* @brief Available ports on the STM32F3 family
*/
enum {
PORT_A = 0, /**< port A */
PORT_B = 1, /**< port B */
PORT_C = 2, /**< port C */
PORT_D = 3, /**< port D */
PORT_E = 4, /**< port E */
PORT_F = 5, /**< port F */
PORT_G = 6, /**< port G */
PORT_H = 7, /**< port H */
};

/**
* @brief DAC line configuration support
*/
Expand Down
15 changes: 15 additions & 0 deletions cpu/stm32f4/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@
extern "C" {
#endif

/**
* @brief Available ports on the STM32F4 family
*/
enum {
PORT_A = 0, /**< port A */
PORT_B = 1, /**< port B */
PORT_C = 2, /**< port C */
PORT_D = 3, /**< port D */
PORT_E = 4, /**< port E */
PORT_F = 5, /**< port F */
PORT_G = 6, /**< port G */
PORT_H = 7, /**< port H */
PORT_I = 8 /**< port I */
};

/**
* @brief Available number of ADC devices
*/
Expand Down
12 changes: 12 additions & 0 deletions cpu/stm32l0/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@
extern "C" {
#endif

/**
* @brief Available ports on the STM32L0 family
*/
enum {
PORT_A = 0, /**< port A */
PORT_B = 1, /**< port B */
PORT_C = 2, /**< port C */
PORT_D = 3, /**< port D */
PORT_E = 4, /**< port E */
PORT_H = 7, /**< port H */
};

#ifndef DOXYGEN
/**
* @brief Override ADC resolution values
Expand Down
14 changes: 14 additions & 0 deletions cpu/stm32l1/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
extern "C" {
#endif

/**
* @brief Available ports on the STM32L1 family
*/
enum {
PORT_A = 0, /**< port A */
PORT_B = 1, /**< port B */
PORT_C = 2, /**< port C */
PORT_D = 3, /**< port D */
PORT_E = 4, /**< port E */
PORT_F = 6, /**< port F */
PORT_G = 7, /**< port G */
PORT_H = 5, /**< port H */
};

/**
* @brief DAC line configuration data
*/
Expand Down

0 comments on commit fdabad2

Please sign in to comment.