im Moment fehlerhafte WDT Konfig
This commit is contained in:
parent
adfa389abe
commit
7eb9573229
10 changed files with 273 additions and 124 deletions
55
requests.cpp
55
requests.cpp
|
@ -16,3 +16,58 @@ void rqTestIntConv()
|
|||
{
|
||||
usart.writeInt(usart.readInt() * 3);
|
||||
}
|
||||
|
||||
void rqDigitalWrite0()
|
||||
{
|
||||
uint8_t port = usart.readByte();
|
||||
beba0.writePortA(port);
|
||||
|
||||
if(ACK_MODE)
|
||||
usart.writeByte(USART::MSG_OK);
|
||||
}
|
||||
|
||||
void rqDigitalWrite1()
|
||||
{
|
||||
uint8_t port = usart.readByte();
|
||||
beba1.writePortA(port);
|
||||
|
||||
if(ACK_MODE)
|
||||
usart.writeByte(USART::MSG_OK);
|
||||
}
|
||||
|
||||
void rqDigitalRead0()
|
||||
{
|
||||
uint8_t port = beba0.readPortB();
|
||||
usart.writeByte(port);
|
||||
}
|
||||
|
||||
void rqDigitalRead1()
|
||||
{
|
||||
uint8_t port = beba1.readPortB();
|
||||
usart.writeByte(port);
|
||||
}
|
||||
|
||||
void rqAnalogWrite0()
|
||||
{
|
||||
uint16_t value = usart.readInt();
|
||||
dac0.setValue(value);
|
||||
|
||||
if(ACK_MODE)
|
||||
usart.writeByte(USART::MSG_OK);
|
||||
}
|
||||
|
||||
void rqAnalogWrite1()
|
||||
{
|
||||
uint16_t value = usart.readInt();
|
||||
dac1.setValue(value);
|
||||
|
||||
if(ACK_MODE)
|
||||
usart.writeByte(USART::MSG_OK);
|
||||
}
|
||||
|
||||
void rqAnalogRead()
|
||||
{
|
||||
uint8_t channel = usart.readByte();
|
||||
uint16_t value = adu.getValue(channel);
|
||||
usart.writeInt(value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue