Jump to content
banality

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?

69e8cbeecd3e291e37835da04034bfe.png.b69395cac653db69267116a6101bf135.png

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

a6580163ecf9b3e9d047f468c874d1d.png.22c04d08031524a61e27a906907e743a.png

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.

4cd4c3153e9579c6b6d1cc76eb05c1c.png.23d922e9a5d2f6d1a9604cd558f53e73.png7084ca1521b86ab65061b3a4c05d694.png.694da48346c4201ea0c4272f48000d6c.png

 

f5b2927c37e8248ddff9f970ddab9a8.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...