Refactored CMakeLists.txt

* new pip_module() macro
 * fixed exports
 * automatic gather all exports and pass them to Doxygen and PICodeParser
This commit is contained in:
2020-08-01 21:29:32 +03:00
parent 21111b3e67
commit c7ac4fa551
79 changed files with 389 additions and 531 deletions

View File

@@ -34,7 +34,7 @@ public:
explicit PIUSB(ushort vid = 0, ushort pid = 0);
~PIUSB() {closeDevice();}
struct Endpoint {
struct PIP_EXPORT Endpoint {
Endpoint(uchar a = 0, uchar at = 0, ushort mps = 0) {address = a; attributes = at; max_packet_size = mps; parse();}
enum Direction {Write = 0, Read = 1};
@@ -54,7 +54,7 @@ public:
UsageType usage_type;
};
struct Interface {
struct PIP_EXPORT Interface {
Interface() {index = value_to_select = class_code = subclass_code = protocol_code = 0;}
uchar index;
uchar value_to_select;
@@ -64,7 +64,7 @@ public:
PIVector<PIUSB::Endpoint> endpoints;
};
struct Configuration {
struct PIP_EXPORT Configuration {
Configuration() {index = value_to_select = attributes = max_power = 0; self_powered = remote_wakeup = false;}
uchar index;
uchar value_to_select;
@@ -75,7 +75,7 @@ public:
PIVector<PIUSB::Interface> interfaces;
};
struct Descriptor {
struct PIP_EXPORT Descriptor {
Descriptor() {usb_spec_number = 0; device_class = device_subclass = device_protocol = max_packet_size = 0; id_vendor = id_product = id_device_release = 0; index_manufacturer = index_product = index_serial = 0;}
ushort usb_spec_number;
uchar device_class;
@@ -148,6 +148,6 @@ protected:
};
PICout operator <<(PICout s, const PIUSB::Endpoint & v);
PIP_EXPORT PICout operator <<(PICout s, const PIUSB::Endpoint & v);
#endif // PIUSB_H