Jump to content

Low level implementation about CC3200

Recommended Posts

When I learned a CC3200 example about push buttons, I got some questions.

Firstly, why does the digital_pin_to_pin_num[] arrary not define its elements as PIN_01, PIN_02, .... in an ascendant order?


Why not define following PIN_04 as 0x0...04 ?


The first question results in my next question. I know the following PUSH1 variable is used as the index of digital_pin_to_pin_num[] arrary.ec48b94a9bdd3d35a3de78303163272.png.fe6f82880b55f25baaf8dffe3089726c.png3e8dada0b1f8dbc7f3e09d58be65c39.png.915c98f87b6feaabff440852b0001c15.png

Why doesn't assign 4 to PUSH1 corresponding to the physical pin number of GPIO_13, so that I can be easy to know the PUSH1 is used to control which button rather than looking up the digital_pin_to_pin_num[] arrary using index, which is so time-consuming.




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now