Skip to content

Commit e85f6a0

Browse files
committed
Merge remote-tracking branch 'origin' into low-power
2 parents b4f22d1 + e20f7a4 commit e85f6a0

File tree

15 files changed

+612
-103
lines changed

15 files changed

+612
-103
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ libcryptoauth.a
1010
.ccls-cache
1111
.vscode/c_cpp_properties.json
1212
.vscode/arduino.json
13-
deploy_sandbox
13+
deploy_sandbox
14+
builds

Jenkinsfilek8s

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pipeline {
1919
GITHUB_REPO = 'https://github.com/mchpTestArea/avr-iot-test'
2020
GITHUB_REPO_SHORT = 'avr-iot-test'
2121
GITHUB_ORG = 'mchpTestArea'
22-
TARGET_BRANCH = 'main'
22+
TARGET_BRANCH = 'sandbox'
2323
}
2424

2525
stages {
@@ -81,7 +81,6 @@ pipeline {
8181
steps {
8282
sh "git clone ${env.DEPLOY_TOOL_URL}"
8383
sh "pip3 install PyGithub atlassian-python-api jsonschema packaging lxml"
84-
sh "pwd"
8584
}
8685
}
8786

@@ -101,7 +100,7 @@ pipeline {
101100
steps {
102101
script {
103102
withCredentials([usernamePassword(credentialsId: 'github_mchptest', usernameVariable: 'USER_NAME', passwordVariable:'PASS' )]) {
104-
sh "python3 ${env.DEPLOY_SCRIPT_FILE} -rlo=true -gpat=${PASS} -dgid=${USER_NAME} -rpn=${GITHUB_REPO_SHORT} -rporg=${GITHUB_ORG} -rltt=\"${env.GIT_TAG}\" -rltv=\"${env.GIT_TAG}\" -rlua=\"avr-iot-cellular-${env.GIT_TAG}.zip\""
103+
sh "python3 ${env.DEPLOY_SCRIPT_FILE} -rlo=true -gpat=${PASS} -dgid=${USER_NAME} -rpn=${GITHUB_REPO_SHORT} -rporg=${GITHUB_ORG} -rltt=\"${env.GIT_TAG}\" -rltv=\"${env.GIT_TAG}\" -rlua=\"avr-iot-cellular-${env.GIT_TAG}.zip, builds/mini/sandbox.ino.hex\""
105104
}
106105
}
107106
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<p align="center">
55
<img width="50%" style={{paddingTop: "10px", paddingBottom: "10px"}} src="./readme_images/mini-board-2.png" />
66
</p>
7-
The AVR-IoT Cellular Mini is a development board from Microchip to develop cellular IoT applications.
7+
The AVR-IoT Cellular Mini is a development board from Microchip to develop cellular IoT applications.
88

99
📓 Full Arduino support through a library built on top of the open-source [DxCore](https://github.com/SpenceKonde/DxCore)
1010

scripts/compile_examples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ done
99
# Test for AVR-IoT Cellular Mini
1010
for d in src/examples/*/ ; do
1111
echo "Compiling $d...";
12-
arduino-cli compile -b DxCore:megaavr:avrdb:appspm=no,chip=avr128db48,clock=24internal,bodvoltage=1v9,bodmode=disabled,eesave=enable,resetpin=reset,millis=tcb2,startuptime=8 --libraries=".." "$d";
12+
arduino-cli compile -b DxCore:megaavr:avrdb:appspm=no,chip=avr128db48,clock=24internal,bodvoltage=1v9,bodmode=disabled,eesave=enable,resetpin=reset,millis=tcb2,startuptime=8,wiremode=mors2 --libraries=".." "$d" --output-dir "builds/mini/$(basename $d)";
1313
done

scripts/flash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
44

5-
PORT=COM6
5+
PORT=COM7
66
BUILD_DIR=$SCRIPTPATH/../build
77

88
# Do path conversion for WSL

scripts/make.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
44

5-
TARGET=$SCRIPTPATH/../src/examples/low_power/low_power.ino
5+
TARGET=$SCRIPTPATH/../src/examples/sandbox/sandbox.ino
66
EXTRA_ARGS=--clean
77

88
if [ "$1" = "clean" ]; then

src/ecc608.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ uint8_t ECC608Class::readProvisionItem(enum ecc_data_types type,
9292

9393
*length = 0;
9494
return this->ERR_NOTFOUND;
95-
}
95+
}

src/ecc608.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
#ifndef ECC608_H
32
#define ECC608_H
43

@@ -58,22 +57,21 @@ class ECC608Class {
5857
ECC608Class(){};
5958

6059
/*
61-
* Extract item with given type from ECC slot.
60+
* @brief Extract item with given type from ECC slot.
6261
*
6362
* This code traverses the list until matching type is found,
6463
* assuming there is only one item of each type in the slot.
6564
* Notice: A \0 terminator is added to the returned item for
6665
* easier string processing. This is not included in returned
6766
* length, but there must be space for it in the buffer.
6867
*
69-
* Parameters:
70-
* type: Type of requested item
71-
* buffer: Buffer to store item in
72-
* length: Pointer to length of buffer (== max length of returned data),
73-
* set to actual item length on return
74-
* Returns:
75-
* Error code: 0 => OK, 1-0xff => cryptoauth error code, >= 0x100: see
76-
* ecc_provision.h
68+
* @param type Type of requested item
69+
* @param buffer Buffer to store item in
70+
* @param length Pointer to length of buffer (== max length of returned
71+
* data), set to actual item length on return
72+
*
73+
* @return Error code: 0 => OK, 1-0xff => cryptoauth error code, >= 0x100:
74+
* see ecc_provision.h
7775
*/
7876
uint8_t readProvisionItem(enum ecc_data_types type,
7977
uint8_t *buffer,
@@ -99,11 +97,12 @@ class ECC608Class {
9997
};
10098

10199
uint8_t getEndpoint(uint8_t *endpoint, uint8_t *length);
100+
102101
uint8_t getThingName(uint8_t *thingName, uint8_t *length);
103102

104103
uint8_t begin();
105104
};
106105

107106
extern ECC608Class ECC608;
108107

109-
#endif
108+
#endif

src/examples/mqtt_interrupt/mqtt_interrupt.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ void disconnectedFromNetwork(void) { callback_flags |= NETWORK_DISCONN_FLAG; }
6363
void connectedToBroker(void) { callback_flags |= BROKER_CONN_FLAG; }
6464
void disconnectedFromBroker(void) { callback_flags |= BROKER_DISCONN_FLAG; }
6565

66-
void receive(char *topic, uint16_t msg_length) {
66+
void receive(const char *topic,
67+
const uint16_t msg_length,
68+
const int32_t message_id) {
69+
// Message ID is not used here, as we don't specify a MQTT Quality of
70+
// Service different from the default one. Read more about this in the
71+
// documentation for the onReceive() function in MqttClient
6772
memcpy(topic_buffer, topic, MQTT_TOPIC_MAX_LENGTH);
6873
message_length = msg_length;
6974

0 commit comments

Comments
 (0)