Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c2903d6
Initial commit for bcm43436b0 9.88.0.0 (TicWatch Pro 3)
Aug 14, 2024
4031a3a
Initial commit of injection patch
Aug 24, 2024
65d8e42
sendframe: use a later version of sendframe
Sep 6, 2024
0b3553e
fix invalid switch case definition introduced with commit 1f1b4e7
Sep 13, 2024
24484b0
replace monitor hook BLPatch with a forced long instruction branch
Sep 13, 2024
d5f5474
bcm43436b0: add basic frame injection patch for 9.88.0.0
Sep 13, 2024
d8f162f
Trying to debug
Oct 1, 2024
240e378
Revert "Trying to debug"
Nov 13, 2024
6beba82
Try monitormode without flashpatch
Nov 13, 2024
04ecb67
added code to debug crash at 0x33738 that occurs for unknown reasons …
jlinktu Nov 16, 2024
ea36781
Merge pull request #7 from jlinktu/new
yesimxev Nov 16, 2024
fd5aeb0
Patch nullpointer in sendframe.c, this time without genericpatch/flas…
Dec 4, 2024
0928756
Revert "Patch nullpointer in sendframe.c, this time without genericpa…
Dec 9, 2024
13480d2
Fixed radiotap headers, and injection crash
Dec 12, 2024
673e0f4
Fix injection trying harder & re-add debug
Jan 7, 2025
1a44ed6
bcm43436b0 9.88.0.0 remove out of structure files
jlinktu Jan 7, 2025
4c47be9
bcm43436b0 9.88.0.0 correct monitor hook address, change from branch …
jlinktu Jan 7, 2025
b39dff8
bcm43436b0 9.88.0.0 force scb null check branch link to be wide and a…
jlinktu Jan 7, 2025
570c781
Merge pull request #8 from jlinktu/new
yesimxev Jan 8, 2025
db3e9a5
Finalising monitor mode
Feb 12, 2025
681de12
Revise dump-rom (cause panic if run from outside)
Feb 12, 2025
62404b1
Add TicWatches to README
Mar 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ bcm43455c0 | 7_45_154 | Raspberry Pi B3+/B4 | R
bcm43455c0 | 7_45_189 | Raspberry Pi B3+/B4 | Raspbian Kernel 4.14/19, 5.4 | X | X | | X | X |
bcm43455c0 | 7_45_206 | Raspberry Pi B3+/B4 | Raspberry Pi OS Kernel 5.4 | X | X | X | X | X |
bcm43455c0 | 7_45_234 (4ca95bb CY)| Raspberry Pi B3+/B4/5 | Raspberry Pi OS | | | | X | X |
bcm43436b0<sup>3</sup> | 9_88_0_0 | TicWatch Pro / Pro 3 | WearOS 2 | X | X | X | X | X |
bcm43436b0<sup>3</sup> | 9_88_4_65 | Raspberry Pi Zero 2 W | Raspberry Pi OS Kernel 5.10 | X | X | X | X | X |
bcm4356 | 7_35_101_5_sta | Nexus 6 | Android 7.1.2 | X | X | | X | X | O
bcm4358 | 7_112_200_17_sta | Nexus 6P | Android 7 Stock | X | X | | X | X | O
Expand Down
29 changes: 29 additions & 0 deletions firmwares/bcm43436b0/9_88_0_0/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
include definitions.mk

all: ucode.bin templateram.bin flashpatches.c

ucode.bin: $(RAM_FILE) definitions.mk
@printf "\033[0;31m EXTRACTING UCODE\033[0m\n"
$(Q)$(NEXMON_ROOT)/buildtools/ucode_extractor/ucodeext -r $< -b $(UCODESTART) -l $(UCODESIZE) -o $@

templateram.bin: $(RAM_FILE) definitions.mk
@printf "\033[0;31m EXTRACTING TEMPLATERAM\033[0m\n"
$(Q)dd if=$< of=$@ bs=1 skip=$$(($(TEMPLATERAMSTART)-$(RAMSTART))) count=$$(($(TEMPLATERAMSIZE))) 2>/dev/null

flashpatches.c: $(RAM_FILE) definitions.mk
@printf "\033[0;31m EXTRACTING FLASHPATCHES\033[0m\n"
$(Q)printf "#include <patcher.h>\n\n" > flashpatches.c
$(Q)$(NEXMON_ROOT)/buildtools/flash_patch_extractor/fpext -x -r $< -s $(RAMSTART) -b $(FP_CONFIG_ORIGBASE) -e $(FP_CONFIG_ORIGEND) >> $@

rom.bin: ../rom.bin
@printf "\033[0;31m APPLYING FLASHPATCHES TO CLEAN ROM\033[0m\n"
$(Q)$(NEXMON_ROOT)/buildtools/flash_patch_extractor/fpext -x -r $(RAM_FILE) -s $(RAMSTART) -b $(FP_CONFIG_ORIGBASE) -e $(FP_CONFIG_ORIGEND) -i $< -o $@ -t $(ROMSTART) > /dev/null

complete.bin: $(RAM_FILE) rom.bin
@printf "\033[0;31m CONCATENATING RAM AND ROM\033[0m\n"
$(Q)dd if=rom.bin of=$@ bs=1 status=none conv=notrunc seek=$$(($(ROMSTART)))
$(Q)dd if=$< of=$@ bs=1 status=none conv=notrunc seek=$$(($(RAMSTART)))

clean:
@printf "\033[0;31m CLEANING\033[0m\n"
$(Q)rm -f ucode.bin flashpatches.c templateram.bin
Binary file added firmwares/bcm43436b0/9_88_0_0/complete.bin
Binary file not shown.
44 changes: 44 additions & 0 deletions firmwares/bcm43436b0/9_88_0_0/definitions.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
NEXMON_CHIP=CHIP_VER_BCM43436b0
NEXMON_CHIP_NUM=`$(NEXMON_ROOT)/buildtools/scripts/getdefine.sh $(NEXMON_CHIP)`
NEXMON_FW_VERSION=FW_VER_9_88_0_0
NEXMON_FW_VERSION_NUM=`$(NEXMON_ROOT)/buildtools/scripts/getdefine.sh $(NEXMON_FW_VERSION)`

NEXMON_ARCH=armv7-m

RAM_FILE=fw_bcm43436b0.bin
RAMSTART=0x0
RAMSIZE=0x80000

ROM_FILE=rom.bin
ROMSTART=0x800000
ROMSIZE=0x915AC

WLC_UCODE_WRITE_BL_HOOK_ADDR=0x4E818
HNDRTE_RECLAIM_0_END_PTR=0x2F0C
HNDRTE_RECLAIM_0_END=0x66D00

PATCHSIZE=0x1000
PATCHSTART=$$(($(HNDRTE_RECLAIM_0_END) - $(PATCHSIZE)))

# original ucode start and size
UCODESTART=0x5AC3C
UCODESTART_PTR=0x4E828
UCODESIZE=0xBA91
UCODESIZE_PTR=0x4E824

# original template ram start and size
TEMPLATERAMSTART_PTR=0x5AAC4
TEMPLATERAMSTART=0x666D0
TEMPLATERAMSIZE=0x630

FP_DATA_END_PTR=0x42474
FP_CONFIG_BASE_PTR_1=0x418D0
FP_CONFIG_END_PTR_1=0x418D4
FP_CONFIG_BASE_PTR_2=0x41A14
FP_CONFIG_END_PTR_2=0x41A18
# can start at the end of the firmware, it will be overwritten after it is read
FP_CONFIG_BASE=0x66E80
FP_DATA_BASE=0x1000
FP_CONFIG_SIZE=0xC00
FP_CONFIG_ORIGBASE=0x1800
FP_CONFIG_ORIGEND=0x1AF8
Binary file added firmwares/bcm43436b0/9_88_0_0/fw_bcm43436b0.bin
Binary file not shown.
52 changes: 52 additions & 0 deletions firmwares/bcm43436b0/9_88_0_0/structs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/***************************************************************************
* *
* ########### ########### ########## ########## *
* ############ ############ ############ ############ *
* ## ## ## ## ## ## ## *
* ## ## ## ## ## ## ## *
* ########### #### ###### ## ## ## ## ###### *
* ########### #### # ## ## ## ## # # *
* ## ## ###### ## ## ## ## # # *
* ## ## # ## ## ## ## # # *
* ############ ##### ###### ## ## ## ##### ###### *
* ########### ########### ## ## ## ########## *
* *
* S E C U R E M O B I L E N E T W O R K I N G *
* *
* This file is part of NexMon. *
* *
* Copyright (c) 2016 NexMon Team *
* *
* NexMon is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* NexMon is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with NexMon. If not, see <http://www.gnu.org/licenses/>. *
* *
**************************************************************************/

#ifndef STRUCTS_H
#define STRUCTS_H

/* band types */
#define WLC_BAND_AUTO 0 /* auto-select */
#define WLC_BAND_5G 1 /* 5 Ghz */
#define WLC_BAND_2G 2 /* 2.4 Ghz */
#define WLC_BAND_ALL 3 /* all bands */

#ifndef PAD
#define _PADLINE(line) pad ## line
#define _XSTR(line) _PADLINE(line)
#define PAD _XSTR(__LINE__)
#endif

#include "../structs.common.h"

#endif /*STRUCTS_H */
25 changes: 25 additions & 0 deletions firmwares/bcm43436b0/structs.common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,31 @@ struct dma32diag { /* diag access */
unsigned int pad; /* reserved */
};

struct hnd_cons {
uint vcons_in;
uint vcons_out;
char *buf;
uint buf_size;
uint idx;
uint out_idx;
uint cbuf_idx;
char cbuf[];
} __attribute__((packed));

struct hnd_debug {
uint32 magic;
uint32 version;
uint32 fwid;
char epivers[32];
void *trap_ptr;
struct hnd_cons *console;
uint32 ram_base;
uint32 ram_size;
uint32 rom_base;
uint32 rom_size;
void *event_log_top;
} __attribute__((packed));

/*
* Host Interface Registers
*/
Expand Down
182 changes: 182 additions & 0 deletions patches/bcm43436b0/9_88_0_0/nexmon/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
SHELL = /bin/bash
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
include ../version.mk
include $(FW_PATH)/definitions.mk

LOCAL_SRCS=$(wildcard src/*.c) src/ucode_compressed.c src/templateram.c
COMMON_SRCS=$(wildcard $(NEXMON_ROOT)/patches/common/*.c)
FW_SRCS=$(wildcard $(FW_PATH)/*.c)

OBJS=$(addprefix obj/,$(notdir $(LOCAL_SRCS:.c=.o)) $(notdir $(COMMON_SRCS:.c=.o)) $(notdir $(FW_SRCS:.c=.o)))

CFLAGS= \
-fplugin=$(CCPLUGIN) \
-fplugin-arg-nexmon-objfile=$@ \
-fplugin-arg-nexmon-prefile=gen/nexmon.pre \
-fplugin-arg-nexmon-chipver=$(NEXMON_CHIP_NUM) \
-fplugin-arg-nexmon-fwver=$(NEXMON_FW_VERSION_NUM) \
-DNEXMON_CHIP=$(NEXMON_CHIP) \
-DNEXMON_FW_VERSION=$(NEXMON_FW_VERSION) \
-DWLC_UCODE_WRITE_BL_HOOK_ADDR=$(WLC_UCODE_WRITE_BL_HOOK_ADDR) \
-DHNDRTE_RECLAIM_0_END_PTR=$(HNDRTE_RECLAIM_0_END_PTR) \
-DTEMPLATERAMSTART_PTR=$(TEMPLATERAMSTART_PTR) \
-DPATCHSTART=$(PATCHSTART) \
-DUCODESIZE=$(UCODESIZE) \
-DGIT_VERSION=\"$(GIT_VERSION)\" \
-DBUILD_NUMBER=\"$$(cat BUILD_NUMBER)\" \
-Wall -Werror -O2 -nostdlib -nostartfiles -ffreestanding -mthumb -march=$(NEXMON_ARCH) \
-ffunction-sections -fdata-sections \
-I$(NEXMON_ROOT)/patches/include \
-Iinclude \
-I$(FW_PATH)

all: $(RAM_FILE)

init: FORCE
$(Q)if ! test -f BUILD_NUMBER; then echo 0 > BUILD_NUMBER; fi
$(Q)echo $$(($$(cat BUILD_NUMBER) + 1)) > BUILD_NUMBER
$(Q)touch src/version.c
$(Q)make -s -f $(NEXMON_ROOT)/patches/common/header.mk
$(Q)mkdir -p obj gen log

obj/%.o: src/%.c
@printf "\033[0;31m COMPILING\033[0m %s => %s (details: log/compiler.log)\n" $< $@
$(Q)cat gen/nexmon.pre 2>>log/error.log | gawk '{ if ($$3 != "$@") print; }' > tmp && mv tmp gen/nexmon.pre
$(Q)$(CC)gcc $(CFLAGS) -c $< -o $@ >>log/compiler.log

obj/%.o: $(NEXMON_ROOT)/patches/common/%.c
@printf "\033[0;31m COMPILING\033[0m %s => %s (details: log/compiler.log)\n" $< $@
$(Q)cat gen/nexmon.pre 2>>log/error.log | gawk '{ if ($$3 != "$@") print; }' > tmp && mv tmp gen/nexmon.pre
$(Q)$(CC)gcc $(CFLAGS) -c $< -o $@ >>log/compiler.log

obj/%.o: $(FW_PATH)/%.c
@printf "\033[0;31m COMPILING\033[0m %s => %s (details: log/compiler.log)\n" $< $@
$(Q)cat gen/nexmon.pre 2>>log/error.log | gawk '{ if ($$3 != "$@") print; }' > tmp && mv tmp gen/nexmon.pre
$(Q)$(CC)gcc $(CFLAGS) -c $< -o $@ >>log/compiler.log

gen/nexmon.ld: $(OBJS)
@printf "\033[0;31m GENERATING LINKER FILE\033[0m gen/nexmon.pre => %s\n" $@
$(Q)sort gen/nexmon.pre | gawk -f $(NEXMON_ROOT)/buildtools/scripts/nexmon.ld.awk > $@

gen/nexmon.mk: $(OBJS) $(FW_PATH)/definitions.mk
@printf "\033[0;31m GENERATING MAKE FILE\033[0m gen/nexmon.pre => %s\n" $@
$(Q)printf "$(RAM_FILE): gen/patch.elf FORCE\n" > $@
$(Q)sort gen/nexmon.pre | \
gawk -v src_file=gen/patch.elf -f $(NEXMON_ROOT)/buildtools/scripts/nexmon.mk.1.awk | \
gawk -v ramstart=$(RAMSTART) -f $(NEXMON_ROOT)/buildtools/scripts/nexmon.mk.2.awk >> $@
$(Q)printf "\nFORCE:\n" >> $@
$(Q)gawk '!a[$$0]++' $@ > tmp && mv tmp $@

gen/flashpatches.ld: $(OBJS)
@printf "\033[0;31m GENERATING LINKER FILE\033[0m gen/nexmon.pre => %s\n" $@
$(Q)sort gen/nexmon.pre | \
gawk -f $(NEXMON_ROOT)/buildtools/scripts/flashpatches.ld.awk > $@

gen/flashpatches.mk: $(OBJS) $(FW_PATH)/definitions.mk
@printf "\033[0;31m GENERATING MAKE FILE\033[0m gen/nexmon.pre => %s\n" $@
$(Q)cat gen/nexmon.pre | gawk \
-v fp_data_base=$(FP_DATA_BASE) \
-v fp_config_base=$(FP_CONFIG_BASE) \
-v fp_data_end_ptr=$(FP_DATA_END_PTR) \
-v fp_config_base_ptr_1=$(FP_CONFIG_BASE_PTR_1) \
-v fp_config_end_ptr_1=$(FP_CONFIG_END_PTR_1) \
-v fp_config_base_ptr_2=$(FP_CONFIG_BASE_PTR_2) \
-v fp_config_end_ptr_2=$(FP_CONFIG_END_PTR_2) \
-v ramstart=$(RAMSTART) \
-v out_file=$(RAM_FILE) \
-v src_file=gen/patch.elf \
-f $(NEXMON_ROOT)/buildtools/scripts/flashpatches.bcm43596.mk.awk > $@

gen/memory.ld: $(FW_PATH)/definitions.mk
@printf "\033[0;31m GENERATING LINKER FILE\033[0m %s\n" $@
$(Q)printf "rom : ORIGIN = 0x%08x, LENGTH = 0x%08x\n" $(ROMSTART) $(ROMSIZE) > $@
$(Q)printf "ram : ORIGIN = 0x%08x, LENGTH = 0x%08x\n" $(RAMSTART) $(RAMSIZE) >> $@
$(Q)printf "patch : ORIGIN = 0x%08x, LENGTH = 0x%08x\n" $(PATCHSTART) $(PATCHSIZE) >> $@
$(Q)printf "ucode : ORIGIN = 0x%08x, LENGTH = 0x%08x\n" $$(($(UCODESTART) - 4)) $$(($(PATCHSTART) - $(UCODESTART))) >> $@
$(Q)printf "fpconfig : ORIGIN = 0x%08x, LENGTH = 0x%08x\n" $(FP_CONFIG_BASE) $(FP_CONFIG_SIZE) >> $@

gen/patch.elf: patch.ld gen/nexmon.ld gen/flashpatches.ld gen/memory.ld $(OBJS)
@printf "\033[0;31m LINKING OBJECTS\033[0m => %s (details: log/linker.log, log/linker.err)\n" $@
$(Q)$(CC)ld -T $< -o $@ --gc-sections --print-gc-sections -M >>log/linker.log 2>>log/linker.err

$(RAM_FILE): init gen/patch.elf $(FW_PATH)/$(RAM_FILE) gen/nexmon.mk gen/flashpatches.mk
$(Q)cp $(FW_PATH)/$(RAM_FILE) $@
@printf "\033[0;31m APPLYING FLASHPATCHES\033[0m gen/flashpatches.mk => %s (details: log/flashpatches.log)\n" $@
$(Q)make -f gen/flashpatches.mk >>log/flashpatches.log 2>>log/flashpatches.log
@printf "\033[0;31m APPLYING PATCHES\033[0m gen/nexmon.mk => %s (details: log/patches.log)\n" $@
$(Q)make -f gen/nexmon.mk >>log/patches.log 2>>log/flashpatches.log

gen/dummy.idc: $(RAM_FILE)
@printf "\033[0;31m GENERATING IDC FILE\033[0m gen/nexmon.pre => %s\n" $@
$(Q)cat gen/nexmon.pre | gawk 'BEGIN { printf "#import <idc.idc>\n\nstatic main() {\n" } { if (!seen[$$0]++ && $$2 == "DUMMY") { printf "\tMakeName(%s,\"%s\");\n",$$1,$$4 }; } END { printf "}\n" }' > $@

###################################################################
# ucode compression related
###################################################################

gen/ucode.asm: $(FW_PATH)/ucode.bin
$(NEXMON_ROOT)/buildtools/b43/disassembler/b43-dasm $< $@ --arch 15 --format raw-le32
# $(NEXMON_ROOT)/buildtools/b43/debug/b43-beautifier --asmfile $@ --defs $(NEXMON_ROOT)/buildtools/b43/debug/include > tmp && mv tmp $@

ifneq ($(wildcard src/ucode.asm), )
gen/ucode.bin: src/ucode.asm
@printf "\033[0;31m ASSEMBLING UCODE\033[0m %s => %s\n" $< $@

ifneq ($(wildcard $(NEXMON_ROOT)/buildtools/b43/assembler/b43-asm.bin), )
$(Q)PATH=$(PATH):$(NEXMON_ROOT)/buildtools/b43/assembler $(NEXMON_ROOT)/buildtools/b43/assembler/b43-asm $< $@ --format raw-le32
else
$(error Warning: please compile b43-asm.bin first)
endif

else
gen/ucode.bin: $(FW_PATH)/ucode.bin
@printf "\033[0;31m COPYING UCODE\033[0m %s => %s\n" $< $@
$(Q)cp $< $@
endif

gen/ucode_compressed.bin: gen/ucode.bin
@printf "\033[0;31m COMPRESSING UCODE\033[0m %s => %s\n" $< $@
$(Q)cat $< | $(ZLIBFLATE) > $@

src/ucode_compressed.c: gen/ucode_compressed.bin
@printf "\033[0;31m GENERATING C FILE\033[0m %s => %s\n" $< $@
$(Q)printf "#pragma NEXMON targetregion \"ucode\"\n\n" > $@
$(Q)cd $(dir $<) && xxd -i $(notdir $<) >> $(shell pwd)/$@

src/templateram.c: $(FW_PATH)/templateram.bin
@printf "\033[0;31m GENERATING C FILE\033[0m %s => %s\n" $< $@
$(Q)printf "#pragma NEXMON targetregion \"ucode\"\n\n" > $@
$(Q)cd $(dir $<) && xxd -i $(notdir $<) >> $(shell pwd)/$@

###################################################################

check-nexmon-setup-env:
ifndef NEXMON_SETUP_ENV
$(error run 'source setup_env.sh' first in the repository\'s root directory)
endif

backup-firmware:
ifeq ($(shell uname -m),$(filter $(shell uname -m), armv6l armv7l aarch64))
cp /lib/firmware/brcm/$(RAM_FILE) $(RAM_FILE).orig
else
$(warning Warning: Cannot backup the original firmware on this arch.)
endif

install-firmware: $(RAM_FILE)
@printf "\033[0;31m REMOUNTING /vendor\033[0m\n"
$(Q)adb shell 'su -c "mount -o rw,remount /vendor"'
@printf "\033[0;31m COPYING TO PHONE\033[0m %s => /sdcard/%s\n" $< $<
$(Q)adb push $< /sdcard/ >> log/adb.log 2>> log/adb.log
@printf "\033[0;31m COPYING\033[0m /sdcard/$(RAM_FILE) => /vendor/firmware/$(RAM_FILE)\n"
$(Q)adb shell 'su -c "cp /sdcard/$(RAM_FILE) /vendor/firmware/$(RAM_FILE)"'
@printf "\033[0;31m RELOADING FIRMWARE\033[0m\n"
$(Q)adb shell 'su -c "ifconfig wlan0 down && ifconfig wlan0 up"'

clean-firmware: FORCE
@printf "\033[0;31m CLEANING\033[0m\n"
$(Q)rm -fr $(RAM_FILE) obj gen log src/ucode_compressed.c src/templateram.c ucode_compressed.bin

clean: clean-firmware
$(Q)rm -f BUILD_NUMBER

FORCE:
39 changes: 39 additions & 0 deletions patches/bcm43436b0/9_88_0_0/nexmon/include/brcm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/***************************************************************************
* *
* ########### ########### ########## ########## *
* ############ ############ ############ ############ *
* ## ## ## ## ## ## ## *
* ## ## ## ## ## ## ## *
* ########### #### ###### ## ## ## ## ###### *
* ########### #### # ## ## ## ## # # *
* ## ## ###### ## ## ## ## # # *
* ## ## # ## ## ## ## # # *
* ############ ##### ###### ## ## ## ##### ###### *
* ########### ########### ## ## ## ########## *
* *
* S E C U R E M O B I L E N E T W O R K I N G *
* *
* This file is part of NexMon. *
* *
* Copyright (c) 2016 NexMon Team *
* *
* NexMon is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* NexMon is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with NexMon. If not, see <http://www.gnu.org/licenses/>. *
* *
**************************************************************************/

#pragma once

#include "../include/types.h"
#define WL_CHANSPEC_CHAN_MASK 0x00ff
#define CHSPEC_CHANNEL(chspec) ((uint8_t)((chspec) & WL_CHANSPEC_CHAN_MASK))
Loading