X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=bertos%2Fhw%2Fhw_tas5706a.h;h=4f2848e0ea2f9c5fc664b6d254b69606c20fbd67;hb=e4a9947b5436beaeb91eacd98cdb762aa040b04f;hp=e67a14050902ebfc521798a04d7d387d2ec7385a;hpb=e23c0ef94dcdb5392f27d338d4ba20b1227b2c17;p=bertos.git diff --git a/bertos/hw/hw_tas5706a.h b/bertos/hw/hw_tas5706a.h index e67a1405..4f2848e0 100644 --- a/bertos/hw/hw_tas5706a.h +++ b/bertos/hw/hw_tas5706a.h @@ -40,29 +40,25 @@ #ifndef HW_TAS5706A_H #define HW_TAS5706A_H -#include #include -#define TAS5706A_SETPOWERDOWN(val) do { if (val) PIOA_CODR = BV(6); else PIOA_SODR = BV(6); } while (0) -#define TAS5706A_SETRESET(val) do { if (val) PIOA_CODR = BV(7); else PIOA_SODR = BV(7); } while (0) -#define TAS5706A_SETMUTE(val) do { if (val) PIOA_CODR = BV(8); else PIOA_SODR = BV(8); } while (0) +#warning FIXME: This is an example implementation, you must implement it + +#define TAS5706A_SETPOWERDOWN(val) do { /* implement me */ } while (0) +#define TAS5706A_SETRESET(val) do { /* implement me */ } while (0) +#define TAS5706A_SETMUTE(val) do { /* implement me */ } while (0) #define TAS5706A_PIN_INIT() \ do { \ TAS5706A_SETPOWERDOWN(true); \ TAS5706A_SETRESET(true); \ TAS5706A_SETMUTE(true); \ - PIOA_PER = BV(6) | BV(7) | BV(8); \ - PIOA_OER = BV(6) | BV(7) | BV(8); \ + /* complete me */ \ } while (0) #define TAS5706A_MCLK_INIT() \ do { \ - PIOA_PDR = BV(2); /* enable PWM pin */ \ - PWM_CMR2 = 0; /* set prescaler to MCK, left aligned, start with low level */ \ - PWM_CPRD2 = 4; /* 11.2896 MHz MCLK */ \ - PWM_CDTY2 = 2; /* 50% duty */ \ - PWM_ENA = BV(2); /* Enable PWM on MCLK pin */ \ + /* implement me */ \ } while(0)