Version 0.2
This commit is contained in:
parent
fd2cb56ef3
commit
490da9d724
|
@ -152,6 +152,15 @@ std::vector<std::string> B15F::getBoardInfo(void)
|
|||
return info;
|
||||
}
|
||||
|
||||
bool B15F::activateSelfTestMode()
|
||||
{
|
||||
usart.clearInputBuffer();
|
||||
usart.writeByte(RQ_ST);
|
||||
|
||||
uint8_t aw = usart.readByte();
|
||||
return aw == MSG_OK;
|
||||
}
|
||||
|
||||
bool B15F::digitalWrite0(uint8_t port)
|
||||
{
|
||||
usart.clearInputBuffer();
|
||||
|
|
|
@ -97,6 +97,13 @@ public:
|
|||
* Steuerbefehle für B15 *
|
||||
*************************/
|
||||
|
||||
/**
|
||||
* Versetzt das Board in den Selbsttest-Modus
|
||||
* WICHTIG: Es darf dabei nichts an den Klemmen angeschlossen sein!
|
||||
* \throws DriverException
|
||||
*/
|
||||
bool activateSelfTestMode(void);
|
||||
|
||||
/**
|
||||
* Setzt den Wert des digitalen Ausgabeports 0
|
||||
* \param port Wert für gesamten Port
|
||||
|
@ -192,6 +199,7 @@ private:
|
|||
constexpr static uint8_t RQ_TEST = 1;
|
||||
constexpr static uint8_t RQ_INFO = 2;
|
||||
constexpr static uint8_t RQ_INT = 3;
|
||||
constexpr static uint8_t RQ_ST = 4;
|
||||
constexpr static uint8_t RQ_BA0 = 5;
|
||||
constexpr static uint8_t RQ_BA1 = 6;
|
||||
constexpr static uint8_t RQ_BE0 = 7;
|
||||
|
|
Binary file not shown.
BIN
driver/main
BIN
driver/main
Binary file not shown.
|
@ -122,6 +122,8 @@ void kennlinieZweiterQuadrant()
|
|||
void testFunktionen()
|
||||
{
|
||||
B15F& drv = B15F::getInstance();
|
||||
drv.activateSelfTestMode();
|
||||
return;
|
||||
|
||||
std::cout << "DIP-Switch: " << (int) drv.readDipSwitch() << std::endl;
|
||||
|
||||
|
@ -157,8 +159,8 @@ void testFunktionen()
|
|||
int main()
|
||||
{
|
||||
testFunktionen();
|
||||
kennlinieZweiterQuadrant();
|
||||
kennlinieErsterQuadrant();
|
||||
//kennlinieZweiterQuadrant();
|
||||
//kennlinieErsterQuadrant();
|
||||
|
||||
std::cout << "Schluss." << std::endl;
|
||||
}
|
||||
|
|
BIN
driver/main.o
BIN
driver/main.o
Binary file not shown.
Loading…
Reference in a new issue