summaryrefslogtreecommitdiff
path: root/ucoo/dev
diff options
context:
space:
mode:
authorNicolas Schodet2015-05-15 12:05:06 +0200
committerNicolas Schodet2019-10-07 00:44:50 +0200
commit41fde87ed8d1fcd593777bdfae2fa9e65006d984 (patch)
tree48a82b5ba790741d1f0bcc97eb183ea4b045d7b0 /ucoo/dev
parent751a7d2ba7a0fbb9c6dae2d91891f0cc74897a2a (diff)
build: add support for out of tree modules
Diffstat (limited to 'ucoo/dev')
-rw-r--r--ucoo/dev/avrisp/Config2
-rw-r--r--ucoo/dev/avrisp/Module2
-rw-r--r--ucoo/dev/avrisp/avrisp_frame.cc2
-rw-r--r--ucoo/dev/avrisp/avrisp_frame.hh4
-rw-r--r--ucoo/dev/avrisp/avrisp_proto.cc20
-rw-r--r--ucoo/dev/avrisp/test/Makefile3
-rw-r--r--ucoo/dev/lcd/Module2
-rw-r--r--ucoo/dev/lcd/test/Makefile2
-rw-r--r--ucoo/dev/usdist/Module2
-rw-r--r--ucoo/dev/xmodem/Module2
10 files changed, 21 insertions, 20 deletions
diff --git a/ucoo/dev/avrisp/Config b/ucoo/dev/avrisp/Config
index cf3eb48..8233b8e 100644
--- a/ucoo/dev/avrisp/Config
+++ b/ucoo/dev/avrisp/Config
@@ -1,4 +1,4 @@
-[dev/avrisp]
+[ucoo/dev/avrisp]
frame_buffer_size = 281
proto_signature = "APBisp_2"
proto_build_number = 0x0100
diff --git a/ucoo/dev/avrisp/Module b/ucoo/dev/avrisp/Module
index d66f06f..cbec793 100644
--- a/ucoo/dev/avrisp/Module
+++ b/ucoo/dev/avrisp/Module
@@ -1 +1 @@
-dev_avrisp_SOURCES := avrisp.cc avrisp_proto.cc avrisp_frame.cc
+ucoo_dev_avrisp_SOURCES := avrisp.cc avrisp_proto.cc avrisp_frame.cc
diff --git a/ucoo/dev/avrisp/avrisp_frame.cc b/ucoo/dev/avrisp/avrisp_frame.cc
index 4cc8c98..768eaf2 100644
--- a/ucoo/dev/avrisp/avrisp_frame.cc
+++ b/ucoo/dev/avrisp/avrisp_frame.cc
@@ -101,7 +101,7 @@ AvrIspFrame::accept_char (uint8_t c)
len_ |= c;
buffer_len_ = 0;
if (len_ == 0
- || len_ > (UCOO_CONFIG_DEV_AVRISP_FRAME_BUFFER_SIZE - proto_head_
+ || len_ > (CONFIG_UCOO_DEV_AVRISP_FRAME_BUFFER_SIZE - proto_head_
- proto_tail_))
state_ = AVRISP_FRAME_STATE_START;
else
diff --git a/ucoo/dev/avrisp/avrisp_frame.hh b/ucoo/dev/avrisp/avrisp_frame.hh
index 5631122..fb32546 100644
--- a/ucoo/dev/avrisp/avrisp_frame.hh
+++ b/ucoo/dev/avrisp/avrisp_frame.hh
@@ -27,7 +27,7 @@
#include "ucoo/intf/stream.hh"
-#include "config/dev/avrisp.hh"
+#include "config/ucoo/dev/avrisp.hh"
namespace ucoo {
@@ -79,7 +79,7 @@ class AvrIspFrame
/// Checksum current value.
uint8_t cksum_;
/// Buffer to store frame until validated.
- uint8_t buffer_[UCOO_CONFIG_DEV_AVRISP_FRAME_BUFFER_SIZE];
+ uint8_t buffer_[CONFIG_UCOO_DEV_AVRISP_FRAME_BUFFER_SIZE];
/// Used buffer length.
int buffer_len_;
/// Index to first byte to send from buffer, or -1 if not sending.
diff --git a/ucoo/dev/avrisp/avrisp_proto.cc b/ucoo/dev/avrisp/avrisp_proto.cc
index bdf0457..c08dfa2 100644
--- a/ucoo/dev/avrisp/avrisp_proto.cc
+++ b/ucoo/dev/avrisp/avrisp_proto.cc
@@ -25,7 +25,7 @@
#include "ucoo/utils/bytes.hh"
-#include "config/dev/avrisp.hh"
+#include "config/ucoo/dev/avrisp.hh"
#include <cstring>
#include <algorithm>
@@ -121,10 +121,10 @@ AvrIspProto::accept (uint8_t *data, int len)
case AVRISP_PROTO_CMD_SIGN_ON:
if (len != 1) break;
data[1] = AVRISP_PROTO_STATUS_CMD_OK;
- data[2] = sizeof (UCOO_CONFIG_DEV_AVRISP_PROTO_SIGNATURE);
- memcpy (&data[3], UCOO_CONFIG_DEV_AVRISP_PROTO_SIGNATURE,
- sizeof (UCOO_CONFIG_DEV_AVRISP_PROTO_SIGNATURE));
- return 3 + sizeof (UCOO_CONFIG_DEV_AVRISP_PROTO_SIGNATURE);
+ data[2] = sizeof (CONFIG_UCOO_DEV_AVRISP_PROTO_SIGNATURE);
+ memcpy (&data[3], CONFIG_UCOO_DEV_AVRISP_PROTO_SIGNATURE,
+ sizeof (CONFIG_UCOO_DEV_AVRISP_PROTO_SIGNATURE));
+ return 3 + sizeof (CONFIG_UCOO_DEV_AVRISP_PROTO_SIGNATURE);
case AVRISP_PROTO_CMD_SET_PARAMETER:
if (len != 3) break;
status = AVRISP_PROTO_STATUS_CMD_OK;
@@ -155,19 +155,19 @@ AvrIspProto::accept (uint8_t *data, int len)
data[2] = 1;
break;
case AVRISP_PROTO_PARAM_BUILD_NUMBER_LOW:
- data[2] = bytes_unpack (UCOO_CONFIG_DEV_AVRISP_PROTO_BUILD_NUMBER, 0);
+ data[2] = bytes_unpack (CONFIG_UCOO_DEV_AVRISP_PROTO_BUILD_NUMBER, 0);
break;
case AVRISP_PROTO_PARAM_BUILD_NUMBER_HIGH:
- data[2] = bytes_unpack (UCOO_CONFIG_DEV_AVRISP_PROTO_BUILD_NUMBER, 1);
+ data[2] = bytes_unpack (CONFIG_UCOO_DEV_AVRISP_PROTO_BUILD_NUMBER, 1);
break;
case AVRISP_PROTO_PARAM_HW_VER:
- data[2] = UCOO_CONFIG_DEV_AVRISP_PROTO_HW_VERSION;
+ data[2] = CONFIG_UCOO_DEV_AVRISP_PROTO_HW_VERSION;
break;
case AVRISP_PROTO_PARAM_SW_MAJOR:
- data[2] = bytes_unpack (UCOO_CONFIG_DEV_AVRISP_PROTO_SW_VERSION, 1);
+ data[2] = bytes_unpack (CONFIG_UCOO_DEV_AVRISP_PROTO_SW_VERSION, 1);
break;
case AVRISP_PROTO_PARAM_SW_MINOR:
- data[2] = bytes_unpack (UCOO_CONFIG_DEV_AVRISP_PROTO_SW_VERSION, 0);
+ data[2] = bytes_unpack (CONFIG_UCOO_DEV_AVRISP_PROTO_SW_VERSION, 0);
break;
default:
status = AVRISP_PROTO_STATUS_CMD_FAILED;
diff --git a/ucoo/dev/avrisp/test/Makefile b/ucoo/dev/avrisp/test/Makefile
index 80a8334..8419827 100644
--- a/ucoo/dev/avrisp/test/Makefile
+++ b/ucoo/dev/avrisp/test/Makefile
@@ -4,6 +4,7 @@ TARGETS = stm32f4
PROGS = test_avrisp
test_avrisp_SOURCES = test_avrisp.cc
-MODULES = dev/avrisp hal/spi hal/gpio base/test hal/usb utils
+MODULES = ucoo/dev/avrisp ucoo/hal/spi ucoo/hal/gpio ucoo/base/test \
+ ucoo/hal/usb ucoo/utils
include $(BASE)/build/top.mk
diff --git a/ucoo/dev/lcd/Module b/ucoo/dev/lcd/Module
index 1934cc8..651bf85 100644
--- a/ucoo/dev/lcd/Module
+++ b/ucoo/dev/lcd/Module
@@ -1 +1 @@
-dev_lcd_SOURCES := lcd_spi.cc
+ucoo_dev_lcd_SOURCES := lcd_spi.cc
diff --git a/ucoo/dev/lcd/test/Makefile b/ucoo/dev/lcd/test/Makefile
index f8bef65..d11d882 100644
--- a/ucoo/dev/lcd/test/Makefile
+++ b/ucoo/dev/lcd/test/Makefile
@@ -4,6 +4,6 @@ TARGETS = stm32f1
PROGS = test_lcd
test_lcd_SOURCES = test_lcd.cc
-MODULES = intf utils hal/gpio hal/spi dev/lcd
+MODULES = ucoo/intf ucoo/utils ucoo/hal/gpio ucoo/hal/spi ucoo/dev/lcd
include $(BASE)/build/top.mk
diff --git a/ucoo/dev/usdist/Module b/ucoo/dev/usdist/Module
index bedbac4..f5c9a3d 100644
--- a/ucoo/dev/usdist/Module
+++ b/ucoo/dev/usdist/Module
@@ -1 +1 @@
-dev_usdist_SOURCES = usdist.cc
+ucoo_dev_usdist_SOURCES = usdist.cc
diff --git a/ucoo/dev/xmodem/Module b/ucoo/dev/xmodem/Module
index 37bc5eb..56c525e 100644
--- a/ucoo/dev/xmodem/Module
+++ b/ucoo/dev/xmodem/Module
@@ -1 +1 @@
-dev_xmodem_SOURCES = xmodem.cc
+ucoo_dev_xmodem_SOURCES = xmodem.cc