Skip to content

Instantly share code, notes, and snippets.

--- /opt/ncs/ncs-v3.0/nrf/applications/serial_lte_modem/src/slm_at_socket.c 2025-04-15 11:53:22.452023051 -0400
+++ src/slm_at_socket.c 2025-05-28 13:00:00.173393697 -0400
@@ -1656,6 +1656,224 @@
return err;
}
+/* Begin app specific commands */
+
+SLM_AT_CMD_CUSTOM(qiopen, "AT+QIOPEN", handle_qiopen_socket);
+static int handle_qiopen_socket(enum at_parser_cmd_type cmd_type, struct at_parser *parser,
diff --git a/drivers/display/ssd16xx.c b/drivers/display/ssd16xx.c
index 7dfaa121177..d6229c34b88 100644
--- a/drivers/display/ssd16xx.c
+++ b/drivers/display/ssd16xx.c
@@ -16,6 +16,8 @@ LOG_MODULE_REGISTER(ssd16xx);
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/mipi_dbi.h>
+#include <zephyr/pm/device.h>
+#include <zephyr/pm/device_runtime.h>
#include <zephyr/kernel.h>
#include <hal/nrf_grtc.h>
/* To use the nRF54L15's GRTC PWM output (P0.03 only)
*
* Requires enabling:
* CONFIG_NRFX_GRTC=y
*/
int main(void)
import re
import sys
import argparse
from dataclasses import dataclass
from typing import List, Dict, Set, Optional
@dataclass
class State:
name: str
parent: Optional[str] = None
import argparse
import os
from pathlib import Path
import shutil
import sys
from west import log
from west.commands import WestCommand
from InquirerPy import inquirer
class BoardCreator(WestCommand):
@hlord2000
hlord2000 / sdm.sh
Created October 3, 2024 17:59
Serial Device Manager, defaults to using tio
sdm() {
# ANSI color codes
local RED=$'\033[0;31m'
local GREEN=$'\033[0;32m'
local YELLOW=$'\033[1;33m'
local BLUE=$'\033[0;34m'
local MAGENTA=$'\033[0;35m'
local CYAN=$'\033[0;36m'
local BOLD=$'\033[1m'
local UNDERLINE=$'\033[4m'
@hlord2000
hlord2000 / ncs_zsh.sh
Last active September 26, 2024 11:40
# NCS activation function
actvenv_ncs() {
local ncs_dir="/opt/ncs"
local versions=($(ls "$ncs_dir" | sort -Vr))
# If no argument provided, show available versions
if [[ $# -eq 0 ]]; then
echo "Available versions:"
printf '%s\n' "${versions[@]}"
echo "Usage: actvenv_ncs <version>"
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if (argc != 2) {
fprintf(stderr, "Usage: %s <errno_value>\n", argv[0]);
return 1;
}
@hlord2000
hlord2000 / main.py
Created May 10, 2024 16:49
Bleak Test w/ Nordic UART Service
# This demo shows how to connect to a device, get its services and characteristics,
# and then subscribe to notifications from a characteristic. It also shows how to
# write to a characteristic.
#
# To begin, create a virtual environment and install bleak
#
# python3 -m venv venv
# source venv/bin/activate
# pip install bleak
#
{
"version": "1.0",
"keymap": {
"layers": [
{
"name": "layer0",
"keys": [
{
"behavior": "tap",
"parameters": ["keycode_A", "option_1"]