Setting a bit | Cypress Semiconductor
Setting a bit
I wanted software control over a bit (just goes to the LED, on the CY8CKIT-001). I see in the .c file for the pin/port a "write" command ("LED_Write(uint8 value)"--I called the pin "LED", as all I wanted to do was to flip the LED off and on). However, if I try to build with just a pin in the TopDesign.cysch, I get errors. So I put on a ControlRegister, and put the pin onto that.
I sorta get this, sorta don't: if I do a build, and get the errors, I see the command to write to the pin, which makes me think I should be able to do a direct write. Then again, I can see why I would need to go through a control register--it would represent a physical location for the code to access, a layer or firewall if you will. Or am I missing something--can I write directly to the pin, w/o the ControlRegister?