Nov 12, 2013
10:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 12, 2013
10:32 AM
Real simple question, can you show me a working example of an IO004_ReadPin? For whatever reason, I always get a return of '1'.
- Tags:
- IFX
1 Reply
Not applicable
Nov 12, 2013
10:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 12, 2013
10:17 PM
RValascho wrote:
Real simple question, can you show me a working example of an IO004_ReadPin? For whatever reason, I always get a return of '1'.
#include//Declarations from DAVE3 Code Generation (includes SFR declaration)
int main(void)
{
// status_t status; // Declaration of return variable for DAVE3 APIs (toggle comment if required)
DAVE_Init(); // Initialization of DAVE Apps
while(1)
{
if (IO004_ReadPin(IO004_Handle2))
IO004_SetPin(IO004_Handle0);
else
IO004_ResetPin(IO004_Handle0);
if (IO004_ReadPin(IO004_Handle3))
IO004_SetPin(IO004_Handle1);
else
IO004_ResetPin(IO004_Handle1);
}
return 0;
}