logs archiveBotHelp.net / Freenode / #43oh / 2015 / September / 1 / 8
Rickta59
sure np
are you going to continue posting there?
* the github
Spirilis
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;
Rickta59
when you start to think through all the possibilities .. hmm ..
then you realize you have missed a bunch : )
Spirilis
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
Rickta59
vitural is such a bad thing though
Spirilis
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
Rickta59
virtual
Spirilis
yeah I guess this is a final class
oh well I'll clean that up later :)
Rickta59
google CRTP .. curiously recurring template pattern
but that is for another day : )
Spirilis
oh boy
lol
more brain twisting
can we "inherit" from multiple classes?
e.g. class Blah : public Bleh, Nope
Rickta59
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
Spirilis
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...
huh
ok
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 {
oh
goddamnit
I had the class name wrong :P
however
it still seems to bomb with the same error
« prev 1 2 3 4 5 6 7 8 next »