This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HTML5 Form Validation</title> | |
</head> | |
<body> | |
<form action='teste.asp'> | |
Telefone: | |
<input | |
type="text" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<configuration scan="true" scanPeriod="3 seconds"> | |
<jmxConfigurator /> | |
<statusListener class= | |
"ch.qos.logback.core.status.OnConsoleStatusListener"/> | |
<appender name="STDOUT" | |
class="ch.qos.logback.core.ConsoleAppender"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TEA5767N { | |
private: | |
//... | |
byte transmission_data[5]; | |
byte reception_data[5]; | |
//... | |
public: | |
//... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEA5767N::TEA5767N() { | |
Wire.begin(); | |
initializeTransmissionData(); | |
} | |
void TEA5767N::initializeTransmissionData() { | |
transmission_data[FIRST_DATA] = 0; | |
transmission_data[SECOND_DATA] = 0; | |
transmission_data[THIRD_DATA] = 0xB0; | |
transmission_data[FOURTH_DATA] = 0x10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void TEA5767N::mute() { | |
setSoundOff(); | |
transmitData(); | |
} | |
void TEA5767N::setSoundOff() { | |
transmission_data[FIRST_DATA] |= 0b10000000; | |
} | |
void TEA5767N::transmitData() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void TEA5767N::setSoundOn() { | |
transmission_data[FIRST_DATA] &= 0b01111111; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void TEA5767N::loadFrequency() { | |
readStatus(); | |
transmission_data[FIRST_DATA] = (transmission_data[FIRST_DATA] & 0xC0) | (reception_data[FIRST_DATA] & 0x3F); | |
transmission_data[SECOND_DATA] = reception_data[SECOND_DATA]; | |
} | |
void TEA5767N::readStatus() { | |
Wire.requestFrom (TEA5767_I2C_ADDRESS, 5); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void TEA5767N::selectFrequency(float frequency) { | |
calculateOptimalHiLoInjection(frequency); | |
transmitFrequency(frequency); | |
} | |
void TEA5767N::calculateOptimalHiLoInjection(float freq) { | |
byte signalHigh; | |
byte signalLow; | |
setHighSideLOInjection(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void TEA5767N::transmitFrequency(float frequency) { | |
setFrequency(frequency); | |
transmitData(); | |
} | |
void TEA5767N::setFrequency(float _frequency) { | |
frequency = _frequency; | |
unsigned int frequencyW; | |
if (hiInjection) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define LOW_STOP_LEVEL 1 | |
#define MID_STOP_LEVEL 2 | |
#define HIGH_STOP_LEVEL 3 |
OlderNewer