vedranMv / tm4c_mpu9250

MPU9250 library for TI's Tiva TM4C1294 with I2C/SPI and DMP
12 stars 1 forks source link

MPU9250 for tiva 123 #2

Open marcecurti opened 4 years ago

marcecurti commented 4 years ago

Hello, I need port your code for a tiva 123. I read your readme and found i have to modify HAL folder files but i don't know how, please help me

vedranMv commented 4 years ago

Hi, thank you for your question! The intended way to port the code would be as follows:

  1. Crate a folder in HAL/ (name it e.g. tm4c123)
  2. Copy everything from HAL/tm4c1294 to your new folder HAL/tm4c123
  3. Change macro guards in header files to include the name of the board you're using(e.g. instead of ROVERKERNEL_HAL_TM4C1294_HAL_COMMON_TM4CH use ROVERKERNEL_HAL_TM4C123_HAL_COMMON_TM4CH
  4. Change functions in .c files to implement support for TM4C123. Don't rename the functions, make sure they taker the same arguments as now, and return the same data
  5. Edit HAL/hal.h to include headers from your own subfolder #include "tm4c123/hal_common_tm4c.h" #include "tm4c123/hal_esp_tm4c.h"

Let me know if you have more questions.