|
29 | 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | 30 | #pragma once |
31 | 31 |
|
| 32 | +#include <stdint.h> |
| 33 | + |
32 | 34 | namespace andino { |
33 | 35 |
|
34 | 36 | /// @brief Hardware configuration. |
35 | 37 | struct Hw { |
36 | 38 | /// @brief Left encoder channel A pin. Connected to PD2 (digital pin 2). |
37 | | - static constexpr int kLeftEncoderChannelAGpioPin{2}; |
| 39 | + static constexpr uint8_t kLeftEncoderChannelAGpioPin{2}; |
38 | 40 | /// @brief Left encoder channel B pin. Connected to PD3 (digital pin 3). |
39 | | - static constexpr int kLeftEncoderChannelBGpioPin{3}; |
| 41 | + static constexpr uint8_t kLeftEncoderChannelBGpioPin{3}; |
40 | 42 |
|
41 | 43 | /// @brief Right encoder channel A pin. Connected to PC2 (digital pin 16, analog pin A2). |
42 | | - static constexpr int kRightEncoderChannelAGpioPin{16}; |
| 44 | + static constexpr uint8_t kRightEncoderChannelAGpioPin{16}; |
43 | 45 | /// @brief Right encoder channel B pin. Connected to PC3 (digital pin 17, analog pin A3). |
44 | | - static constexpr int kRightEncoderChannelBGpioPin{17}; |
| 46 | + static constexpr uint8_t kRightEncoderChannelBGpioPin{17}; |
45 | 47 |
|
46 | 48 | /// @brief Left motor driver backward pin. Connected to PD6 (digital pin 6). |
47 | | - static constexpr int kLeftMotorBackwardGpioPin{6}; |
| 49 | + static constexpr uint8_t kLeftMotorBackwardGpioPin{6}; |
48 | 50 | /// @brief Left motor driver forward pin. Connected to PB2 (digital pin 10). |
49 | | - static constexpr int kLeftMotorForwardGpioPin{10}; |
| 51 | + static constexpr uint8_t kLeftMotorForwardGpioPin{10}; |
50 | 52 | /// @brief Left motor driver enable pin. Connected to PB5 (digital pin 13). |
51 | 53 | /// @note The enable input of the L298N motor driver may be directly jumped to 5V if the board has |
52 | 54 | /// a jumper to do so. |
53 | | - static constexpr int kLeftMotorEnableGpioPin{13}; |
| 55 | + static constexpr uint8_t kLeftMotorEnableGpioPin{13}; |
54 | 56 |
|
55 | 57 | /// @brief Right motor driver backward pin. Connected to PD5 (digital pin 5). |
56 | | - static constexpr int kRightMotorBackwardGpioPin{5}; |
| 58 | + static constexpr uint8_t kRightMotorBackwardGpioPin{5}; |
57 | 59 | /// @brief Right motor driver forward pin. Connected to PB1 (digital pin 9). |
58 | | - static constexpr int kRightMotorForwardGpioPin{9}; |
| 60 | + static constexpr uint8_t kRightMotorForwardGpioPin{9}; |
59 | 61 | /// @brief Right motor driver enable pin. Connected to PB4 (digital pin 12). |
60 | 62 | /// @note The enable input of the L298N motor driver may be directly jumped to 5V if the board has |
61 | 63 | /// a jumper to do so. |
62 | | - static constexpr int kRightMotorEnableGpioPin{12}; |
| 64 | + static constexpr uint8_t kRightMotorEnableGpioPin{12}; |
63 | 65 |
|
64 | 66 | /// @brief IMU sensor I2C SCL pin. Connected to PC5 (digital pin 19, analog pin A5). |
65 | | - static constexpr int kImuI2cSclPin{19}; |
| 67 | + static constexpr uint8_t kImuI2cSclPin{19}; |
66 | 68 | /// @brief IMU sensor I2C SDA pin. Connected to PC4 (digital pin 18, analog pin A4). |
67 | | - static constexpr int kImuI2cSdaPin{18}; |
| 69 | + static constexpr uint8_t kImuI2cSdaPin{18}; |
68 | 70 | }; |
69 | 71 |
|
70 | 72 | } // namespace andino |
0 commit comments