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.
HubsanTx.cpp
00001 #include "mbed.h" 00002 #include "HubsanTx.h" 00003 00004 HubsanTx::HubsanTx (PinName mosi, PinName miso, PinName clk, PinName cs, uint32_t freqHz) 00005 : A7105(mosi, miso, clk, cs, freqHz) { 00006 } 00007 00008 int8_t HubsanTx::init() { 00009 uint8_t if_calibration1; 00010 uint8_t vco_calibration0; 00011 uint8_t vco_calibration1; 00012 00013 reset(); 00014 setId(0x55201041); 00015 writeRegister(A7105_0B_GPIO1_PIN_I, 0x19); 00016 writeRegister(A7105_01_MODE_CONTROL, 0x63); 00017 writeRegister(A7105_03_FIFOI, 0x0f); 00018 writeRegister(A7105_0D_CLOCK, 0x05); 00019 writeRegister(A7105_0E_DATA_RATE, 0x04); 00020 writeRegister(A7105_15_TX_II, 0x2b); 00021 writeRegister(A7105_18_RX, 0x62); 00022 writeRegister(A7105_19_RX_GAIN_I, 0x80); 00023 writeRegister(A7105_1C_RX_GAIN_IV, 0x0A); 00024 writeRegister(A7105_1F_CODE_I, 0x07); 00025 writeRegister(A7105_20_CODE_II, 0x17); 00026 writeRegister(A7105_29_RX_DEM_TEST_I, 0x47); 00027 00028 strobe(A7105_STANDBY); 00029 00030 return 1; 00031 }
Generated on Sun Jul 17 2022 01:39:15 by
1.7.2