Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter A. Bigot pabigot

View GitHub Profile
@pabigot
pabigot / 0001-Bluetooth-btusb-support-Zephyr-HCI-devices.patch
Last active Oct 11, 2020
Linux btusb patch to avoid validation checks for Zephyr USB HCI
View 0001-Bluetooth-btusb-support-Zephyr-HCI-devices.patch
From 5e9ccd2e720f5d01fad5e2b89ec3b3a205a15c0b Mon Sep 17 00:00:00 2001
From: "Peter A. Bigot" <pab@pabigot.com>
Date: Sat, 26 Sep 2020 09:56:07 -0500
Subject: [PATCH] Bluetooth: btusb: support Zephyr HCI devices
The Bluetooth specification requires that a USB HCI primary controller
provide the bulk and interrupt endpoints as interface 1, and a
scalable isochronous endpoint at interface 2. The latter supports the
synchronous connection oriented capability required for Bluetooth
audio.
@pabigot
pabigot / rpti3b
Created Aug 24, 2020
meta-raspberrypi issue 706
View rpti3b
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.58-v7 (oe-user@oe-host) (gcc version 10.2.0 (GCC)) #1 SMP Tue Aug 18 10:43:46 UTC 2020
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Reserved memory: created CMA memory pool at 0x1ec00000, size 256 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] percpu: Embedded 20 pages/cpu s50252 r8192 d23476 u81920
@pabigot
pabigot / eval-flash.sh
Last active Jun 19, 2020
const device comparisons zephyr issue
View eval-flash.sh
#!/bin/sh
CONST_REF=nordic/issue/22941a
SUBOBJ_REF=nordic/20200611a
BASE_REF=$(git merge-base ${CONST_REF} ${SUBOBJ_REF})
build () {
tag=$1 ; shift
ref=$1 ; shift
args="${@}"
@pabigot
pabigot / main.c
Created Jun 11, 2020
Sample with button and power management
View main.c
/*
* Copyright (c) 2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include <zephyr.h>
#include <device.h>
#include <drivers/gpio.h>
@pabigot
pabigot / CMakeLists.txt
Last active Apr 27, 2020
test case for zephyrproject/zephyr#23998
View CMakeLists.txt
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.13.1)
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
project(NONE)
target_sources(app PRIVATE src/main.cxx)
@pabigot
pabigot / main.c
Created Apr 21, 2020
zephyr issue 24372
View main.c
#include <zephyr.h>
#include <sys/printk.h>
#include <data/json.h>
typedef struct {
char *id;
uint32_t d;
uint8_t t;
} data_first;
@pabigot
pabigot / ship.patch
Created Mar 20, 2020
zephyr increase shippable minions
View ship.patch
diff --git a/.shippable.yml b/.shippable.yml
index fa33363380..12eea27ef6 100644
--- a/.shippable.yml
+++ b/.shippable.yml
@@ -6,13 +6,36 @@ env:
global:
- ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.11.2
- ZEPHYR_TOOLCHAIN_VARIANT=zephyr
- - MATRIX_BUILDS="5"
+ - MATRIX_BUILDS="28"
@pabigot
pabigot / gist:e1851e261cea5881fab01743f65ef61c
Created Feb 20, 2020
zephyr devicetree macro name structure
View gist:e1851e261cea5881fab01743f65ef61c
<name> ::= 'DT_' <node-id> [ '_' <suffix> ];
<init-id> ::= [A-Z]
<id-char> ::= [A-Z0-9]
<decimal> ::= [0-9]+ ;
<hexadecimal> ::= [0-9a-f]+ ;
<identifier> ::= <init-id> <id-char>* ;
<long-identifier> ::= <identifier> ( '_' <identifier> )* ;
@pabigot
pabigot / named.txt
Created Jan 17, 2020
fragments to get a named phandle reference
View named.txt
/* binding */
description: whatever
compatible: "something,switch"
properties:
gpios:
type: phandle-array
required: true
gpio-names:
type: string-array
required: false
@pabigot
pabigot / fragment.c
Last active Jan 8, 2020
example of service request with reset attempt for zephyrproject-rtos/zephyr pr #21090
View fragment.c
int err;
struct k_poll_signal sig;
struct onoff_client cli;
/* Blocking start using signal */
struct k_poll_event evts[] = {
K_POLL_EVENT_INITIALIZER(K_POLL_TYPE_SIGNAL,
K_POLL_MODE_NOTIFY_ONLY,
&sig),
};
You can’t perform that action at this time.