Skip to content

Commit

Permalink
update CMSIS-pack to 7.16
Browse files Browse the repository at this point in the history
  • Loading branch information
scaprile committed Nov 20, 2024
1 parent fbee9e4 commit 4f52bed
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ uint64_t mg_millis(void) { // Let Mongoose use our uptime function
return (uint64_t) HAL_GetTick(); // Return number of milliseconds since boot
}

void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void timer_fn(void *arg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ void SysTick_Handler (void) {
xPortSysTickHandler();
}

void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void server(void *args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ void SysTick_Handler (void) {
xPortSysTickHandler();
}

void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void server(void *args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ void SysTick_Handler(void) {
xPortSysTickHandler();
}

void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void timer_fn(void *arg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
#define BLINK_PERIOD_MS 1000 // LED blinking period in millis


void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void server(void *args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@

#define BLINK_PERIOD_MS 1000 // LED blinking period in millis

void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void timer_fn(void *arg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
#define BLINK_PERIOD_MS 1000 // LED blinking period in millis


void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void server(const void *args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@

#define BLINK_PERIOD_MS 1000 // LED blinking period in millis

void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void timer_fn(void *arg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
#define BLINK_PERIOD_MS 1000 // LED blinking period in millis


void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void server(void *args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
#define BLINK_PERIOD_MS 1000 // LED blinking period in millis


void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void server(void *args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@

#define BLINK_PERIOD_MS 1000 // LED blinking period in millis

void mg_random(void *buf, size_t len) { // Use on-board RNG
bool mg_random(void *buf, size_t len) { // Use on-board RNG
extern RNG_HandleTypeDef hrng;
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
uint32_t r;
HAL_RNG_GenerateRandomNumber(&hrng, &r);
memcpy((char *) buf + n, &r, n + sizeof(r) > len ? len - n : sizeof(r));
}
return true;
}

static void timer_fn(void *arg) {
Expand Down
8 changes: 4 additions & 4 deletions extra/cmsis-pack/Cesanta.Mongoose.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<license>License.txt</license>
<repository type="git">https://github.com/cesanta/mongoose.git</repository>
<releases>
<release version="7.13.0" date="2024-02-28" tag="7.13">
See https://github.com/cesanta/mongoose/releases/tag/7.13
<release version="7.16.0" date="2024-11-20" tag="7.16">
See https://github.com/cesanta/mongoose/releases/tag/7.16
</release>
</releases>

Expand All @@ -29,12 +29,12 @@
</taxonomy>

<components>
<component Cclass="Network Library" Cgroup="Mongoose" Cversion="7.13.0">
<component Cclass="Network Library" Cgroup="Mongoose" Cversion="7.16.0">
<description>Mongoose HTTP/MQTT/Websocket Library</description>
<files>
<file category="header" name="Mongoose/mongoose.h"/>
<file category="source" name="Mongoose/mongoose.c"/>
<file category="header" name="Mongoose/config/mongoose_custom.h" attr="config" version="1.0.0"/>
<file category="header" name="Mongoose/config/mongoose_config.h" attr="config" version="1.0.0"/>
</files>
</component>
</components>
Expand Down

0 comments on commit 4f52bed

Please sign in to comment.