logs archiveBotHelp.net / Freenode / #43oh / 2015 / September / 1 / 8
sure np
are you going to continue posting there?
* the github
oh yeah one sec
let me upload that
heh guess I should parameterize the isr pointer-back
since begin currently does a isr_uscia0_uart_instance = this;
when you start to think through all the possibilities .. hmm ..
then you realize you have missed a bunch : )
yup :)
not bad for a day's worth of porting though
took superficially debugged traditional code and template-ified it
now future drivers will be templated from the start.. SPI/I2C
vitural is such a bad thing though
analogWrite will be that way I think, parameterized so that individual timer instances have their own class that can manage whether or not the timer should be shut down when the last one goes off, for instance
yeah I guess this is a final class
oh well I'll clean that up later :)
google CRTP .. curiously recurring template pattern
but that is for another day : )
oh boy
more brain twisting
can we "inherit" from multiple classes?
e.g. class Blah : public Bleh, Nope
yeah but that is why i often use a struct
so everything is public
less typing
and most of my classes have no data
just functions
so being public isn't a bad thing
but yes you can create a composition
or a inheritance
well I mean, can I create an abstract class for the isr_send_char, isr_get_char stuff that the usci_isr.cpp can reference .... but then have, say, UART_USCI inherit from AbstractSerial and this abstract isr-provider-function-only class
in java parlance, the isr-provider abstract class would be an interface
and by abstract class, I mean a simple class with virtual functions = 0 for those
right now I have a chain of inheritance from AbstractSerial to UART_USCI_EXTISR to UART_USCI
but, those isr callback functions would probably be appropriate for an SPI Slave class too
yet an SPI Slave class has no business inheriting from AbstractSerial...
it kind've appears that msp430-elf-g++ doesn't support multiple inheritance?
In file included from uart.cpp:2:0:
../UART_USCI.h:47:40: error: expected class-name before ',' token class UART_USCI : public AbstractSerial, public UART_Byte_Stream_Peripheral {
I had the class name wrong :P
it still seems to bomb with the same error
« prev 1 2 3 4 5 6 7 8 next »