user:hidsh キーワード
About the XIAO nrf52840 PLUS documentation has incorrect pinouts!
No response from Seeed, so I tested the all additional pinout introduced in the Plus by running Blink on my XIAO nRF52840 Plus.
There are two errors. Please refer to the correction proposal diagram below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; disable_esc_gpg.ahk | |
| ; | |
| ; Disable following overlay from Google Play Games App for Windows | |
| ; "shift+tabキーを押すと、ゲームを終了する、コントロールを開くなどの操作が行えます。" | |
| #Requires AutoHotkey v2.0 | |
| #HotIf WinActive("ahk_exe crosvm.exe") | |
| Esc::Send "^{b}" | |
| ^H::return ; ignore C-h to avoid accidentally quitting game app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // gccでは...で表した可変長引数を__VA_ARGS__で指定できる | |
| // 可変長引数を全て__VA_ARGS__とマップする | |
| #define DEBUG_PRINT(...) printf(__VA_ARGS__); fflush(stdout) | |
| // fmt以降の可変長引数を__VA_ARGS__とマップする | |
| #define DEBUG_PRINT2(fmt, ...) printf(fmt, __VA_ARGS__); fflush(stdout) | |
| // _1,_2,_3,の部分・・・引数の個数だけ用意する | |
| // NAME・・・この部分に、目的の引数個数用の関数名が入る | |
| #define GET_MACRO(_1,_2,_3,NAME,...) NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: Apache-2.0 | |
| cmake_minimum_required(VERSION 3.20.0) | |
| find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | |
| project(button) | |
| target_sources(app PRIVATE src/main.c src/remap.c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdint.h> | |
| #include <stdio.h> | |
| // zephyr-latest/zephyr-proj/zephyr/include/zephyr/sys/util_macro.h | |
| /** @brief Extract the Least Significant Bit from @p value. */ | |
| #define LSB_GET(value) ((value) & -(value)) | |
| /** | |
| * @brief Extract a bitfield element from @p value corresponding to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # zephyr/samples/basic/button/boards/custom.conf | |
| # | |
| # "static" pinctrl to use external-uart breakout (AE-FT2232 / FTDI FT2232D) as /dev/ttyUSB0 | |
| # this file is to switch USB-CDC-ACM (/dev/ttyACM0) --> external uart (/dev/ttyUSB0) | |
| # disable USB CDC ACM | |
| CONFIG_USB_DEVICE_STACK=n | |
| CONFIG_USB_DEVICE_STACK_NEXT=n | |
| CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // zephyr/samples/basic/button/boards/xiao_ble.overlay | |
| // | |
| // adopt from zephyr/boards/nordic/nrf52dk/nrf52dk_nrf52810.dts | |
| /{ | |
| buttons { | |
| compatible = "gpio-keys"; | |
| button0: button_0 { | |
| label = "Push button switch 0"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2020 The ZMK Contributors | |
| * | |
| * SPDX-License-Identifier: MIT | |
| */ | |
| #include <zephyr/kernel.h> | |
| #include <zephyr/device.h> | |
| #include <zephyr/devicetree.h> | |
| #include <zephyr/settings/settings.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int fun(int x) { return x * 10; } | |
| // inline int fun_inline(int x) { return x * 100; } // --> causes undefined reference | |
| extern inline int fun_inline(int x) { return x * 100; } // ok | |
| // static inline int fun_inline(int x) { return x * 1000; } // ok, but this .c file local | |
| int main(void) { | |
| printf("%d, %d\n", fun(2), fun_inline(2)); |
NewerOlder
