Skip to content

Commit 06ec377

Browse files
committed
[driver] Small fixes for replacing Protothreads with Fibers
1 parent 5f9cb9b commit 06ec377

26 files changed

+34
-60
lines changed

src/modm/driver/adc/ads101x.lb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ The ADS1013/ADS1014/ADS1015 are ultra-low power, high precision analog-digital c
2121
def prepare(module, options):
2222
module.depends(
2323
":architecture:i2c.device",
24-
":architecture:register",
25-
":processing:protothread")
24+
":architecture:register")
2625
return True
2726

2827
def build(env):

src/modm/driver/adc/ads7828_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace modm
2121
{
2222

2323
template <typename I2cMaster>
24-
Ads7828<I2cMaster>::Ads7828(Data &data, uint8_t address) : data(data), modm::I2cDevice<I2cMaster, 1>(address)
24+
Ads7828<I2cMaster>::Ads7828(Data &data, uint8_t address) : modm::I2cDevice<I2cMaster, 1>(address), data(data)
2525
{
2626
}
2727

@@ -60,4 +60,4 @@ Ads7828<I2cMaster>::readConversionResult()
6060
RF_END_RETURN_CALL(this->runTransaction());
6161
}
6262

63-
} // modm namespace
63+
} // modm namespace

src/modm/driver/display/hd44780.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Hd44780 : public CharacterDisplay
7777
* cg must be uint8_t[8].
7878
*/
7979
void
80-
writeCGRAM(uint8_t character, uint8_t *cg);
80+
writeCGRAM(uint8_t character, const uint8_t *cg);
8181

8282
};
8383

src/modm/driver/display/hd44780_base.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class Hd44780Base
126126
isBusy();
127127

128128
static inline bool
129-
writeCGRAM(uint8_t character, uint8_t *cg);
129+
writeCGRAM(uint8_t character, const uint8_t *cg);
130130

131131
protected:
132132
/// unconditionally write data to the controller

src/modm/driver/display/hd44780_base_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ modm::Hd44780Base<DATA, RW, RS, E>::isBusy()
172172

173173
template <typename DATA, typename RW, typename RS, typename E>
174174
bool
175-
modm::Hd44780Base<DATA, RW, RS, E>::writeCGRAM(uint8_t character, uint8_t *cg)
175+
modm::Hd44780Base<DATA, RW, RS, E>::writeCGRAM(uint8_t character, const uint8_t *cg)
176176
{
177177
while(not writeCommand(SetCGRAM_Address | (character << 3)))
178178
;

src/modm/driver/display/hd44780_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ modm::Hd44780<DATA, RW, RS, E>::execute(Command command)
6464

6565
template <typename DATA, typename RW, typename RS, typename E>
6666
void
67-
modm::Hd44780<DATA, RW, RS, E>::writeCGRAM(uint8_t character, uint8_t *cg)
67+
modm::Hd44780<DATA, RW, RS, E>::writeCGRAM(uint8_t character, const uint8_t *cg)
6868
{
6969
// There are only 8 characters in CGRAM
7070
if (character > 8) {

src/modm/driver/encoder/as5047.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <modm/architecture/interface/register.hpp>
1919
#include <modm/architecture/interface/spi_device.hpp>
2020
#include <modm/processing/resumable.hpp>
21-
#include <modm/processing/timer.hpp>
2221
#include <modm/math/geometry/angle_int.hpp>
2322

2423
namespace modm
@@ -121,4 +120,4 @@ class As5047 : public as5047, public modm::SpiDevice<SpiMaster>, protected modm:
121120

122121
} // namespace modm
123122

124-
#include "as5047_impl.hpp"
123+
#include "as5047_impl.hpp"

src/modm/driver/encoder/as5047.lb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
# -----------------------------------------------------------------------------
1212

1313
def init(module):
14-
module.name = ":driver:as5047"
15-
module.description = """\
14+
module.name = ":driver:as5047"
15+
module.description = """\
1616
# AS5047 14 bit Absolute Encoder SPI Driver
1717
1818
[Datasheet](https://ams.com/documents/20143/36005/AS5047D_DS000394_2-00.pdf)
1919
"""
2020

2121
def prepare(module, options):
22-
module.depends(
23-
":architecture:gpio",
24-
":architecture:spi.device",
25-
":processing:resumable",
26-
":math:geometry"
22+
module.depends(
23+
":architecture:gpio",
24+
":architecture:spi.device",
25+
":processing:resumable",
26+
":math:geometry"
2727
)
28-
return True
28+
return True
2929

3030
def build(env):
3131
env.outbasepath = "modm/src/modm/driver/encoder"

src/modm/driver/inertial/bmi088.lb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def prepare(module, options):
2525
":architecture:register",
2626
":architecture:spi.device",
2727
":architecture:i2c.device",
28+
":architecture:fiber",
2829
":math:geometry",
29-
":processing:fiber",
3030
":processing:timer")
3131
return True
3232

src/modm/driver/inertial/bmi088_transport_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#error "Don't include this file directly, use 'bmi088_transport.hpp' instead!"
1414
#endif
1515

16-
#include <modm/processing/fiber.hpp>
16+
#include <modm/architecture/interface/fiber.hpp>
1717

1818
namespace modm
1919
{

0 commit comments

Comments
 (0)