BaseMachine OscController Library
Diff: SpiOscController.h
- Revision:
- 3:31a6b490986f
- Parent:
- 1:d3217569b33e
- Child:
- 4:7146756bcc4f
--- a/SpiOscController.h Mon Feb 13 16:02:37 2017 +0000 +++ b/SpiOscController.h Mon Feb 13 18:19:13 2017 +0000 @@ -22,17 +22,15 @@ pSpiM(_pSpim), DcoCS(_DcoCS, 1) {} - virtual void outDco(uint32_t frequency) + virtual void outDco() { - uint16_t frequency16 = frequency >> 16; - - #if(UART_TRACE) - printf("%d\t", frequency16); + #if(UART_TRACE) + OscController.outDco(); printf("%d\t", DCO_PACKET_HEADER); printf("%d\t", waveShape); printf("%d\t", pulseWidth); - printf("%d\t", frequency16 >> 8); - printf("%d\t", frequency16 & 0xff); + printf("%d\t", frequency10 >> 8); + printf("%d\t", frequency10 & 0xff); printf("\r\n"); #endif @@ -40,8 +38,8 @@ pSpiM->write(DCO_PACKET_HEADER); pSpiM->write(waveShape); pSpiM->write(pulseWidth); - pSpiM->write(frequency16 >> 8); - pSpiM->write(frequency16 & 0xff); + pSpiM->write(frequency10 >> 8); + pSpiM->write(frequency10 & 0xff); SPI_WAIT; DcoCS = 1; }