summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/hpamp.c
blob: 10a95fa82d213daec3cdafbdbee97f05b9829487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdlib.h>
#include <stdint.h>

#include "eos.h"

#include "soc/spi.h"
#include "spi.h"

#include "drv/pcm1770.h"
#include "hpamp.h"

int eos_hpamp_init(void) {
    int rv;

    rv = eos_spi_select(EOS_SPI_DEV_HPAMP);
    if (rv) return rv;

    pcm1770_reg_write(0x03, 0x01);
    eos_spi_deselect();

    return EOS_OK;
}