Skip to content

Commit

Permalink
Pre Release Version 3.1.7
Browse files Browse the repository at this point in the history
Version 3.1.7 – 2023/08/01

Feature:
- Update for Wi-Fi coding style
- Add RFID examples
- Update SimpleHttpExample.ino
- Update MQTT examples
- Update UDP Calculation examples
- Update WiFiAPMode examples
- Remove unnecessary "shield" check for Wi-Fi examples
- Update Power Save TicklessMode example
- Update arduboy zip
- Fix BLE stack overflow when compiling with standard printf enabled

API Updates:
- Add SPI API to support drawBitmap()
- Update SPI API to support external library tft_eSPI
- Add "Upload Speed" option for menu of IDE
- Update Wi-Fi ap and station concurrent mode
- Update Debugging mode feature
- Update for final evaluation kit for NORA-W30
- Update "board.txt" and "platform.txt"
- Update i2c API
- Update PMS3003.cpp
- Update wiring_analog.c
- Add SPI slave mode selection

Misc:
- Update tool V1.1.1.1(MacOS only), V1.1.2 Support the lower version of MacOS
- Update IFTTT documentation to add in Line Notify features
- Update AmebaEink.zip
- Update Ameba_TensorFlowLite.zip
- Update AmebaD Arduino IDE Tools menu
- Add Example_Tools folder
- Update greetings.yml
- Update README
- Update tool V1.1.3 Support puya flash
  • Loading branch information
M-ichae-l committed Aug 1, 2023
1 parent d5bc6c2 commit e9fb388
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 13 deletions.
16 changes: 8 additions & 8 deletions Arduino_package/hardware/libraries/SPI/src/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ SPIClass::SPIClass(void *pSpiObj, int mosi, int miso, int clk, int ss)
pinUserSS = -1;
initStatus = false;
dataBits = 8; // default databits is 8 bits
dataMode = SPI_MODE0; // default datamode is mode 0
dataMode = SPI_DATA_MODE0; // default datamode is mode 0

#if defined(BOARD_RTL8721DM)
defaultFrequency = 2000000;
#else
defaultFrequency = 20000000;
#endif

SPI_Mode = 'master';
SPI_Mode = SPI_MODE_MASTER;
}

void SPIClass::beginTransaction(uint8_t pin, SPISettings settings) {
Expand Down Expand Up @@ -132,11 +132,11 @@ void SPIClass::begin(int ss) {
initStatus = true;
}

void begin(char mode) {
void SPIClass::begin(char mode) {
SPI_Mode = mode;
if (SPI_Mode == 'master') {
if (SPI_Mode == SPI_MODE_MASTER) {
begin();
} else if (SPI_Mode == 'slave') {
} else if (SPI_Mode == SPI_MODE_SLAVE) {
if (pinMOSI == PA_16 || pinMOSI == PB_18) {
((spi_t *)pSpiMaster)->spi_idx = MBED_SPI0;
} else if (pinMOSI == PA_12 || pinMOSI == PB_4) {
Expand Down Expand Up @@ -166,11 +166,11 @@ void begin(char mode) {
}
}

void begin(int ss, char mode) {
void SPIClass::begin(int ss, char mode) {
SPI_Mode = mode;
if (SPI_Mode == 'master') {
if (SPI_Mode == SPI_MODE_MASTER) {
begin(ss);
} else if (SPI_Mode == 'slave') {
} else if (SPI_Mode == SPI_MODE_SLAVE) {
pinSS = (PinName)g_APinDescription[ss].pinname;

if (pinMOSI == PA_16 || pinMOSI == PB_18) {
Expand Down
13 changes: 8 additions & 5 deletions Arduino_package/hardware/libraries/SPI/src/SPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@
// - beginTransaction(pin, SPISettings settings) (if transactions are available)
#define SPI_HAS_EXTENDED_CS_PIN_HANDLING 1

#define SPI_MODE0 0x00
#define SPI_MODE1 0x01
#define SPI_MODE2 0x02
#define SPI_MODE3 0x03
#define SPI_DATA_MODE0 0x00
#define SPI_DATA_MODE1 0x01
#define SPI_DATA_MODE2 0x02
#define SPI_DATA_MODE3 0x03

#define SPI_MODE_MASTER 'M'
#define SPI_MODE_SLAVE 'S'

enum SPITransferMode {
SPI_CONTINUE,
Expand All @@ -52,7 +55,7 @@ class SPISettings {
_dataMode = dataMode;
}
SPISettings() {
SPISettings(4000000, MSBFIRST, SPI_MODE0);
SPISettings(4000000, MSBFIRST, SPI_DATA_MODE0);
}

private:
Expand Down
36 changes: 36 additions & 0 deletions Arduino_package/package_realtek.com_amebad_early_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,42 @@
{
"name": "Realtek Ameba Boards (32-bits ARM Cortex-M33 @200MHz)",
"architecture": "AmebaD",
"version": "3.1.7-build20230801",
"category": "Contributed",
"help": {
"online": "https://www.amebaiot.com/"
},
"url": "https://github.com/ambiot/ambd_arduino/raw/dev/Arduino_package/release/ameba_d-3.1.7-build20230801.tar.gz",
"archiveFileName": "ameba_d-3.1.7-build20230801.tar.gz",
"checksum": "SHA-256:2d22b2b78e1963265c5c8a0925224991d39409d682039ee8e4042b9fc155defe",
"size": "15534859",
"boards": [
{"name": "AMB21 (RTL8722DM)"},
{"name": "AMB22 (RTL8722CSM)"},
{"name": "AMB23 (RTL8722DM)"},
{"name": "BW16 (RTL8720DN)"},
{"name": "BW16-TypeC (RTL8720DN)"},
{"name": "AW-CU488 Thing Plus (RTL8721DM)"},
{"name": "AMB25 (RTL8720DF)"},
{"name": "AMB26 (RTL8720DF)"},
{"name": "NORA-W30 (RTL8720DF)"}
],
"toolsDependencies": [
{
"packager": "realtek",
"name": "ameba_d_asdk_toolchain",
"version": "1.0.1"
},
{
"packager": "realtek",
"name": "ameba_d_tools",
"version": "1.1.3"
}
]
},
{
"name": "Realtek Ameba Boards (32-bits ARM Cortex-M33 @200MHz)",
"architecture": "AmebaD",
"version": "3.1.7-build20230731",
"category": "Contributed",
"help": {
Expand Down
Binary file not shown.

0 comments on commit e9fb388

Please sign in to comment.