Skip to content

Instantly share code, notes, and snippets.

Andrey Tolstoy avtolstoy

Block or report user

Report or block avtolstoy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View particle_gen3_ping.cpp
/*
* Copyright (c) 2019 Particle Industries, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
View keyboard_only.patch
diff --git a/platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc/usbd_mhid.h b/platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc/usbd_mhid.h
index af483adc6..ca707fffc 100644
--- a/platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc/usbd_mhid.h
+++ b/platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc/usbd_mhid.h
@@ -6,7 +6,7 @@
#define USBD_MHID_CONFIG_DESC_SIZE 32
#define USBD_MHID_DESC_SIZE 9
-#define USBD_MHID_REPORT_DESC_SIZE 178
+#define USBD_MHID_REPORT_DESC_SIZE 45
View photon_power
0.7.0-rc.4
0000006273 [hal.wlan] TRACE: Power Control: On, HW
0000006273 [hal.wlan] TRACE: Current channel: 6
0000006274 [hal.wlan] TRACE: BSS channel: 6
0000006274 [hal.wlan] TRACE: BSS Local Max: 63.0 dBm
0000006274 [hal.wlan] TRACE: BSS Local Constraint: 0.0 dB
0000006275 [hal.wlan] TRACE: User Target: 31.75 dBm
0000006275 [hal.wlan] TRACE: SROM antgain: 2G: 2.0 dB, 5G: 0.0 dB
0000006276 [hal.wlan] TRACE: Regulatory Limits:
0000006276 [hal.wlan] TRACE: CCK : 31.75
View nanopb_usb.cpp
case CTRL_REQUEST_WIFI_SCAN: {
// Allocate buffer
system_ctrl_alloc_reply_data(req, 1024, nullptr);
pb_ostream_t stream = pb_ostream_from_buffer((uint8_t*)req->reply_data, req->reply_size);
// Message
particle_usb_WiFiScanResult res = {0};
// Because aps is a repeated field, a custom encoding callback is required
{
res.aps.funcs.encode = [](pb_ostream_t* stream, const pb_field_t* field, void* const* arg) -> bool {
// We need to pass all three fields, so create a temp state struct
View diagnostic_dump.json
[
{
"t":"app_thread",
"i":2,
"c":{
"a":"0x80a01d9",
"t":"blank.cpp:43"
},
"s":[
"0x806261e",
View keybase.md

Keybase proof

I hereby claim:

  • I am avtolstoy on github.
  • I am avtolstoy (https://keybase.io/avtolstoy) on keybase.
  • I have a public key whose fingerprint is 617B 6AEB 840D C2C5 1232 5777 5EE6 1080 A8DB 7E12

To claim this, I am signing this object:

View usb_vendor_request.cpp
/*
******************************************************************************
* Copyright (c) 2015 Particle Industries, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
View 0001-HAL_ServicedIRQn-and-HAL_WillPreempt.patch
From 951255695da3e9b3b51138beefc6188ea7e0103e Mon Sep 17 00:00:00 2001
From: Andrey Tolstoy <andrey@enistek.com>
Date: Wed, 27 Apr 2016 19:36:26 +0700
Subject: [PATCH 1/1] HAL_ServicedIRQn() and HAL_WillPreempt()
---
hal/inc/core_hal.h | 32 ++++++++++++++++++++++++++++----
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/hal/inc/core_hal.h b/hal/inc/core_hal.h
View millis_test.cpp
#include "application.h"
SYSTEM_MODE(MANUAL);
SYSTEM_THREAD(ENABLED);
uint32_t lastMillis = 0;
void setup()
{
Serial.begin(9600); //Begin USB serial session
View usb_composite_example.cpp
#include "application.h"
SYSTEM_MODE(MANUAL);
Serial1DebugOutput dbg(57600, ALL_LEVEL);
void setup() {
Serial.begin(9600);
USBSerial1.begin(9600);
Mouse.begin();
You can’t perform that action at this time.