Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement for CC2640R2 #3

Open
mel0nparty opened this issue Jul 31, 2020 · 1 comment
Open

Implement for CC2640R2 #3

mel0nparty opened this issue Jul 31, 2020 · 1 comment

Comments

@mel0nparty
Copy link

Hi I was wondering if this project can be implemented on a cc2640R2 launchpad. I tried to make the changes as advised to the HAL folder but I am unsure on how to port my specific board pin layout to the project.

I'm very new to CCS and am trying to use an IMU for a final year project but can only find this resource that relates to its use.

Thanks in advance!

@vedranMv
Copy link
Owner

vedranMv commented Aug 2, 2020

Hi, it is possible, sure, but I don't have that board to try it on my own.

The idea of HAL layer is to provide your own implementation of the functions seen in hal/tm4c1294 folder. So you'd start by duplicating the tm4c1294 folder then renaming one of the copies to e.g. cc2640r2. Then, inside this new folder, you'd open every .c file, and change content of the functions so that is works on your board. Make sure you don't change any function parameters, logic, nor return values.

For example, in hal/cc2640r2/hal_mpu_spi_tm4c.c you find the function HAL_MPU_WriteBytes. That function must take exactly 3 arguments, in exactly the same order. You then change body of the function so that its functionality remains the same: write data in the arguments into a provided register, when done return 0. You would then repeat the same process for all remaining functions in the .c files.

I hope that helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants