aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-24 20:26:32 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-24 21:30:36 +0100
commit06925990d5ec2b10c64b83ab93087b942d8127b1 (patch)
tree9d14b8d0ee948c5ad636998e5c217d355e8b877d
parenta5db02da0a46db94b9744843c467894883f152b8 (diff)
downloadglutte-o-matic-06925990d5ec2b10c64b83ab93087b942d8127b1.tar.gz
glutte-o-matic-06925990d5ec2b10c64b83ab93087b942d8127b1.tar.bz2
glutte-o-matic-06925990d5ec2b10c64b83ab93087b942d8127b1.zip
Use GPIO functions in audio driver
-rw-r--r--src/fsm/audio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fsm/audio.c b/src/fsm/audio.c
index c1303b1..257ef2f 100644
--- a/src/fsm/audio.c
+++ b/src/fsm/audio.c
@@ -67,11 +67,11 @@ void InitializeAudio(int plln, int pllr, int i2sdiv, int i2sodd) {
GPIO_PinAFConfig(GPIOA, GPIO_PinSource4, GPIO_AF_SPI3);
// Reset the codec.
- GPIOD ->BSRRH = 1 << 4;
+ GPIO_ResetBits(GPIOD, GPIO_Pin_4);
for (volatile int i = 0; i < 0x4fff; i++) {
__asm__ volatile("nop");
}
- GPIOD ->BSRRL = 1 << 4;
+ GPIO_SetBits(GPIOD, GPIO_Pin_4);
// Configure codec.
WriteRegister(0x02, 0x01); // Keep codec powered off.