You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
968 B
68 lines
968 B
#include <iostream>
|
|
#include <stdint.h>
|
|
|
|
#include "./driver/device.hpp"
|
|
#include "./utils/BitField.hpp"
|
|
|
|
#ifdef SIMPLE_TEST
|
|
|
|
int main(void)
|
|
{
|
|
std::cout << "test" << std::endl;
|
|
|
|
BitField<uint8_t, 1, 2> bitfield_0;
|
|
BitField<uint8_t, 5, 2> bitfield_1;
|
|
|
|
|
|
std::cout << "testing bitfield 0" << std::endl;
|
|
|
|
for(uint8_t i = 0; i < 10; i++) {
|
|
|
|
bitfield_0 = i;
|
|
std::cout << static_cast<uint32_t>(bitfield_0()) << std::endl;
|
|
}
|
|
|
|
std::cout << "testing bitfield 1" << std::endl;
|
|
|
|
for(uint8_t i = 0; i < 10; i++) {
|
|
|
|
bitfield_1 = i;
|
|
std::cout << static_cast<uint32_t>(bitfield_1()) << std::endl;
|
|
}
|
|
|
|
Device dev();
|
|
|
|
return 0;
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
class da
|
|
{
|
|
public:
|
|
da();
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
da::da()
|
|
{
|
|
std::cout << "da::da()" << std::endl;
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
std::cout << "test" << std::endl;
|
|
|
|
da dada;
|
|
Device dev;
|
|
|
|
dev.doSomething();
|
|
|
|
//dev.doSomething();
|
|
|
|
return 0;
|
|
}
|