Midnight Sun Firmware
Loading...
Searching...
No Matches
imu_hw_defs.h
1#pragma once
2
3/************************************************************************************************
4 * @file imu_hw_defs.h
5 *
6 * @brief Header file for imu hardware definitions
7 *
8 * @date 2025-03-06
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11
12/* Standard library Headers */
13
14/* Inter-component Headers */
15
16/* Intra-component Headers */
17
24/************************************************************************************************
25 * IMU CAN definitions
26 ************************************************************************************************/
27
29#define IMU_CAN_RX \
30 { .port = GPIO_PORT_B, .pin = 8 }
31
33#define IMU_CAN_TX \
34 { .port = GPIO_PORT_B, .pin = 9 }
35
36/************************************************************************************************
37 * IMU SPI definitions
38 ************************************************************************************************/
39
40#define IMU_SPI_PORT SPI_PORT_2
41
42#define IMU_SPI_SDO \
43 { .port = GPIO_PORT_B, .pin = 15 }
44
45#define IMU_SPI_SDI \
46 { .port = GPIO_PORT_B, .pin = 14 }
47
48#define IMU_SPI_NSS \
49 { .port = GPIO_PORT_B, .pin = 12 }
50
51#define IMU_SPI_SCLK \
52 { .port = GPIO_PORT_B, .pin = 13 }
53
54#define IMU_SPI_INT1 \
55 { .port = GPIO_PORT_B, .pin = 0 }
56
57#define IMU_SPI_INT2 \
58 { .port = GPIO_PORT_B, .pin = 1 }
59
60#define IMU_SPI_BAUDRATE SPI_BAUDRATE_5MHZ
61
62#define IMU_SPI_MODE SPI_MODE_3
63
64#define IMU_SPI_PORT SPI_PORT_2
65