Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed FastIO FastPWM USBDevice
Diff: IRRemote/IRPwmOut.h
- Revision:
- 100:1ff35c07217c
- Parent:
- 77:0b96f6867312
--- a/IRRemote/IRPwmOut.h Sat Mar 02 21:05:43 2019 +0000
+++ b/IRRemote/IRPwmOut.h Thu Nov 28 23:18:23 2019 +0000
@@ -1,3 +1,7 @@
+// This class is not currently used - it's been replaced by IRTransmitter
+// and NewPwm.
+#if 0
+
// IRPwmOut - KL25Z ONLY
//
// This is a lightweight reimplementation of PwmOut for KL25Z only.
@@ -70,8 +74,7 @@
// default to 1ms period
period_us(1000.0f);
- printf("IRPwmOut, SC=%08lx, CnSC=%08lx\r\n",
- tpm->SC, tpm->CONTROLS[ch_n].CnSC);
+ //printf("IRPwmOut, SC=%08lx, CnSC=%08lx\r\n", tpm->SC, tpm->CONTROLS[ch_n].CnSC);
// wire the pinout
pinmap_pinout(pin, PinMap_PWM);
@@ -120,12 +123,11 @@
void period_us(float us)
{
- if (tpm->SC == (TPM_SC_CMOD(1) | TPM_SC_PS(0))
- && tpm->CONTROLS[ch_n].CnSC == (TPM_CnSC_MSB_MASK | TPM_CnSC_ELSB_MASK))
- printf("period_us ok\r\n");
- else
- printf("period_us regs changed??? %08lx, %08lx\r\n",
- tpm->SC, tpm->CONTROLS[ch_n].CnSC);
+ // if (tpm->SC == (TPM_SC_CMOD(1) | TPM_SC_PS(0))
+ // && tpm->CONTROLS[ch_n].CnSC == (TPM_CnSC_MSB_MASK | TPM_CnSC_ELSB_MASK))
+ // printf("period_us ok\r\n");
+ // else
+ // printf("period_us regs changed??? %08lx, %08lx\r\n", tpm->SC, tpm->CONTROLS[ch_n].CnSC);
float dc = read();
tpm->MOD = (uint32_t)(pwm_clock * (float)us) - 1;
@@ -142,3 +144,5 @@
};
#endif
+
+#endif /* 0 */