mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-25 14:49:35 +00:00
misc infra/clangd updates
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
CompileFlags:
|
||||||
|
Remove:
|
||||||
|
- -mlongcalls
|
||||||
|
- -fno-shrink-wrap
|
||||||
|
- -fstrict-volatile-bitfields
|
||||||
|
- -fno-tree-switch-conversion
|
||||||
|
- -fanalyzer
|
||||||
@@ -5,7 +5,17 @@
|
|||||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||||
"image": "mcr.microsoft.com/devcontainers/base:alpine-3.22",
|
"image": "mcr.microsoft.com/devcontainers/base:alpine-3.22",
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
"features": {},
|
"features": {
|
||||||
|
"ghcr.io/anthropics/devcontainer-features/claude-code:1": {}
|
||||||
|
},
|
||||||
|
"mounts": [
|
||||||
|
"source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind,consistency=cached",
|
||||||
|
// ~/.claude/skills/* are symlinks into ~/.agents/skills — mount it too or they dangle
|
||||||
|
"source=${localEnv:HOME}/.agents,target=/home/vscode/.agents,type=bind,consistency=cached"
|
||||||
|
],
|
||||||
|
"containerEnv": {
|
||||||
|
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude"
|
||||||
|
},
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// "forwardPorts": [],
|
// "forwardPorts": [],
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
@@ -17,28 +27,22 @@
|
|||||||
"extensions": [
|
"extensions": [
|
||||||
"ms-vscode.cpptools-extension-pack",
|
"ms-vscode.cpptools-extension-pack",
|
||||||
"rockcat.avr-support",
|
"rockcat.avr-support",
|
||||||
"harikrishnan94.cxx-compiler-explorer"
|
"harikrishnan94.cxx-compiler-explorer",
|
||||||
|
"llvm-vs-code-extensions.vscode-clangd",
|
||||||
|
"Anthropic.claude-code"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"C_Cpp.codeAnalysis.clangTidy.checks.disabled": [
|
|
||||||
"clang-analyzer-core.NullDereference"
|
|
||||||
],
|
|
||||||
"C_Cpp.files.exclude": {
|
|
||||||
"build/**": true
|
|
||||||
},
|
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.S": "avr"
|
"*.S": "avr"
|
||||||
},
|
},
|
||||||
"cmake.configureOnOpen": true,
|
"clangd.path": "/usr/bin/clangd"
|
||||||
"compilerexplorer.compilationDirectory": "${workspaceFolder}/build"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
// "runArgs": [
|
"runArgs": [
|
||||||
// "--device=/dev/ttyUSB0",
|
"--device=/dev/ttyUSB0",
|
||||||
// "--device=/dev/ttyUSB1"
|
"--network=host"
|
||||||
// ]
|
]
|
||||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||||
// "remoteUser": "root"
|
// "remoteUser": "root"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
sudo apk add make cmake avrdude avr-libc gcc-avr tshark
|
sudo apk add make cmake avrdude avr-libc gcc-avr tshark clang-extra-tools
|
||||||
|
|
||||||
|
|||||||
@@ -375,10 +375,6 @@ auto Bus::send(const Frame &out, Frame::Print print) -> Send {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (uint8_t i = 0; i < out.length; i++) {
|
for (uint8_t i = 0; i < out.length; i++) {
|
||||||
// Based on the µPD6708 datasheet, ACK bit for broadcast doesn't seem
|
|
||||||
// necessary (i.e. This deviates from the previous broadcast specific
|
|
||||||
// function that sent an extra `1` bit after each byte/parity)
|
|
||||||
// Explanation for why audio-group broadcast state report isn't working?
|
|
||||||
if (auto serr = handle.send<8>(out.data[i], with_ack, out.is_unicast);
|
if (auto serr = handle.send<8>(out.data[i], with_ack, out.is_unicast);
|
||||||
serr == NAK) {
|
serr == NAK) {
|
||||||
err.errno = NAK_DATA;
|
err.errno = NAK_DATA;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
// F_CPU + TICK_US (timing.h) defined here; F_CPU potentially needed by
|
// F_CPU + TICK_US (timing.h) defined here; F_CPU potentially needed by
|
||||||
// avr-libc.
|
// avr-libc.
|
||||||
#include "timing_avr.h"
|
#include "timing_avr.h" // IWYU pragma: keep
|
||||||
|
|
||||||
// USART0 TX ring indices owned by the jnk0le lib; the guard consults them to
|
// USART0 TX ring indices owned by the jnk0le lib; the guard consults them to
|
||||||
// decide whether to resume the TX drain (DRE interrupt) on leave.
|
// decide whether to resume the TX drain (DRE interrupt) on leave.
|
||||||
@@ -80,7 +80,7 @@ bool phy_is_muted() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// True when the bus is being driven (i.e. not idle/floating).
|
// True when the bus is being driven (i.e. not idle/floating).
|
||||||
bool phy_active() { return !BUS_IS_IDLE; }
|
bool phy_active() { return (!BUS_IS_IDLE) != 0; }
|
||||||
|
|
||||||
// Mute device TX on AVCLAN bus
|
// Mute device TX on AVCLAN bus
|
||||||
void phy_mute(bool mute) {
|
void phy_mute(bool mute) {
|
||||||
@@ -112,8 +112,6 @@ static void set_AVC_logic_for(uint8_t val, uint16_t period) {
|
|||||||
AVCLAN_setBusDriven();
|
AVCLAN_setBusDriven();
|
||||||
}
|
}
|
||||||
while (TCB1.CNT <= period) {};
|
while (TCB1.CNT <= period) {};
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void phy_send_bit(Bit bit) {
|
void phy_send_bit(Bit bit) {
|
||||||
@@ -481,6 +479,8 @@ void phy_guard_leave() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(NDEBUG) && defined(MEASURE_BUS)
|
#if !defined(NDEBUG) && defined(MEASURE_BUS)
|
||||||
|
#include <stdio.h> // phy_measure() reporting (debug builds only)
|
||||||
|
|
||||||
// Only used immediately below
|
// Only used immediately below
|
||||||
#define XSTR(x) #x
|
#define XSTR(x) #x
|
||||||
#define STR(x) XSTR(x)
|
#define STR(x) XSTR(x)
|
||||||
|
|||||||
@@ -63,4 +63,4 @@
|
|||||||
// TCB_TICK is nanoseconds/tick; the generic timing.h wants microseconds/tick.
|
// TCB_TICK is nanoseconds/tick; the generic timing.h wants microseconds/tick.
|
||||||
#define TICK_US (TCB_TICK / 1000.0)
|
#define TICK_US (TCB_TICK / 1000.0)
|
||||||
|
|
||||||
#include "timing.h"
|
#include "timing.h" // IWYU pragma: export
|
||||||
|
|||||||
Reference in New Issue
Block a user