eive-obsw/bsp_linux_board/definitions.h

44 lines
1.0 KiB
C
Raw Normal View History

2022-03-30 17:44:07 +02:00
#ifndef BSP_LINUX_BOARD_DEFINITIONS_H_
#define BSP_LINUX_BOARD_DEFINITIONS_H_
#include <cstdint>
2022-03-30 17:50:36 +02:00
#include "OBSWConfig.h"
2022-03-30 17:44:07 +02:00
#ifdef RASPBERRY_PI
2022-03-30 17:50:13 +02:00
namespace spi {
static constexpr char DEV[] = "/dev/spidev0.1";
}
2022-05-26 12:04:27 +02:00
namespace uart {
static constexpr char DEV[] = "/dev/serial0";
}
2022-03-30 17:44:07 +02:00
/* Adapt these values accordingly */
namespace gpio {
static constexpr uint8_t MGM_0_BCM_PIN = 17;
static constexpr uint8_t MGM_1_BCM_PIN = 27;
static constexpr uint8_t MGM_2_BCM_PIN = 22;
static constexpr uint8_t MGM_3_BCM_PIN = 23;
static constexpr uint8_t GYRO_0_BCM_PIN = 5;
static constexpr uint8_t GYRO_1_BCM_PIN = 6;
static constexpr uint8_t GYRO_2_BCM_PIN = 13;
static constexpr uint8_t GYRO_3_BCM_PIN = 19;
static constexpr uint8_t SPI_MUX_0_BCM = 17;
static constexpr uint8_t SPI_MUX_1_BCM = 27;
static constexpr uint8_t SPI_MUX_2_BCM = 22;
static constexpr uint8_t SPI_MUX_3_BCM = 23;
static constexpr uint8_t SPI_MUX_4_BCM = 5;
static constexpr uint8_t SPI_MUX_5_BCM = 6;
2022-03-30 17:50:36 +02:00
} // namespace gpio
2022-03-30 17:44:07 +02:00
#endif
#endif /* BSP_LINUX_BOARD_DEFINITIONS_H_ */