File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,28 @@ MagneticSensorSPIConfig_s AS5147_SPI = {
1111 .command_rw_bit = 14 ,
1212 .command_parity_bit = 15
1313};
14- // AS5048 and AS5047 are the same as AS5147
15- MagneticSensorSPIConfig_s AS5048_SPI = AS5147_SPI;
16- MagneticSensorSPIConfig_s AS5047_SPI = AS5147_SPI;
14+
15+ // AS5048 and AS5047 share the same configuration as AS5147
16+ // we have to explicilty assign them anyway due to compiler issues
17+ // Ex. https://community.simplefoc.com/t/esp32s3-qtpy-platformio-spi-problem/7444
18+ MagneticSensorSPIConfig_s AS5048_SPI = {
19+ .spi_mode = SPI_MODE1,
20+ .clock_speed = 1000000 ,
21+ .bit_resolution = 14 ,
22+ .angle_register = 0x3FFF ,
23+ .data_start_bit = 13 ,
24+ .command_rw_bit = 14 ,
25+ .command_parity_bit = 15
26+ };
27+ MagneticSensorSPIConfig_s AS5047_SPI = {
28+ .spi_mode = SPI_MODE1,
29+ .clock_speed = 1000000 ,
30+ .bit_resolution = 14 ,
31+ .angle_register = 0x3FFF ,
32+ .data_start_bit = 13 ,
33+ .command_rw_bit = 14 ,
34+ .command_parity_bit = 15
35+ };
1736
1837/* * Typical configuration for the 14bit MonolithicPower MA730 magnetic sensor over SPI interface */
1938MagneticSensorSPIConfig_s MA730_SPI = {
You can’t perform that action at this time.
0 commit comments