Skip to content

V2.2.0 final changes #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cores/arduino/mbed-bridge
Submodule mbed-bridge updated 43 files
+0 −3 .gitmodules
+0 −1 core-api
+57 −0 core-api/api/ArduinoAPI.h
+552 −0 core-api/api/Binary.h
+46 −0 core-api/api/Client.h
+10 −0 core-api/api/Common.cpp
+169 −0 core-api/api/Common.h
+16 −0 core-api/api/Compat.h
+47 −0 core-api/api/HardwareI2C.h
+130 −0 core-api/api/HardwareSPI.h
+105 −0 core-api/api/HardwareSerial.h
+127 −0 core-api/api/IPAddress.cpp
+85 −0 core-api/api/IPAddress.h
+44 −0 core-api/api/Interrupts.h
+101 −0 core-api/api/PluggableUSB.cpp
+78 −0 core-api/api/PluggableUSB.h
+381 −0 core-api/api/Print.cpp
+96 −0 core-api/api/Print.h
+39 −0 core-api/api/Printable.h
+141 −0 core-api/api/RingBuffer.h
+31 −0 core-api/api/Server.h
+320 −0 core-api/api/Stream.cpp
+131 −0 core-api/api/Stream.h
+765 −0 core-api/api/String.cpp
+256 −0 core-api/api/String.h
+64 −0 core-api/api/USBAPI.h
+92 −0 core-api/api/Udp.h
+171 −0 core-api/api/WCharacter.h
+37 −0 core-api/api/deprecated-avr-comp/avr/dtostrf.c.impl
+34 −0 core-api/api/deprecated-avr-comp/avr/dtostrf.h
+23 −0 core-api/api/deprecated-avr-comp/avr/interrupt.h
+122 −0 core-api/api/deprecated-avr-comp/avr/pgmspace.h
+25 −0 core-api/api/deprecated/Client.h
+25 −0 core-api/api/deprecated/HardwareSerial.h
+25 −0 core-api/api/deprecated/IPAddress.h
+24 −0 core-api/api/deprecated/Print.h
+24 −0 core-api/api/deprecated/Printable.h
+25 −0 core-api/api/deprecated/Server.h
+25 −0 core-api/api/deprecated/Stream.h
+25 −0 core-api/api/deprecated/Udp.h
+24 −0 core-api/api/deprecated/WString.h
+37 −0 core-api/api/itoa.h
+1 −0 core-extend/HardwareSerial.h
2 changes: 1 addition & 1 deletion libraries/SPI/src/SPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define _APOLLO3_LIBRARIES_SPI_H_

#include "Arduino.h"

#include "core-api/api/HardwareSPI.h"
#include "drivers/SPI.h"

namespace arduino {
Expand Down
4 changes: 2 additions & 2 deletions libraries/Wire/src/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ uint8_t arduino::MbedI2C::endTransmission(bool stopBit) {
return 2;
}

uint8_t arduino::MbedI2C::requestFrom(uint8_t address, size_t len, bool stopBit) {
size_t arduino::MbedI2C::requestFrom(uint8_t address, size_t len, bool stopBit) {
char buf[256];
int ret = master->read(address << 1, buf, len, !stopBit);
if (ret != 0) {
Expand All @@ -78,7 +78,7 @@ uint8_t arduino::MbedI2C::requestFrom(uint8_t address, size_t len, bool stopBit)
return len;
}

uint8_t arduino::MbedI2C::requestFrom(uint8_t address, size_t len) {
size_t arduino::MbedI2C::requestFrom(uint8_t address, size_t len) {
return requestFrom(address, len, true);
}

Expand Down
5 changes: 3 additions & 2 deletions libraries/Wire/src/Wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define _APOLLO3_LIBRARIES_WIRE_H_

#include "Arduino.h"
#include "core-api/api/HardwareI2C.h"
#include "drivers/I2C.h"
#include "drivers/I2CSlave.h"
#include "rtos.h"
Expand All @@ -32,8 +33,8 @@ class MbedI2C : public HardwareI2C
virtual uint8_t endTransmission(bool stopBit);
virtual uint8_t endTransmission(void);

virtual uint8_t requestFrom(uint8_t address, size_t len, bool stopBit);
virtual uint8_t requestFrom(uint8_t address, size_t len);
virtual size_t requestFrom(uint8_t address, size_t len, bool stopBit);
virtual size_t requestFrom(uint8_t address, size_t len);

virtual void onReceive(void(*)(int));
virtual void onRequest(void(*)(void));
Expand Down
10 changes: 8 additions & 2 deletions variants/SFE_ARTEMIS_MODULE/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@

#include "config/pins.h"

#define VARIANT_SPI_INTFCS 0
#define VARIANT_WIRE_INTFCS 0
#define VARIANT_SPI_INTFCS 0
#define VARIANT_WIRE_INTFCS 1

// Add a default wire pin so that Wire is available to libraries and sketches
// Since this is just a module no pins are labeled I2C/Wire/Qwiic by default
// 2 pins have been chosen here arbitrarily
#define VARIANT_Wire_SDA 9
#define VARIANT_Wire_SCL 8

#endif // _VARIANT_H_