Develop my own Driver

2022-07-07
2022-08-04
  • huunghiaubot - 2022-07-07

    Hi all,
    I want to write my own SPI driver on CODESYS to interface with my STM32 custom board. I spend some time reading example libraries ( Adafruit_PWM, MCP23S17 ....), Here is my doubts.
    1. What is _iState? "_iState := 10;, _iState := 1000;", Where are the numbers "10,1000" come from? What do they mean?, How many states does CODESYS support?
    2. When will AfterReadInputs and BeforeWriteOuputs be called? Do they call in sequence?
    3. What happen if I use more than 1 driver on the same SPI driver? Which driver will be called first?
    4. What are the essential configs I need to do in Initialize Method?
    5. Is there any official document talking clearly about writing a lib on CODESYS?

     

    Last edit: huunghiaubot 2022-07-07

Log in to post a comment.