示例#1
0
/* Configure channel ownership */
static void set_channel_ownership(unsigned int channel, unsigned int config)
{
    unsigned long bit = 1ul << channel;

    /* DSP side */
#if 0 /* Not using this */
    bitmod32(&SDMA_DSPOVR, (config & CH_OWNSHP_DSP) ? 0 : bit, bit);
#endif
    /* Event */
    bitmod32(&SDMA_EVTOVR, (config & CH_OWNSHP_EVT) ? 0 : bit, bit);
    /* MCU side */
    bitmod32(&SDMA_HOSTOVR, (config & CH_OWNSHP_MCU) ? 0 : bit, bit);
}
void pcm_dma_apply_settings(void)
{
    bitmod32(&CGU_AUDIO,
             (0<<24) |               /* I2SI_MCLK2PAD_EN = disabled */
             (0<<23) |               /* I2SI_MCLK_EN = disabled */
             (0<<14) |               /* I2SI_MCLK_DIV_SEL = unused */
             (0<<12) |               /* I2SI_MCLK_SEL = clk_main */
                                     /* I2SO_MCLK_EN = unchanged */
             (mclk_divider() << 2) | /* I2SO_MCLK_DIV_SEL */
             (AS3525_MCLK_SEL << 0), /* I2SO_MCLK_SEL */
             0x01fff7ff);
}
示例#3
0
/* Helper to update the power button status */
static void power_button_update(bool pressed)
{
    bitmod32(&ext_btn, pressed ? BUTTON_POWER : 0, BUTTON_POWER);
}