On 10/09/2013 08:22 PM, Michael Smith wrote: > > No, that's still awful. Nobody wants to care which register they're fiddling > with, they just want the peripheral on / off. > > peripheral.clock_enable = true; > > would be better if you're going to do the C++ thing. > > periperhal_clock_enable(<peripheral identifier>,<clock state>) > > if you want to stick to C (note verb-subject re-ordering to maintain > widest-to-narrowest ordering in the function name).
big like here, this would be ideal to my mind. There was/is a proposed pull request that does this. It hides the bus the peripheral is connected to though, which I'm not entirely sure is better or worse, but it means you only use a single parameter for the periph. It looks generally good though. Cheers, Karl P ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ libopencm3-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
