Skip to content

Commit

Permalink
added FM functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
teknoid committed Dec 13, 2016
1 parent f462690 commit 858d74e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@
*.su

dabpi_ctl
/Debug/
6 changes: 3 additions & 3 deletions si46xx_fm.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void si46xx_fm_tune_freq(uint32_t khz, uint16_t antcap) {
data[4] = antcap & 0xFF;
data[5] = (antcap >> 8) & 0xFF;
data[6] = 0;
spi(data, 6);
spi(data, 7);

while (timeout--) {
data[0] = 0;
Expand Down Expand Up @@ -185,15 +185,15 @@ void si46xx_fm_rds_blockcount(void) {
}

void si46xx_fm_seek_start(uint8_t up, uint8_t wrap) {
uint8_t data[5];
uint8_t data[6];

data[0] = SI46XX_FM_SEEK_START;
data[1] = 0;
data[2] = (up & 0x01) << 1 | (wrap & 0x01);
data[3] = 0;
data[4] = 0;
data[5] = 0;
spi(data, 5);
spi(data, 6);

si46xx_reply("FM_SEEK_START");
}
Expand Down

0 comments on commit 858d74e

Please sign in to comment.