Conversation
Readout of TUSS register unchanged@Neumi Could be a save of the register set be helpful, such in eeprom ? And then a load and write of specific sets ? |
|
@javerik I'd say no. i have something like this in mind: Pulse generation and echo sampling should stay external from the library to be more platform independence. Having a small set of code examples should be enough. The library should only do the settings management IMO. |
…er. Added a beginCustomSPI to set a custom spi callback when other SPI settings are used or different platform
|
Wrapper for all register and there // region specific register access
int setBPF_HPFFreq(uint8_t freq);
int setBPF_Bypass(bool value);
int setBPF_FCTrimFrc(bool value);
int setBPF_QSel(uint8_t qSel);
int setBPF_FCTrim(uint8_t fcTrim);
int setDEV_LogAmpFrc(bool value);
int setDEV_LogAmpSlopeAdj(uint8_t value);
int setDEV_LogAmpIntAdj(uint8_t value);
int setLogAmpDisableFirstStage(bool value);
int setLogAmpDisableLastStage(bool value);
int setVOUTScaling(bool value);
int setLNAGain(uint8_t gain);
int setDriverPulseFaultDeglitchTime(uint8_t time);
int setLowVoltageIOConfig(uint8_t config);
int setDisableVDRVRegulationInListenMode(bool value);
int setVDRVHighImpedance(bool value);
int setVDRVCurrentLevel(bool value);
int setVDRVVoltageLevel(uint8_t level);
int setEchoInterruptComparatorEnable(bool value);
int setEchoInterruptThreshold(uint8_t threshold);
int setZeroCrossComparatorEnable(bool value);
int setZeroCrossEnableEchoInterrupt(bool value);
int setZeroComparatorInputSelect(bool value);
int setZeroCrossComparatorStageSelect(uint8_t stage);
int setZeroCrossComparatorHysteresis(uint8_t hysteresis);
int setHalfBridgeMode(bool value);
int setPreDriverMode(bool value);
int setBurstPulseNumber(uint8_t pulseCount);
int setSleepModeEnable(bool value);
int setStandbyModeEnable(bool value);
int setVDRVTriggerControl(bool value);
int setCommandTriggerControl(bool value);
// endregionFurthermore there is now a function to pass a custom SPI callback into the wrapper, when other platforms than SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setClockDivider(SPI_CLOCK_DIV16);
SPI.setDataMode(SPI_MODE1); // CPOL=0, CPHA=1
// Configure GPIOs
pinMode(_default_cs, OUTPUT); |
|
Can a 40kHz square wave signal input from PIN9 drive the TUSS4470? |
Just to keep the development in sync with main repository.
Library is still under development.
Current state