- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi every one !!!
Can anyone tell me what does it means sw_Read() in AN60024 ?
Here is piece of code.
/* Init switch variables */
uint8 switches[2] = {0, 0}; /* [0] = current, [1] = previous */
switches[0] = switches[1] = SW_Read(); /* 0 = pressed, 1 = not pressed */
I believe is a kind of fuction that get the state of pin wher the switch is conected, is that correct.?
Thank you very much
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SW is a pin component (just look at the schematics). So you need to look into the pin component data sheet. There you will find the _read() method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much hli, I got lost with "SW" name on the pin name, it si very trival !!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Naming the pin components for their purpose is good practice, though it can be confusing sometimes...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can always use a functional name combined with physical name
and get an easily understood pin name.
Like "OpAmpout_P0_0_MyDACout."
Regards, Dana.