Skip to content

Instantly share code, notes, and snippets.

View telent's full-sized avatar

Daniel Barlow telent

View GitHub Profile
{
"tag": {
"ble_sm_sc_oob_data": {
"members": {
"r": {
"offset": 0,
"type": {
"array": {
"count": 15,
"of": {
(let [buf (unsafe.alloc 25)]
(unsafe.poke buf 0 1 0x55)
(unsafe.poke buf 1 1 0xaa)
(unsafe.poke buf 2 1 0x11)
(unsafe.poke buf 3 1 0xff)
(unsafe.poke buf 4 4 0xdeadbeef)
(assert (= 0x11 (unsafe.peek buf 2 1)))
(assert (= 0xdeadbeef (unsafe.peek buf 4 4)))
;; this next one is confusing, because
;; imagining that `data` exists only in the body
;; of this mac, so that it can't be called except
;; in the context of an active window
(with-window [10 10 80 80]
(data [0x00 0xff 0x00 0xff])
(print "doing stuff")
(data [0xff 0x00 0xff 0x00])
(something-else)
(data [0x00 0xff 0x00 0xff])
(data [0x77 0x77 0x77 0x77]))
diff --git a/src/displayapp/DisplayAppRecovery.cpp b/src/displayapp/DisplayAppRecovery.cpp
index fd7017a..aa10944 100644
--- a/src/displayapp/DisplayAppRecovery.cpp
+++ b/src/displayapp/DisplayAppRecovery.cpp
@@ -48,6 +48,8 @@ void DisplayApp::Process(void* instance) {
}
void DisplayApp::InitHw() {
+ brightnessController.Init();
+ brightnessController.Set(Controllers::BrightnessController::Levels::High); // Controllers::BrightnessController::Levels.
diff --git a/src/platforms/f4discovery/Makefile.inc b/src/platforms/f4discovery/Makefile.inc
index ae6b75a..578aebb 100644
--- a/src/platforms/f4discovery/Makefile.inc
+++ b/src/platforms/f4discovery/Makefile.inc
@@ -26,10 +26,11 @@ $(info Load address 0x08004000 for BMPBootloader)
LDFLAGS = $(LDFLAGS_BOOT) -Wl,-Ttext=0x8004000
CFLAGS += -DDFU_SERIAL_LENGTH=9
else
-LDFLAGS += $(LDFLAGS_BOOT)
+LDFLAGS += $(LDFLAGS_BOOT) -Wl,-Ttext=0x8000000
/nix/store/vv9ij1wd45vckp9bm1xp776zb51h4wcq-gcc-wrapper-9.3.0/bin/cc -o scripts/kconfig/nconf scripts/
kconfig/nconf.o scripts/kconfig/nconf.gui.o scripts/kconfig/confdata.o scripts/kconfig/expr.o scripts/kcon
fig/lexer.lex.o scripts/kconfig/menu.o scripts/kconfig/parser.tab.o scripts/kconfig/preprocess.o scripts/k
config/symbol.o scripts/kconfig/util.o -L /nix/store/4wsq4c9v3hjlmbiaq8d8r1al7pm27jib-ncurses-6.2/lib -l
ncursesw -lmenuw -lpanelw
cho "no-op"
/bin/sh: cho: not found
make[1]: *** [scripts/kconfig/Makefile:48: nconfig] Error 127
guessing this was introduced by the gnarly sed expression in kernel/builder.nix
# this is Work In Progress configuration.nix for cross-compiling
# a Kodi appliance based on the Odroid C2
{ config, lib, pkgs, ... }:
{
nixpkgs.overlays = [
(self: super: {
# make-tarball is hardcoded to use pixz, but waqnts a host
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
nixpkgs.overlays = [
(self: super: {
[dan@noetbook:~/src/odroid/uboot]$ cat default.nix
with import <nixpkgs> {} ;
pkgsCross.aarch64-multiplatform.ubootOdroidC2.override {
extraPatches = [
(pkgs.fetchPatch {
url="https://source.denx.de/u-boot/u-boot/-/commit/a246e21351778a93805b3f52302a420f4b268601.diff";
sha256 = lib.fakeHash;
})];
}

Audio

(This is still quite exploratory: when some of the questions have been answered and we find out if our suppositions are right, we can build a configuration option to enable audio cleanly)

To enable the audio subsystem, you first need to write to /dev/subsys_adsp

# echo 1 > /dev/subsys_adsp