Eli Bendersky

Encapsulating modules in spite of PE

Discussion created by Eli Bendersky on Dec 5, 2007
Latest reply on Dec 9, 2007 by bigmac
While the Processor Expert allows to conveniently initialize and use peripherals, I have a problem with its coding convention. PE doesn't exactly encourage code modularity and encapsulation. For example, suppose that I want to write a higher-level serial communication module that knows how to send and receive blocks of data. To send more than one byte I have to use interrupts, but those appear in Events.c in PE's generated code. This means I have to break my module into two, one part being in Events.c, which at least recognizes the module and directs output to it.
How is this handled ? Can someone provide tips on writing large scale, modular software, with PE at its base ?
Thanks in avance