C Processor Flag in modules written in C
Timo Hartong (2813) 194 posts |
I’m currently attempting to write a module for accessing the mini UART of the rpi in C instead of assembler. However the SWI’s DeviceFS_ReceivedCharacter and DeviceFS_TransmitCharacter use the C-flag to indicate a status. If I call an SWI with the C function _kernel_swi() or _swi(), will these functions preserve the value of the C-flag ?. |
Rick Murray (539) 13405 posts |
|
Timo Hartong (2813) 194 posts |
Sometimes google is your best friend and sometimes kernel.h indeed. Thank you for your short but most usefull answere |
Rick Murray (539) 13405 posts |
You’re welcome. I know of it myself thanks to… one of the OS_Bytes to read the keyboard… does the same thing, returns status in the Carry flag. |
Timo Hartong (2813) 194 posts |
Unfortenately I didn’t use it yet. I’m still figuring out how to register the device with the device driver but I made progress today I was able to register it with DeviceFS and it gave nicely the name Serial2 if I give cat devices:. I was exited my first module in C which actually did something. ;-) |