Skip to content

Commit 2d9d3c9

Browse files
Merge pull request #11047 from functionpointer/nexus_xr
New target: Radiomaster Nexus X and Nexus XR
2 parents 341dec4 + 67b91a7 commit 2d9d3c9

File tree

16 files changed

+892
-604
lines changed

16 files changed

+892
-604
lines changed

cmake/at32-bootloader.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ main_sources(BOOTLOADER_SOURCES
2121
drivers/time.c
2222
drivers/timer.c
2323
drivers/flash_m25p16.c
24-
drivers/flash_w25n01g.c
24+
drivers/flash_w25n.c
2525
drivers/flash.c
2626

2727
fc/firmware_update_common.c

docs/Blackbox.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ These chips are also supported:
120120
* Winbond W25Q64 - 64 Mbit / 8 MByte
121121
* Micron N25Q0128 - 128 Mbit / 16 MByte
122122
* Winbond W25Q128 - 128 Mbit / 16 MByte
123+
* Winbond W25N01 - 1 Gbit / 128 MByte
124+
* Winbond W25N02 - 2 Gbit / 256 MByte
123125

124126
#### Enable recording to dataflash
125127
On the Configurator's CLI tab, you must enter `set blackbox_device=SPIFLASH` to switch to logging to an onboard dataflash chip, then save.

src/main/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ main_sources(COMMON_SRC
179179
drivers/flash.h
180180
drivers/flash_m25p16.c
181181
drivers/flash_m25p16.h
182-
drivers/flash_w25n01g.c
183-
drivers/flash_w25n01g.h
182+
drivers/flash_w25n.c
183+
drivers/flash_w25n.h
184184
drivers/gimbal_common.h
185185
drivers/gimbal_common.c
186186
drivers/headtracker_common.h

src/main/drivers/bus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ typedef enum {
142142
DEVHW_MS4525, // Pitot meter
143143
DEVHW_DLVR, // Pitot meter
144144
DEVHW_M25P16, // SPI NOR flash
145-
DEVHW_W25N01G, // SPI 128MB flash
145+
DEVHW_W25N, // SPI 128MB or 256MB flash from Winbond W25N family
146146
DEVHW_UG2864, // I2C OLED display
147147
DEVHW_SDCARD, // Generic SD-Card
148148
DEVHW_IRLOCK, // IR-Lock visual positioning hardware

src/main/drivers/flash.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#include "flash.h"
3232
#include "flash_m25p16.h"
33-
#include "flash_w25n01g.h"
33+
#include "flash_w25n.h"
3434

3535
#include "common/time.h"
3636

@@ -56,17 +56,17 @@ static flashDriver_t flashDrivers[] = {
5656
},
5757
#endif
5858

59-
#ifdef USE_FLASH_W25N01G
59+
#if defined(USE_FLASH_W25N01G) || defined(USE_FLASH_W25N02K)
6060
{
61-
.init = w25n01g_init,
62-
.isReady = w25n01g_isReady,
63-
.waitForReady = w25n01g_waitForReady,
64-
.eraseSector = w25n01g_eraseSector,
65-
.eraseCompletely = w25n01g_eraseCompletely,
66-
.pageProgram = w25n01g_pageProgram,
67-
.readBytes = w25n01g_readBytes,
68-
.getGeometry = w25n01g_getGeometry,
69-
.flush = w25n01g_flush
61+
.init = w25n_init,
62+
.isReady = w25n_isReady,
63+
.waitForReady = w25n_waitForReady,
64+
.eraseSector = w25n_eraseSector,
65+
.eraseCompletely = w25n_eraseCompletely,
66+
.pageProgram = w25n_pageProgram,
67+
.readBytes = w25n_readBytes,
68+
.getGeometry = w25n_getGeometry,
69+
.flush = w25n_flush
7070
},
7171
#endif
7272

0 commit comments

Comments
 (0)