Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pu2clr committed Jul 13, 2024
1 parent 1d1de18 commit d17cb45
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
Binary file modified Doc/QN8066_01.pdf
Binary file not shown.
14 changes: 14 additions & 0 deletions examples/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This script uses the arduino-cli to compile the arduino sketches using command line (without Arduino IDE).
# It is very useful to check the library on multiple board types after bug fixes and improvements.
# It runs on a MacOS but you can port it to Linux o Windows easily.
# Some compilation results (bin and hex files) will be stores in your Download directory (/Users/<username>/Downloads/hex)
# ATTENTION: be careful with --output-dir arduino-cli option. Before compiling, this option removes all the contents of the last level folder.
# For example: if you use "--output-dir ~/Downloads", all the current content of the Downloads folder will be lost.
# if you use "--output-dir ~/Downloads/hex", all current content of the hex folder will be lost and the Downloads
# content will be preserved.
# Ricardo Lima Caratti Mar 2024

echo "Arduino ATmega328 based board"

arduino-cli compile -b arduino:avr:nano ./examples/01_SERIAL_MONITOR/B_TX --output-dir ~/Downloads/hex/atmega/B_TX

26 changes: 26 additions & 0 deletions src/QN8066.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,29 @@ void QN8066::setTxToggleRDSReady() {
system2.arg.rdsrdy = !system2.arg.rdsrdy;
this->setRegister(QN_SYSTEM2, system2.raw);
}

/**
* @ingroup group04 TX RDS
* @brief RDS TX Updated
* @details To transmit the 8 bytes in RDS0~RDS7, user should toggle the register bit RDSRDY (See SYSTEM2 register).
* @details Then the chip internally fetches these bytes after completing transmitting of current group.
* @details Once the chip internally fetched these bytes, it will toggle this bit, and user can write in another group.
* @return true
* @return false
*/
bool QN8066::getTxRDSUpdated() {
return this->getStatus3().arg.RDS_TXUPD;
}

/**
* @ingroup group04 TX RDS
* @brief Writes the RDS data bytes to be sent (SEE TX_RDSD0 to TX_RDSD7 registers)
* @details The data written into RDSD0~RDSD7 cannot be sent out if user didn’t toggle RDSTXRDY to allow the data loaded into internal transmitting buffer.
* @param text (point to array of char with 8 bytes to be loaded into the RDS data buffer)
*/
void QN8066::writeTxRDSBuffer(char *text) {
for (uint8_t address = QN_TX_RDSD0; address <= QN_TX_RDSD7; address++ ) {
this->setRegister(address, *text++);
}
}

4 changes: 3 additions & 1 deletion src/QN8066.h
Original file line number Diff line number Diff line change
Expand Up @@ -842,9 +842,11 @@ class QN8066 {

inline void setTxFrequency(float frequency) { setTxChannel(frequency); };

// RDS
// RDS TX
void setTxRDS(bool value);
void setTxToggleRDSReady();
bool getTxRDSUpdated();
void writeTxRDSBuffer(char *text);

};

Expand Down

0 comments on commit d17cb45

Please sign in to comment.