Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
KT0915 Class Reference
#include <KT0915.h>
Public Member Functions | |
| KT0915 (PinName sda, PinName scl) | |
| Create a KT0915 instance connected to specified I2C pins. | |
| void | init (void) |
| Initialize KT0915. | |
| int | getID (void) |
| read KT0915_WHO_AM_I | |
| void | set_vol (int vol) |
| set volume | |
| void | set_freq (bool mode, int freq) |
| set frequency and tune | |
| void | set_xtal (int xtal) |
| set xtal frequency | |
| int | get_rssi (bool mode) |
| read RSSI (dB) | |
| void | set_space (bool mode, int space) |
| set channel space | |
| int | get_snr (bool mode) |
| read SNR (dB) | |
| bool | get_ready (void) |
| read Chip Ready Indicator | |
| void | cali (void) |
| re-cali | |
Detailed Description
Library for KT0915.
Definition at line 10 of file KT0915.h.
Constructor & Destructor Documentation
| KT0915 | ( | PinName | sda, |
| PinName | scl | ||
| ) |
Create a KT0915 instance connected to specified I2C pins.
- Parameters:
-
sda I2C-bus SDA pin scl I2C-bus SCL pin
Definition at line 4 of file KT0915.cpp.
Member Function Documentation
| void cali | ( | void | ) |
re-cali
Definition at line 135 of file KT0915.cpp.
| bool get_ready | ( | void | ) |
read Chip Ready Indicator
0...Chip is not ready.
1...Chip is ready.
Definition at line 129 of file KT0915.cpp.
| int get_rssi | ( | bool | mode ) |
| int get_snr | ( | bool | mode ) |
| int getID | ( | void | ) |
| void init | ( | void | ) |
Initialize KT0915.
Set paramaters below
0x02:0b0000000000000111 FM space:100KHz, R/L mute:disable
0x04:0b1110000010010000 FM/AM/device mute:disable, bass:disable DAC cap:60uF
0x05:0b1001100000100000 Mono:enable, de-emphasis:50uF, blend:disable
0x0A:0b0000010000000000 LDO:highest, FM AFC:enable
0x0C:0b0000000000101100 FM wide freq:enable
0x0F:0b1000100000000000 Stanby:disable, volume:0
0x16:0b0000000011000010 Mode:FM, use internal defined band, Audio gain:0dB, AM AFC:enable
0x22:0b1010001011101100 AM AGC fast win:fastest, AM AGC short win:slowest
AM bandwidth:6KHz, AM gain:12dB, Left Inverse Control:enable
0x23:0bxxx111xxxxxxxxxx low th:B
0x2E:0b0010100010001100 softmute:fast, AM softmute start level:0b100
softmute target volume:0b0100, softmute mode:RSSI, FM softmute start threshold:0b100
0x33:0b0101010000000001 AM space:9KHz
0x3F:0bxxxxxxxxx001x011 RF AGC patch
Definition at line 10 of file KT0915.cpp.
| void set_freq | ( | bool | mode, |
| int | freq | ||
| ) |
set frequency and tune
AM...mode=1, freq=frequency (KHz)
FM...mode=0, freq=100*frequency (MHz)
Definition at line 86 of file KT0915.cpp.
| void set_space | ( | bool | mode, |
| int | space | ||
| ) |
set channel space
AM...mode=0, space=1,9,10 (KHz)
If space=1, bandwidth sets 2KHz.
If space=9 or 10, bandwidth sets 6KHz.
FM...mode=1, space=50,100,200 (KHz)
Definition at line 51 of file KT0915.cpp.
| void set_vol | ( | int | vol ) |
| void set_xtal | ( | int | xtal ) |
set xtal frequency
xtal=32,38,12000,24000 (KHz)
If your xtal is 32.768Khz,set to 32.
Definition at line 37 of file KT0915.cpp.
Generated on Thu Jul 14 2022 08:00:47 by
1.7.2