summaryrefslogtreecommitdiff
path: root/ucoo/hal/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'ucoo/hal/i2c')
-rw-r--r--ucoo/hal/i2c/Config2
-rw-r--r--ucoo/hal/i2c/Module2
-rw-r--r--ucoo/hal/i2c/i2c.host.cc10
-rw-r--r--ucoo/hal/i2c/i2c_hard.stm32.cc2
-rw-r--r--ucoo/hal/i2c/i2c_hard.stm32.hh4
-rw-r--r--ucoo/hal/i2c/test/Makefile2
6 files changed, 11 insertions, 11 deletions
diff --git a/ucoo/hal/i2c/Config b/ucoo/hal/i2c/Config
index 3871f5c..3bbcc3a 100644
--- a/ucoo/hal/i2c/Config
+++ b/ucoo/hal/i2c/Config
@@ -1,4 +1,4 @@
-[hal/i2c]
+[ucoo/hal/i2c]
# Size of slave buffer, used for both reception and transmission.
slave_buffer_size = 64
# Activate debug trace.
diff --git a/ucoo/hal/i2c/Module b/ucoo/hal/i2c/Module
index ae93f22..872be6f 100644
--- a/ucoo/hal/i2c/Module
+++ b/ucoo/hal/i2c/Module
@@ -1 +1 @@
-hal_i2c_SOURCES := i2c.host.cc i2c_slave_data_buffer.cc i2c_hard.stm32.cc
+ucoo_hal_i2c_SOURCES := i2c.host.cc i2c_slave_data_buffer.cc i2c_hard.stm32.cc
diff --git a/ucoo/hal/i2c/i2c.host.cc b/ucoo/hal/i2c/i2c.host.cc
index 4a2553b..6b3181b 100644
--- a/ucoo/hal/i2c/i2c.host.cc
+++ b/ucoo/hal/i2c/i2c.host.cc
@@ -23,7 +23,7 @@
// }}}
#include "i2c.host.hh"
-#include "config/hal/i2c.hh"
+#include "config/ucoo/hal/i2c.hh"
namespace ucoo {
@@ -77,7 +77,7 @@ I2cHostShared::send (uint8_t addr, const char *buf, int count)
{
if (addr == (*i)->slave_addr_)
{
- assert (count <= UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE);
+ assert (count <= CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE);
(*i)->slave_data_handler_->to_recv (buf, count);
return count;
}
@@ -99,7 +99,7 @@ I2cHostShared::recv (uint8_t addr, char *buf, int count)
{
if (addr == (*i)->slave_addr_)
{
- assert (count <= UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE);
+ assert (count <= CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE);
return (*i)->slave_data_handler_->to_send (buf, count);
}
}
@@ -125,7 +125,7 @@ I2cHostShared::handle_read (mex::Msg &msg)
{
if (addr == (*i)->slave_addr_)
{
- assert (size <= UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE);
+ assert (size <= CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE);
char buf[size];
int n = (*i)->slave_data_handler_->to_send (buf, size);
mex::Msg rsp (read_mtype_);
@@ -147,7 +147,7 @@ I2cHostShared::handle_write (mex::Msg &msg)
if (addr == (*i)->slave_addr_)
{
int size = msg.len ();
- assert (size <= UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE);
+ assert (size <= CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE);
(*i)->slave_data_handler_->to_recv (msg.pop (size), size);
break;
}
diff --git a/ucoo/hal/i2c/i2c_hard.stm32.cc b/ucoo/hal/i2c/i2c_hard.stm32.cc
index 9afe241..14a4486 100644
--- a/ucoo/hal/i2c/i2c_hard.stm32.cc
+++ b/ucoo/hal/i2c/i2c_hard.stm32.cc
@@ -32,7 +32,7 @@
namespace ucoo {
/// Local trace.
-static Trace<UCOO_CONFIG_HAL_I2C_TRACE> i2c_trace;
+static Trace<CONFIG_UCOO_HAL_I2C_TRACE> i2c_trace;
/// Information on I2C hardware structure.
struct i2c_hardware_t
diff --git a/ucoo/hal/i2c/i2c_hard.stm32.hh b/ucoo/hal/i2c/i2c_hard.stm32.hh
index 94e4259..98e4930 100644
--- a/ucoo/hal/i2c/i2c_hard.stm32.hh
+++ b/ucoo/hal/i2c/i2c_hard.stm32.hh
@@ -25,7 +25,7 @@
// }}}
#include "ucoo/intf/i2c.hh"
-#include "config/hal/i2c.hh"
+#include "config/ucoo/hal/i2c.hh"
namespace ucoo {
@@ -68,7 +68,7 @@ class I2cHard : public I2c
/// Handler called to source or sink data for slave exchanges.
DataHandler *slave_data_handler_;
/// Slave buffer.
- char slave_buf_[UCOO_CONFIG_HAL_I2C_SLAVE_BUFFER_SIZE];
+ char slave_buf_[CONFIG_UCOO_HAL_I2C_SLAVE_BUFFER_SIZE];
/// Current buffer count (bytes to send), or buffer size (available room).
int buf_count_;
/// Current buffer index (position to read byte to send or write received
diff --git a/ucoo/hal/i2c/test/Makefile b/ucoo/hal/i2c/test/Makefile
index 5046862..ca6915e 100644
--- a/ucoo/hal/i2c/test/Makefile
+++ b/ucoo/hal/i2c/test/Makefile
@@ -4,6 +4,6 @@ TARGETS = host stm32f4
PROGS = test_i2c
test_i2c_SOURCES = test_i2c.cc
-MODULES = hal/i2c utils base/test hal/usb
+MODULES = ucoo/hal/i2c ucoo/utils ucoo/base/test ucoo/hal/usb
include $(BASE)/build/top.mk