Skip to content

Commit 22b256e

Browse files
committed
use mbed namespace explicitly
1 parent 08fde28 commit 22b256e

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

bridge/pins.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ typedef struct _PinState {
2929
PinName name;
3030
pin_size_t number;
3131
arduino::InterruptInParam* irq;
32-
// PwmOut* pwm; // todo: implement this
33-
// AnalogOut* dac; // todo: implement this
34-
// AnalogIn* adc; // todo: implement this
35-
DigitalInOut* gpio;
32+
// mbed::PwmOut* pwm; // todo: implement this
33+
// mbed::AnalogOut* dac; // todo: implement this
34+
// mbed::AnalogIn* adc; // todo: implement this
35+
mbed::DigitalInOut* gpio;
3636
} PinState;
3737

3838
pin_size_t pinIndexByName(PinName name);

core-extend/Common.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,31 +102,31 @@ class InterruptInParam : public mbed::InterruptIn {
102102
*
103103
* @param func A pointer to a void function with argument, or 0 to set as none
104104
*/
105-
void rise(Callback<void(void*)> func, void* param);
105+
void rise(mbed::Callback<void(void*)> func, void* param);
106106

107107
/** Attach a function to call when a rising edge occurs on the input
108108
*
109109
* @param func A pointer to a void function, or 0 to set as none
110110
*/
111-
void rise(Callback<void()> func); // shadows InterruptIn::rise
111+
void rise(mbed::Callback<void()> func); // shadows InterruptIn::rise
112112

113113
/** Attach a function to call when a falling edge occurs on the input
114114
*
115115
* @param func A pointer to a void function with argument, or 0 to set as none
116116
*/
117-
void fall(Callback<void(void*)> func, void* param);
117+
void fall(mbed::Callback<void(void*)> func, void* param);
118118

119119
/** Attach a function to call when a falling edge occurs on the input
120120
*
121121
* @param func A pointer to a void function, or 0 to set as none
122122
*/
123-
void fall(Callback<void()> func); // shadows InterruptIn::fall
123+
void fall(mbed::Callback<void()> func); // shadows InterruptIn::fall
124124

125125
static void _irq_handler(uint32_t id, gpio_irq_event event);
126126

127127
protected:
128-
Callback<void(void*)> _rise; // shadows InterruptIn::_rise
129-
Callback<void(void*)> _fall; // shadows InterruptIn::_fall
128+
mbed::Callback<void(void*)> _rise; // shadows InterruptIn::_rise
129+
mbed::Callback<void(void*)> _fall; // shadows InterruptIn::_fall
130130

131131
void* _rise_param = nullptr;
132132
void* _fall_param = nullptr;

core-implement/CommonDigital.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ SOFTWARE.
3030
#include "bridge/pins.h"
3131

3232
void indexPinMode(pin_size_t index, Arduino_PinMode pinMode){
33-
DigitalInOut* gpio = pinGPIOByIndex(index);
33+
mbed::DigitalInOut* gpio = pinGPIOByIndex(index);
3434
if( gpio == NULL ){
35-
gpio = new DigitalInOut(pinNameByIndex(index));
35+
gpio = new mbed::DigitalInOut(pinNameByIndex(index));
3636
}
3737
pinGPIOByIndex(index) = gpio;
3838

core-implement/CommonInterrupt.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void InterruptInParam::irq_init(PinName pin)
143143
gpio_irq_init(&gpio_irq, pin, (&InterruptInParam::_irq_handler), (uint32_t)this);
144144
}
145145

146-
void InterruptInParam::rise(Callback<void(void*)> func, void* param)
146+
void InterruptInParam::rise(mbed::Callback<void(void*)> func, void* param)
147147
{
148148
core_util_critical_section_enter();
149149
if (func) {
@@ -161,11 +161,11 @@ void InterruptInParam::rise(Callback<void(void*)> func, void* param)
161161
core_util_critical_section_exit();
162162
}
163163

164-
void InterruptInParam::rise(Callback<void()> func){
164+
void InterruptInParam::rise(mbed::Callback<void()> func){
165165
error("InterruptInParam.rise called with 'void(void)' callback (should be 'void(void*)')\r\n");
166166
}
167167

168-
void InterruptInParam::fall(Callback<void(void*)> func, void* param)
168+
void InterruptInParam::fall(mbed::Callback<void(void*)> func, void* param)
169169
{
170170
core_util_critical_section_enter();
171171
if (func) {
@@ -183,7 +183,7 @@ void InterruptInParam::fall(Callback<void(void*)> func, void* param)
183183
core_util_critical_section_exit();
184184
}
185185

186-
void InterruptInParam::fall(Callback<void()> func){
186+
void InterruptInParam::fall(mbed::Callback<void()> func){
187187
error("InterruptInParam.fall called with 'void(void)' callback (should be 'void(void*)')\r\n");
188188
}
189189

core-implement/HardwareSerial.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ SOFTWARE.
2525
UART Serial;
2626

2727
// redirect stdout / stdin to Serial
28-
FileHandle *mbed::mbed_override_console(int)
28+
mbed::FileHandle *mbed::mbed_override_console(int)
2929
{
30-
return (FileHandle*)&Serial;
30+
return (mbed::FileHandle*)&Serial;
3131
}
3232

3333
UART::UART(PinName tx, PinName rx, PinName rts, PinName cts) :

0 commit comments

Comments
 (0)