Skip to content

Instantly share code, notes, and snippets.

/*
* main.c
*
* Created on: Oct 29, 2020
* Author: bvernoux
*/
#include <stdio.h>
#include <string.h>
Renderer: GeForce GT 650M/PCIe/SSE2
Vendor: NVIDIA Corporation
Version: 4.4.0 NVIDIA 344.75
Shading language version: 4.40 NVIDIA via Cg compiler
Max texture size: 16384 x 16384
Max vertex texture image units: 32
Max texture image units: 32
Max geometry texture units: 32
@bvernoux
bvernoux / libsigrokdecode_decoders_timing_pd.py
Created October 8, 2019 20:15
sigrok PulseView libsigrokdecode/decoders/timing/pd.py modifications to add configurability on "Timing;Time" display depending on Data Level (Both, 1 or 0)
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2014 Torsten Duwe <duwe@suse.de>
## Copyright (C) 2014 Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
## Copyright (C) 2019 Benjamin Vernoux <bvernoux@gmail.com>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
@bvernoux
bvernoux / SerialProtocol_ESP32_LoadExecStub_GetFlashID.txt
Last active March 17, 2021 02:08
SerialProtocol ESP32 Load/Exec esptool Stub then execute GetFlashID
Serial Protocol ESP32 => Download Mode UART
Analysis of dump esp32_after_boot_Keep_Boot_IO0_Pressed_win7_esptool_py_flash_id_OK.sr
See https://github.com/themadinventor/esptool/wiki/Serial-Protocol
The bootloader protocol uses SLIP framing.
Each packet begin and end with 0xC0,
all occurrences of 0xC0 and 0xDB inside the packet are replaced with 0xDB 0xDC and 0xDB 0xDD, respectively.
Repeat Opcodes 0x08 Sync Frame each 300ms until we have an answer from ESP32 (until ESP32 is ready)
@bvernoux
bvernoux / tx_bench.py
Last active May 5, 2016 10:13
tx_bench.py
#!/usr/bin/env python
############################### tx_bench.py ###############################
"""
Examples
tx_bench.py 64 1000 >> bench.txt
tx_bench.py 128 500 >> bench.txt
tx_bench.py 256 500 >> bench.txt
tx_bench.py 500 500 >> bench.txt
tx_bench.py 512 500 >> bench.txt
@bvernoux
bvernoux / bench_chibios3 vs bench_chibios4
Last active May 2, 2016 18:34
bench_chibios3 vs bench_chibios4
Python script used on PC side for the benchmark:
https://gist.github.com/bvernoux/09cf99b9e487409bfa3bb76715fb65bf#file-tx_bench-py
https://github.com/bvernoux/hydrafw/commit/81f925c54b42fe450e49802184bde9c365248dd1
HydraFW (HydraBus) v0.7-beta-3-g81f925c 2016-04-26
Kernel: ChibiOS 3.0.0dev
Compiler: GCC 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601]
int cmd_debug_test_rx(t_hydra_console *con, t_tokenline_parsed *p)
{
tokenline.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tokenline.c b/tokenline.c
index c9db559..a3cdb7f 100644
--- a/tokenline.c
+++ b/tokenline.c
@@ -345,7 +345,7 @@ static int tokenize(t_tokenline *tl, int *words, int num_words,
t_tokenline_parsed *p;
float arg_float;
tokenline.c | 48 ++++++++++++++++++++++++++----------------------
tokenline.h | 6 ++----
2 files changed, 28 insertions(+), 26 deletions(-)
diff --git a/tokenline.c b/tokenline.c
index 24049eb..c9db559 100644
--- a/tokenline.c
+++ b/tokenline.c
@@ -289,8 +289,6 @@ static char *arg_type_to_string(int arg_type)
return "<integer>";
@bvernoux
bvernoux / airspy_c.patch
Created October 23, 2015 21:05
airspy_c.patch for test Linux libusb_kernel_driver_active / libusb_detach_kernel_driver
libairspy/src/airspy.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/libairspy/src/airspy.c b/libairspy/src/airspy.c
index f215e05..1c4a092 100644
--- a/libairspy/src/airspy.c
+++ b/libairspy/src/airspy.c
@@ -625,12 +625,15 @@ static void airspy_open_device(airspy_device_t* device,
if (strncmp((const char*)serial_number, serial_number_expected, SERIAL_AIRSPY_EXPECTED_SIZE) == 0)
{
@bvernoux
bvernoux / airspy_host_linux_kernel_driver.patch
Created July 14, 2015 08:55
airspy library patch for Linux to solve Kernel >= 3.17 problems see https://github.com/airspy/host/tree/linux_kernel_driver for more details
libairspy/src/airspy.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/libairspy/src/airspy.c b/libairspy/src/airspy.c
index 574906c..f50c1dc 100644
--- a/libairspy/src/airspy.c
+++ b/libairspy/src/airspy.c
@@ -570,6 +570,15 @@ static void airspy_open_device(airspy_device_t* device,
if (strncmp((const char*)serial_number, serial_number_expected, SERIAL_AIRSPY_EXPECTED_SIZE) == 0)