Page 102 - The Art of Designing Embedded Systems
P. 102

Firmware Musings  89










               1 bl
               1M

              Xdtl
              xdh,  set port  UxfR34-0x80
              xdh, set port  OxfO43-Ox30
             $xdb> set port  Oxf043-0x42
             ,xdb> set port Oxf043-0x82
              xdb) set part Oxf040-55
             ,xdb) set  prt Oxf040-55
              xdb> sat part  Oxf834-0
             'xdb> -


        FIGURE 5-1  Hacking a peripheral driver.



            Then write a shell of  a driver in the selected language. Take the in-
        formation gleaned from the databook and proven in your experiments to
        work, and codify it in code once and for all. Test the driver. Get it right!
            Now you've  successfully created a module that handles that hard-
        ware device.
            Master one portion of a device at a time. On a UART, for example,
        figure out how  to transmit characters reliably  and document what  you
























        FIGURE 5-2  Hacking a peripheral driver.
        FIGURE  5-2   Hacking  a  peripheral  driver.
   97   98   99   100   101   102   103   104   105   106   107