aboutsummaryrefslogtreecommitdiff
path: root/lib/pbdrv/drv/arduino/mod.cpp
diff options
context:
space:
mode:
authorElwin Hammer <elwinhammer@gmail.com>2024-06-22 22:32:30 +0200
committerGitHub <noreply@github.com>2024-06-22 22:32:30 +0200
commita9eb2013e6b7297cfce4116179f4ab2d58d1c8d6 (patch)
tree0f16b75795d9926c5ea4a8ef52a695365837a8e4 /lib/pbdrv/drv/arduino/mod.cpp
parentf121de7c7e3ca8f0dc526973a5ee2586485aad22 (diff)
parentd6440954806d381dae5b3df65b43192f897018c6 (diff)
Merge pull request #21 from lonkaars/master
Updating branch
Diffstat (limited to 'lib/pbdrv/drv/arduino/mod.cpp')
-rw-r--r--lib/pbdrv/drv/arduino/mod.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/pbdrv/drv/arduino/mod.cpp b/lib/pbdrv/drv/arduino/mod.cpp
index 9130334..2eef8d5 100644
--- a/lib/pbdrv/drv/arduino/mod.cpp
+++ b/lib/pbdrv/drv/arduino/mod.cpp
@@ -42,6 +42,7 @@ static void pb_setup() {
Wire.onReceive(recv_event);
}
+/// \ingroup pb_drv_arduino
__weak void pb_i2c_send(i2c_addr_t addr, const uint8_t * buf, size_t sz) {
Wire.beginTransmission((int) addr);
Wire.write(buf, sz);
@@ -64,7 +65,16 @@ void loop_task() {
}
}
-//! Application entrypoint
+/**
+ * \ingroup pb_drv_arduino
+ * \brief Application entrypoint
+ *
+ * \note I should really be able to use Arduino's initVariant function for
+ * this, but I can't seem to get it to link properly using the CMake setup in
+ * this repository. Overriding the main() function seems to work, and the
+ * USBCON thing in the default Arduino main() function isn't needed because
+ * puzzle modules are likely not using USB.
+ */
int main(void) {
init(); // call arduino internal setup
setup(); // call regular arduino setup
@@ -74,11 +84,3 @@ int main(void) {
return 0;
}
-/**
- * \note I should really be able to use Arduino's initVariant function for
- * this, but I can't seem to get it to link properly using the CMake setup in
- * this repository. Overriding the main() function seems to work, and the
- * USBCON thing in the default Arduino main() function isn't needed because
- * puzzle modules are likely not using USB.
- */
-