BaseMachine UI Controllerに分離
Dependencies: AverageAnalogIn PinDetect RotaryEncoder Sequence SequencerDisplay mbed-rtos mbed st7567LCD BaseMachineComon
Fork of BaseMachine_Sequencer by
Diff: main.cpp
- Revision:
- 34:602ee5e771e3
- Parent:
- 33:a24a4c435973
- Child:
- 35:0165b610796d
--- a/main.cpp Wed Sep 07 16:27:17 2016 +0000 +++ b/main.cpp Thu Sep 08 00:10:03 2016 +0000 @@ -71,6 +71,8 @@ PinDetect PinAccent(PC_8, PullUp); PinDetect PinRunStop(PC_9, PullUp); +PwmOut LCDBackLight(PA_11); + // Grobal Variables // Sequence sequences[SEQUENCE_N]; @@ -182,10 +184,11 @@ filterController.setCutoff(AinCutOff.read_u16() >> 8); filterController.setResonance(AinResonance.read_u16() >> 8); - //envMod = AinEnvMod.read_u16() >> 8; + + // テスト用にバックライトの調整に使用 + LCDBackLight = AinEnvMod.read(); envelope.setLevel(AinLevel.read_u16() >> 4); - //envelope.setLevel(4095); envelope.setDuration(AinDuration.read() * envelopeLength); envelope.setDecay(AinDecay.read() * envelopeLength); envelope.setSustain(AinSustain.read() * 4095); @@ -388,6 +391,8 @@ // Mute output ampController.outDca(0); + LCDBackLight.period_ms(10); + LCDBackLight = 0.6f; gLCD.set_spi_frequency(SPI_RATE); gLCD.begin(0x12); gLCD.clear();