Added Adafruit Feather RP2040, Adafruit KB2040 and Added neopixel driver to support RP2040
This commit is contained in:
parent
4285274c31
commit
0c3db448bb
32
Documentation/components/drivers/character/ws2812.rst
Normal file
32
Documentation/components/drivers/character/ws2812.rst
Normal file
@ -0,0 +1,32 @@
|
||||
===========
|
||||
ws2812 Drivers
|
||||
===========
|
||||
|
||||
This driver allows control of any smart pixels that use the ws2812
|
||||
protocol. It supports pixel chains that use normal RGB pixels or
|
||||
newer RGBW pixels.
|
||||
|
||||
The current driver does not support mixed RGB and RGBW pixels in a
|
||||
single chain.
|
||||
|
||||
The NuttX ws2812 driver is split into two parts:
|
||||
|
||||
#. An "upper half", generic driver that provides the common
|
||||
interface to application level code, and
|
||||
#. A "lower half", platform-specific driver that implements the
|
||||
low-level formatting and output.
|
||||
|
||||
Files supporting ws2812 can be found in the following locations:
|
||||
|
||||
- **Interface Definition**. The header file for the NuttX ws2812
|
||||
driver reside at ``include/nuttx/leds/ws2812.h``. This header
|
||||
file includes both the application level interface to the ws2812
|
||||
driver as well as the interface between the "upper half" and
|
||||
"lower half" drivers. The ws2812 module uses a standard character
|
||||
driver framework.
|
||||
- **"Upper Half" Driver**. The generic, "upper half" ws2812 driver
|
||||
resides at ``drivers/leds/ws2812.c``.
|
||||
- **"Lower Half" Drivers**. Platform-specific ws2812 drivers reside
|
||||
in ``arch/``\ *<architecture>*\ ``/src/``\ *<hardware>*
|
||||
directory for the specific processor *<architecture>* and for
|
||||
the specific *<chip>* ws2812 peripheral devices.
|
2
Kconfig
2
Kconfig
@ -1220,7 +1220,7 @@ endif # DEBUG_LCD
|
||||
config DEBUG_LEDS
|
||||
bool "Low-level LED Debug Features"
|
||||
default n
|
||||
depends on ARCH_HAVE_LEDS
|
||||
depends on ARCH_HAVE_LEDS || WS2812
|
||||
---help---
|
||||
Enable LED driver debug features.
|
||||
|
||||
|
@ -141,7 +141,7 @@ config RP2040_I2C_DRIVER
|
||||
|
||||
endif
|
||||
|
||||
config RP2040_PWM
|
||||
menuconfig RP2040_PWM
|
||||
bool "PWM"
|
||||
select PWM
|
||||
---help---
|
||||
@ -210,7 +210,7 @@ config PWM_MULTICHAN
|
||||
drives GPIO pin 13 or 29 with the B channel.
|
||||
|
||||
config RP2040_PWM7
|
||||
bool "PWM7 (Pin 14 and 15)"
|
||||
bool "PWM7"
|
||||
---help---
|
||||
Drives GPIO pin 14 with the A channel, and
|
||||
drives GPIO pin 15 with the B channel.
|
||||
@ -281,3 +281,14 @@ config RP2040_SPISD_SPI_CH
|
||||
Select spi channel number to use spi sd card.
|
||||
|
||||
endif # SPISD Configuration
|
||||
|
||||
config RP2040_BOARD_HAS_WS2812
|
||||
bool "Has ws2812 pixels"
|
||||
default n
|
||||
depends on WS2812
|
||||
|
||||
menuconfig RP2040_WS2812_GPIO_PIN
|
||||
int "GPIO pin for ws2812 pixels"
|
||||
default 0
|
||||
range 0 29
|
||||
depends on RP2040_BOARD_HAS_WS2812
|
||||
|
@ -66,6 +66,10 @@ ifeq ($(CONFIG_USBDEV),y)
|
||||
CHIP_CSRCS += rp2040_usbdev.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WS2812),y)
|
||||
CHIP_CSRCS += rp2040_ws2812.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RP2040_FLASH_BOOT),y)
|
||||
ifneq ($(PICO_SDK_PATH),)
|
||||
include chip/boot2/Make.defs
|
||||
|
@ -372,7 +372,7 @@ void rp2040_rxdmasetup(DMA_HANDLE handle, uintptr_t paddr, uintptr_t maddr,
|
||||
* Name: rp2040_txdmasetup
|
||||
*
|
||||
* Description:
|
||||
* Configure an TX (memory-to-memory) DMA before starting the transfer.
|
||||
* Configure an TX (memory-to-peripheral) DMA before starting the transfer.
|
||||
*
|
||||
* Input Parameters:
|
||||
* paddr - Peripheral address (destination)
|
||||
|
@ -207,7 +207,7 @@ void rp2040_rxdmasetup(DMA_HANDLE handle, uintptr_t paddr, uintptr_t maddr,
|
||||
* Name: rp2040_txdmasetup
|
||||
*
|
||||
* Description:
|
||||
* Configure an TX (memory-to-memory) DMA before starting the transfer.
|
||||
* Configure an TX (memory-to-peripheral) DMA before starting the transfer.
|
||||
*
|
||||
* Input Parameters:
|
||||
* paddr - Peripheral address (destination)
|
||||
|
635
arch/arm/src/rp2040/rp2040_ws2812.c
Normal file
635
arch/arm/src/rp2040/rp2040_ws2812.c
Normal file
@ -0,0 +1,635 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/rp2040/rp2040_ws2812.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <rp2040_ws2812.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/leds/ws2812.h>
|
||||
|
||||
#include <rp2040_pio.h>
|
||||
|
||||
#ifdef CONFIG_WS2812
|
||||
|
||||
/****************************************************************************
|
||||
* Private Type Definitions
|
||||
****************************************************************************/
|
||||
|
||||
struct instance
|
||||
{
|
||||
uint32_t pio; /* The pio instance we are using. */
|
||||
uint32_t pio_location; /* the program location in the pio. */
|
||||
uint32_t pio_sm; /* The state machine we are using. */
|
||||
FAR uint8_t *pixels; /* Buffer to hold pixels */
|
||||
size_t open_count; /* Number of opens on this instance. */
|
||||
clock_t last_dma; /* when last DMA completed. */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static const uint16_t ws2812_program_instructions[] =
|
||||
{
|
||||
0x6221, /* 0: out x, 1 side 0 [2] <-- wrap target */
|
||||
0x1123, /* 1: jmp !x, 3 side 1 [1] */
|
||||
0x1400, /* 2: jmp 0 side 1 [4] */
|
||||
0xa442, /* 3: nop side 0 [4] --> wrap */
|
||||
};
|
||||
|
||||
static const struct rp2040_pio_program pio_program =
|
||||
{
|
||||
.instructions = ws2812_program_instructions,
|
||||
.length = 4,
|
||||
.origin = -1,
|
||||
};
|
||||
|
||||
#define ws2812_wrap_target 0
|
||||
#define ws2812_wrap 3
|
||||
|
||||
#define ws2812_T1 2
|
||||
#define ws2812_T2 5
|
||||
#define ws2812_T3 3
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: dma_complete
|
||||
*
|
||||
* Description:
|
||||
* Called on completion of the DMA transfer.
|
||||
*
|
||||
* Input Parameters:
|
||||
* handle - handle to our DMA channel
|
||||
* status - status of the transfer
|
||||
* arg - Pointer to drivers private data structure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void dma_complete(DMA_HANDLE handle, uint8_t status, void *arg)
|
||||
{
|
||||
FAR struct ws2812_dev_s *dev_data = arg;
|
||||
FAR struct instance *priv = (FAR struct instance *)
|
||||
dev_data->private;
|
||||
|
||||
rp2040_dmafree(handle);
|
||||
|
||||
priv->last_dma = clock_systime_ticks();
|
||||
|
||||
nxsem_post(&dev_data->exclsem);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: update_pixels
|
||||
*
|
||||
* Description:
|
||||
* This thread manages the actual update of pixels.
|
||||
*
|
||||
* Input Parameters:
|
||||
* dev_data - Pointer to drivers device data structure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void update_pixels(FAR struct ws2812_dev_s *dev_data)
|
||||
{
|
||||
FAR struct instance *priv = (FAR struct instance *)
|
||||
dev_data->private;
|
||||
clock_t time_delta;
|
||||
DMA_HANDLE dma_handle = rp2040_dmachannel();
|
||||
dma_config_t dma_config =
|
||||
{
|
||||
.dreq = rp2040_pio_get_dreq(priv->pio, priv->pio_sm, true),
|
||||
.size = RP2040_DMA_SIZE_WORD,
|
||||
.noincr = false
|
||||
};
|
||||
|
||||
rp2040_txdmasetup(dma_handle,
|
||||
(uintptr_t) RP2040_PIO_TXF(priv->pio, priv->pio_sm),
|
||||
(uintptr_t) priv->pixels,
|
||||
4 * dev_data->nleds,
|
||||
dma_config);
|
||||
|
||||
/* Make sure at least 50us elapsed since last DMA completed. */
|
||||
|
||||
time_delta = (clock_systime_ticks() - priv->last_dma)
|
||||
* CONFIG_USEC_PER_TICK;
|
||||
|
||||
if (time_delta < 50)
|
||||
{
|
||||
usleep(50 - time_delta);
|
||||
}
|
||||
|
||||
rp2040_dmastart(dma_handle, dma_complete, dev_data);
|
||||
|
||||
/* NOTE: we don't post exclsem here, the dma_complete does that */
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: my_open
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* Input Parameters:
|
||||
* dev_data - Pointer to a ws2812_dev_s
|
||||
*
|
||||
* Returned Value:
|
||||
* A pointer to an internal structure used by rp2040_ws2812
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int my_open(FAR struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ws2812_dev_s *dev_data = inode->i_private;
|
||||
FAR struct instance *priv;
|
||||
rp2040_pio_sm_config config;
|
||||
int divisor;
|
||||
int ret;
|
||||
|
||||
nxsem_wait(&dev_data->exclsem);
|
||||
|
||||
if (dev_data->private != NULL)
|
||||
{
|
||||
/* We've already been initialized. Keep on truckin' */
|
||||
|
||||
ledinfo("rp2040_ws2812 re-open dev: 0x%08lX\n", (uint32_t) dev_data);
|
||||
|
||||
priv = (FAR struct instance *) dev_data->private;
|
||||
priv->open_count += 1;
|
||||
|
||||
ret = OK;
|
||||
goto post_and_return;
|
||||
}
|
||||
|
||||
ledinfo("rp2040_ws2812 open dev: 0x%08lX\n", (uint32_t) dev_data);
|
||||
|
||||
/* Allocate struct holding out persistent data */
|
||||
|
||||
priv = kmm_zalloc(sizeof(struct instance));
|
||||
|
||||
if (priv == NULL)
|
||||
{
|
||||
lederr("rp2040_ws2812 open: out of memory\n");
|
||||
|
||||
ret = -ENOMEM;
|
||||
goto post_and_return;
|
||||
}
|
||||
|
||||
priv->open_count = 1;
|
||||
|
||||
/* Allocate the pixel buffer */
|
||||
|
||||
priv->pixels = kmm_zalloc(4 * dev_data->nleds);
|
||||
|
||||
if (priv->pixels == NULL)
|
||||
{
|
||||
kmm_free(priv);
|
||||
lederr("rp2040_ws2812 open: out of memory\n");
|
||||
|
||||
ret = -ENOMEM;
|
||||
goto post_and_return;
|
||||
}
|
||||
|
||||
dev_data->private = priv;
|
||||
|
||||
/* ==== Load the pio program ==== */
|
||||
|
||||
/* get pio instance and load program */
|
||||
|
||||
for (priv->pio = 0; priv->pio < RP2040_PIO_NUM; ++priv->pio)
|
||||
{
|
||||
/* Try to claim a state machine */
|
||||
|
||||
priv->pio_sm = rp2040_pio_claim_unused_sm(priv->pio, false);
|
||||
|
||||
/* If we did not get one try the nest pio block, if any */
|
||||
|
||||
if (priv->pio_sm < 0) continue;
|
||||
|
||||
/* See if we have space in this block to load our program */
|
||||
|
||||
if (rp2040_pio_can_add_program(priv->pio, &pio_program))
|
||||
{
|
||||
/* Great! load the program and exit the pio choice loop */
|
||||
|
||||
priv->pio_location = rp2040_pio_add_program(priv->pio,
|
||||
&pio_program);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/* Oops -- no room at the inn! Release sm and try next pio */
|
||||
|
||||
rp2040_pio_sm_unclaim(priv->pio, priv->pio_sm);
|
||||
}
|
||||
|
||||
if (priv->pio >= RP2040_PIO_NUM)
|
||||
{
|
||||
kmm_free(priv->pixels);
|
||||
|
||||
dev_data->private = NULL;
|
||||
kmm_free(priv);
|
||||
|
||||
ret = -ENOMEM;
|
||||
goto post_and_return;
|
||||
}
|
||||
|
||||
/* ==== configure the pio state machine ==== */
|
||||
|
||||
/* Configure our pin as used by PIO for output */
|
||||
|
||||
rp2040_pio_gpio_init(priv->pio, dev_data->port);
|
||||
|
||||
rp2040_pio_sm_set_consecutive_pindirs(priv->pio,
|
||||
priv->pio_sm,
|
||||
dev_data->port,
|
||||
1,
|
||||
true);
|
||||
|
||||
/* Initialize the config structure */
|
||||
|
||||
memset(&config, 1, sizeof(rp2040_pio_sm_config));
|
||||
|
||||
/* Set the clock divisor as appropriate for our system clock speed
|
||||
* so the pio clock rus at nine time the requested bit clock rate
|
||||
*/
|
||||
|
||||
divisor = ((uint64_t)BOARD_SYS_FREQ << 8)
|
||||
/ (9 * (uint64_t)dev_data->clock);
|
||||
|
||||
rp2040_sm_config_set_clkdiv_int_frac(&config,
|
||||
divisor >> 8,
|
||||
divisor & 0xff);
|
||||
|
||||
/* Set the wrap points as required by the program */
|
||||
|
||||
rp2040_sm_config_set_wrap(&config,
|
||||
priv->pio_location + ws2812_wrap_target,
|
||||
priv->pio_location + ws2812_wrap);
|
||||
|
||||
/* set to shift out 24 or 32 bits depending on has_white. */
|
||||
|
||||
rp2040_sm_config_set_out_shift(&config,
|
||||
false,
|
||||
true,
|
||||
dev_data->has_white ? 32 : 24);
|
||||
|
||||
/* Configure a single mandatory side-set pin */
|
||||
|
||||
rp2040_sm_config_set_sideset(&config, 1, false, false);
|
||||
|
||||
/* Since we don't need an RX fifo, well make a bit TX fifo */
|
||||
|
||||
rp2040_sm_config_set_fifo_join(&config,
|
||||
RP2040_PIO_FIFO_JOIN_TX);
|
||||
|
||||
/* Configure a single mandatory side-set pin */
|
||||
|
||||
rp2040_sm_config_set_sideset(&config, 1, false, false);
|
||||
|
||||
/* Configure our chosen GPIO pin (in "port") as side-set output */
|
||||
|
||||
rp2040_sm_config_set_sideset_pins(&config, dev_data->port);
|
||||
|
||||
/* Load the configuration into the state machine. */
|
||||
|
||||
rp2040_pio_sm_init(priv->pio,
|
||||
priv->pio_sm,
|
||||
priv->pio_location,
|
||||
&config);
|
||||
|
||||
/* Enable the state machine */
|
||||
|
||||
rp2040_pio_sm_set_enabled(priv->pio, priv->pio_sm, true);
|
||||
|
||||
ret = OK;
|
||||
|
||||
post_and_return:
|
||||
nxsem_post(&dev_data->exclsem);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: my_close
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* Input Parameters:
|
||||
* dev_data - Pointer to a ws2812_dev_s
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int my_close(FAR struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ws2812_dev_s *dev_data = inode->i_private;
|
||||
FAR struct instance *priv = (FAR struct instance *)
|
||||
dev_data->private;
|
||||
|
||||
nxsem_wait(&dev_data->exclsem);
|
||||
|
||||
ledinfo("rp2040_ws2812 close dev: 0x%08lX\n", (uint32_t) dev_data);
|
||||
|
||||
priv->open_count -= 1;
|
||||
|
||||
nxsem_post(&dev_data->exclsem);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: my_write
|
||||
* Description:
|
||||
* Updates the ws2812s with new data.
|
||||
*
|
||||
* Input Parameter:
|
||||
* filep - Pointer system file data
|
||||
* data - Data to send.
|
||||
* len - Length of data in bytes.
|
||||
*
|
||||
* Returned Value:
|
||||
* number of bytes written on success, ERROR if write fails.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static ssize_t my_write(FAR struct file *filep,
|
||||
FAR const char *data,
|
||||
size_t len)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ws2812_dev_s *dev_data = inode->i_private;
|
||||
FAR struct instance *priv = (FAR struct instance *)
|
||||
dev_data->private;
|
||||
int position = filep->f_pos;
|
||||
FAR uint8_t *xfer_p = priv->pixels + position;
|
||||
int xfer_index = 0;
|
||||
|
||||
if (data == NULL)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
nxsem_wait(&dev_data->exclsem);
|
||||
|
||||
ledinfo("rp2040_ws2812 write dev: 0x%08lX\n", (uint32_t) dev_data);
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
/* Copy the data to the buffer swapping the
|
||||
* red and green, since ws2812 use a GRB order
|
||||
* instead of RGB
|
||||
*/
|
||||
|
||||
for (xfer_index = 0; xfer_index < len; xfer_index += 4)
|
||||
{
|
||||
/* Stop transfer at end of pixel buffer */
|
||||
|
||||
if (position >= (4 * dev_data->nleds))
|
||||
{
|
||||
ledinfo("rp2040_ws2812 write off end: %d\n", position);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Copy swapping WWRRGGBB to GGRRBBWW */
|
||||
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
xfer_p[3] = *data++;
|
||||
xfer_p[1] = *data++;
|
||||
xfer_p[0] = *data++;
|
||||
xfer_p[2] = *data++;
|
||||
#else /* CONFIG_BIG_ENDIAN */
|
||||
xfer_p[1] = *data++;
|
||||
xfer_p[3] = *data++;
|
||||
xfer_p[2] = *data++;
|
||||
xfer_p[0] = *data++;
|
||||
#endif /* CONFIG_BIG_ENDIAN */
|
||||
|
||||
xfer_p += 4;
|
||||
position += 4;
|
||||
}
|
||||
|
||||
filep->f_pos = position;
|
||||
}
|
||||
|
||||
update_pixels(dev_data);
|
||||
|
||||
/* NOTE: we don't post exclsem here, so update_pixels must make sure
|
||||
* that happens.
|
||||
*/
|
||||
|
||||
return xfer_index;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: my_read
|
||||
* Description:
|
||||
* Reads data back from the pixel buffer.
|
||||
*
|
||||
* Input Parameter:
|
||||
* filep - Pointer system file data
|
||||
* data - Buffer for return data.
|
||||
* len - Length of data in bytes.
|
||||
*
|
||||
* Returned Value:
|
||||
* number of bytes read on success, ERROR if write fails.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static ssize_t my_read(FAR struct file *filep,
|
||||
FAR char *data,
|
||||
size_t len)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ws2812_dev_s *dev_data = inode->i_private;
|
||||
FAR struct instance *priv = (FAR struct instance *)
|
||||
dev_data->private;
|
||||
int position = filep->f_pos;
|
||||
FAR uint8_t *xfer_p = priv->pixels + position;
|
||||
int xfer_index = 0;
|
||||
|
||||
if (data == NULL || len == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
nxsem_wait(&dev_data->exclsem);
|
||||
|
||||
/* Copy the data from the buffer swapping the
|
||||
* red and green, since ws2812 use a GRB order
|
||||
* instead of RGB
|
||||
*/
|
||||
|
||||
for (xfer_index = 0; xfer_index < len; xfer_index += 4)
|
||||
{
|
||||
/* Stop transfer at end of pixel buffer */
|
||||
|
||||
if (position >= (4 * dev_data->nleds))
|
||||
{
|
||||
ledinfo("rp2040_ws2812 read off end: %d\n", position);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Copy swapping GGRRBBWW to WWRRGGBB */
|
||||
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
*data++ = xfer_p[3];
|
||||
*data++ = xfer_p[1];
|
||||
*data++ = xfer_p[0];
|
||||
*data++ = xfer_p[2];
|
||||
#else /* CONFIG_BIG_ENDIAN */
|
||||
*data++ = xfer_p[1];
|
||||
*data++ = xfer_p[3];
|
||||
*data++ = xfer_p[2];
|
||||
*data++ = xfer_p[0];
|
||||
#endif /* CONFIG_BIG_ENDIAN */
|
||||
|
||||
xfer_p += 4;
|
||||
position += 4;
|
||||
}
|
||||
|
||||
filep->f_pos = position;
|
||||
|
||||
nxsem_wait(&dev_data->exclsem);
|
||||
|
||||
return xfer_index;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_ws2812_setup
|
||||
*
|
||||
* Description:
|
||||
* Initialize and register the ws2812 driver.
|
||||
*
|
||||
* Input Parameters:
|
||||
* Path to the ws2812 device (e.g. "/dev/leds0")
|
||||
* Port number for the ws2812 chain
|
||||
* The number of pixels in the chain
|
||||
* Whether ws2812s have white LEDs
|
||||
*
|
||||
* Returned Value:
|
||||
* An opaque pointer that can be passed to rp2040_ws2812_teardown on
|
||||
* success or NULL (with errno set) on failure
|
||||
****************************************************************************/
|
||||
|
||||
FAR void * rp2040_ws2812_setup(FAR const char *path,
|
||||
int port,
|
||||
uint16_t pixel_count,
|
||||
bool has_white)
|
||||
{
|
||||
FAR struct ws2812_dev_s * dev_data;
|
||||
int err;
|
||||
|
||||
dev_data = kmm_zalloc(sizeof(struct ws2812_dev_s));
|
||||
|
||||
if (dev_data == NULL)
|
||||
{
|
||||
set_errno(ENOMEM);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dev_data->open = my_open;
|
||||
dev_data->close = my_close;
|
||||
dev_data->write = my_write;
|
||||
dev_data->read = my_read;
|
||||
dev_data->port = port;
|
||||
dev_data->nleds = pixel_count;
|
||||
dev_data->clock = CONFIG_WS2812_FREQUENCY;
|
||||
|
||||
nxsem_init(&dev_data->exclsem, 0, 1);
|
||||
|
||||
ledinfo("register dev_data: 0x%08lX\n", (uint32_t) dev_data);
|
||||
|
||||
err = ws2812_register(path, dev_data);
|
||||
|
||||
if (err != OK)
|
||||
{
|
||||
set_errno(err);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (void *)dev_data;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_ws2812_release
|
||||
*
|
||||
* Description:
|
||||
* This function releases the internal memory structures created when
|
||||
* a driver is opened. It will fail with an error -EBUSY the driver
|
||||
* is opened.
|
||||
*
|
||||
* Input Parameters:
|
||||
* driver - Opaque pointer returned by rp2040_ws2812_setup.
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success or an ERROR on failure
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int rp2040_ws2812_release(FAR void * driver)
|
||||
{
|
||||
FAR struct ws2812_dev_s *dev_data = driver;
|
||||
FAR struct instance *priv = (FAR struct instance *)
|
||||
dev_data->private;
|
||||
|
||||
int ret = OK;
|
||||
|
||||
nxsem_wait(&dev_data->exclsem);
|
||||
|
||||
if (priv->open_count == 0)
|
||||
{
|
||||
dev_data->private = NULL;
|
||||
|
||||
rp2040_pio_sm_set_enabled(priv->pio, priv->pio_sm, false);
|
||||
rp2040_pio_sm_unclaim(priv->pio, priv->pio_sm);
|
||||
|
||||
nxsem_post(&dev_data->exclsem);
|
||||
|
||||
kmm_free(priv->pixels);
|
||||
kmm_free(priv);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = -EBUSY;
|
||||
nxsem_post(&dev_data->exclsem);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_WS2812 */
|
95
arch/arm/src/rp2040/rp2040_ws2812.h
Normal file
95
arch/arm/src/rp2040/rp2040_ws2812.h
Normal file
@ -0,0 +1,95 @@
|
||||
/****************************************************************************
|
||||
* arch/arm/src/rp2040/rp2040_ws2812.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_ARM_SRC_RP2040_RP2040_WS2812_H
|
||||
#define __ARCH_ARM_SRC_RP2040_RP2040_WS2812_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <debug.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WS2812
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_ws2812_setup
|
||||
*
|
||||
* Description:
|
||||
* Initialize and register the ws2812 driver.
|
||||
*
|
||||
* Input Parameters:
|
||||
* Path to the ws2812 device (e.g. "/dev/leds0")
|
||||
* Port number for the ws2812 chain
|
||||
* The number of pixels in the chain
|
||||
* Whether ws2812s have white LEDs
|
||||
*
|
||||
* Returned Value:
|
||||
* An opaque pointer that can be passed to rp2040_ws2812_teardown on
|
||||
* success or NULL (with errno set) on failure
|
||||
****************************************************************************/
|
||||
|
||||
FAR void * rp2040_ws2812_setup(FAR const char *path,
|
||||
int port,
|
||||
uint16_t pixel_count,
|
||||
bool has_white);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_ws2812_release
|
||||
*
|
||||
* Description:
|
||||
* This function releases the internal memory structures created when
|
||||
* a driver is opened. It will fail with an error -EBUSY the driver
|
||||
* is open when it is called.
|
||||
*
|
||||
* Input Parameters:
|
||||
* driver - Opaque pointer returned by rp2040_ws2812_setup.
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success or an ERROR on failure
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int rp2040_ws2812_release(FAR void * driver);
|
||||
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_ARM_SRC_RP2040_RP2040_I2C_H */
|
46
arch/arm/src/rp2040/rp2040_ws2812.pio
Normal file
46
arch/arm/src/rp2040/rp2040_ws2812.pio
Normal file
@ -0,0 +1,46 @@
|
||||
; arch/arm/src/rp2040/rp2040_ws2812.pio
|
||||
;
|
||||
; Adapted from code release under the BSD-3-Clause license
|
||||
; supplied by Raspberry Pi (Trading) Ltd.
|
||||
;
|
||||
; Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
|
||||
;
|
||||
; This code was compiled with pioasm and the results included
|
||||
; in "arch/arm/src/rp2040/rp2040_ws2812.c". This file is
|
||||
; supplied for documentation purposes only
|
||||
;
|
||||
; Each bit of the input word generaes one of two patterns for output:
|
||||
;
|
||||
; clock +-----+-----+-----+-----+-----+-----+-----+-----+-----+
|
||||
| | T1 | T2 | T3 |
|
||||
;
|
||||
; +-----------+
|
||||
; zero-bit | | |
|
||||
; +-----------------------------------------+
|
||||
;
|
||||
; +-----------------------------------+
|
||||
; one-bit | | |
|
||||
; +-----------------+
|
||||
;
|
||||
; Each clock tick should be ~ 139 nS (7.2 Mhz)
|
||||
;
|
||||
; A zero bit is 0.278 µs high and 1.123 µs low.
|
||||
; A one bit is 0.973 µs high and 0.417 µs low.
|
||||
|
||||
;
|
||||
.program ws2812
|
||||
.side_set 1
|
||||
|
||||
.define public T1 2
|
||||
.define public T2 5
|
||||
.define public T3 3
|
||||
|
||||
.wrap_target
|
||||
bitloop:
|
||||
out x, 1 side 0 [T3 - 1] ; Side-set still takes place when instruction stalls
|
||||
jmp !x do_zero side 1 [T1 - 1] ; Branch on the bit we shifted out. Positive pulse
|
||||
do_one:
|
||||
jmp bitloop side 1 [T2 - 1] ; Continue driving high, for a long pulse
|
||||
do_zero:
|
||||
nop side 0 [T2 - 1] ; Or drive low, for a short pulse
|
||||
.wrap
|
@ -1472,6 +1472,20 @@ config ARCH_BOARD_PIMORONI_TINY2040
|
||||
Support is derived from Raspberry Pi Pico support.
|
||||
STATUS: Work has just began on this port.
|
||||
|
||||
config ARCH_BOARD_ADAFRUIT_FEATHER_RP2040
|
||||
bool "Adafruit Feather RP2040 board"
|
||||
depends on ARCH_CHIP_RP2040
|
||||
---help---
|
||||
This is a port to the Adafruit Feather RP2040 board.
|
||||
Support is derived from Raspberry Pi Pico support.
|
||||
|
||||
config ARCH_BOARD_ADAFRUIT_KB2040
|
||||
bool "Adafruit KB2040 board"
|
||||
depends on ARCH_CHIP_RP2040
|
||||
---help---
|
||||
This is a port to the Adafruit KB2040 board.
|
||||
Support is derived from Raspberry Pi Pico support.
|
||||
|
||||
config ARCH_BOARD_RX65N
|
||||
bool "RX65N renesas board"
|
||||
depends on ARCH_CHIP_R5F565NEDDFC
|
||||
@ -2602,6 +2616,8 @@ config ARCH_BOARD
|
||||
default "intel64-qemu" if ARCH_BOARD_INTEL64_QEMU
|
||||
default "raspberrypi-pico" if ARCH_BOARD_RASPBERRYPI_PICO
|
||||
default "pimoroni-tiny2040" if ARCH_BOARD_PIMORONI_TINY2040
|
||||
default "adafruit-feather-rp2040" if ARCH_BOARD_ADAFRUIT_FEATHER_RP2040
|
||||
default "adafruit-kb2040" if ARCH_BOARD_ADAFRUIT_KB2040
|
||||
default "rx65n" if ARCH_BOARD_RX65N
|
||||
default "rx65n-rsk1mb" if ARCH_BOARD_RX65N_RSK1MB
|
||||
default "rx65n-rsk2mb" if ARCH_BOARD_RX65N_RSK2MB
|
||||
@ -2935,6 +2951,12 @@ endif
|
||||
if ARCH_BOARD_PIMORONI_TINY2040
|
||||
source "boards/arm/rp2040/pimoroni-tiny2040/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_ADAFRUIT_FEATHER_RP2040
|
||||
source "boards/arm/rp2040/adafruit-feather-rp2040/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_ADAFRUIT_KB2040
|
||||
source "boards/arm/rp2040/adafruit-kb2040/Kconfig"
|
||||
endif
|
||||
if ARCH_BOARD_ARDUINO_DUE
|
||||
source "boards/arm/sam34/arduino-due/Kconfig"
|
||||
endif
|
||||
|
342
boards/arm/rp2040/adafruit-feather-rp2040/Kconfig
Normal file
342
boards/arm/rp2040/adafruit-feather-rp2040/Kconfig
Normal file
@ -0,0 +1,342 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
if ARCH_BOARD_ADAFRUIT_FEATHER_RP2040
|
||||
|
||||
config RP2040_FLASH_BOOT
|
||||
bool "flash boot"
|
||||
default y
|
||||
---help---
|
||||
If y, the built binary can be used for flash boot.
|
||||
If not, the binary is for SRAM boot.
|
||||
|
||||
config RP2040_FLASH_CHIP
|
||||
string "flash chip name"
|
||||
default "w25q080"
|
||||
---help---
|
||||
Name of NOR flash device connected to RP2040 SoC.
|
||||
(Used to choose the secondary boot loader.)
|
||||
Basically this option should not be changed.
|
||||
|
||||
config RP2040_UF2_BINARY
|
||||
bool "uf2 binary format"
|
||||
default y
|
||||
---help---
|
||||
Create nuttx.uf2 binary format used on RP2040 based arch.
|
||||
|
||||
config RP2040_UART0_GPIO
|
||||
int "UART0 GPIO pin assign (0,12,28 or -1:no assign)"
|
||||
default 0
|
||||
range -1 29
|
||||
depends on RP2040_UART0
|
||||
|
||||
config RP2040_UART1_GPIO
|
||||
int "UART1 GPIO pin assign (8,20,24 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_UART1
|
||||
|
||||
config RP2040_I2C0_GPIO
|
||||
int "I2C0 GPIO pin assign (0,8,12,20,24,28 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_I2C0
|
||||
|
||||
config RP2040_I2C1_GPIO
|
||||
int "I2C1 GPIO pin assign (2,6,10,18,26 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_I2C1
|
||||
|
||||
if RP2040_PWM0
|
||||
config RP2040_PWM0A_GPIO
|
||||
int "PWM0 channel 1 GPIO pin assign (0 or -1:no assign)"
|
||||
default 0
|
||||
range -1 16
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 0 or 16, any other value disables the output.
|
||||
|
||||
config RP2040_PWM0A_INVERT
|
||||
bool "PWM0 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM0B_GPIO
|
||||
int "PWM0 channel 2 GPIO pin assign (1 or -1:no assign)"
|
||||
default 1
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 1 or 17, any other value disables the output.
|
||||
|
||||
config RP2040_PWM0B_INVERT
|
||||
bool "PWM0 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM0_PHASE_CORRECT
|
||||
bool "PWM0 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM1
|
||||
config RP2040_PWM1A_GPIO
|
||||
int "PWM1 channel 1 GPIO pin assign (2, 18 or -1:no assign)"
|
||||
default 2
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 2 or 18, any other value disables the output.
|
||||
|
||||
config RP2040_PWM1A_INVERT
|
||||
bool "PWM1 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM1B_GPIO
|
||||
int "PWM1 channel 2 GPIO pin assign (3, 19 or -1:no assign)"
|
||||
default 3
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 3 or 19, any other value disables the output.
|
||||
|
||||
config RP2040_PWM1B_INVERT
|
||||
bool "PWM1 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM1_PHASE_CORRECT
|
||||
bool "PWM1 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM2
|
||||
config RP2040_PWM2A_GPIO
|
||||
int "PWM2 channel 1 GPIO pin assign (20 or -1:no assign)"
|
||||
default 4
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 4 or 20, any other value disables the output.
|
||||
|
||||
config RP2040_PWM2A_INVERT
|
||||
bool "PWM2 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
config RP2040_PWM2_PHASE_CORRECT
|
||||
bool "PWM2 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM3
|
||||
config RP2040_PWM3A_GPIO
|
||||
int "PWM3 channel 1 GPIO pin assign (6 or -1:no assign)"
|
||||
default 6
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 6 or 22, any other value disables the output.
|
||||
|
||||
config RP2040_PWM3A_INVERT
|
||||
bool "PWM3 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM3B_GPIO
|
||||
int "PWM3 channel 2 GPIO pin assign (7 or -1:no assign)"
|
||||
default 7
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 7 or 23, any other value disables the output.
|
||||
|
||||
config RP2040_PWM3B_INVERT
|
||||
bool "PWM3 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM3_PHASE_CORRECT
|
||||
bool "PWM3 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM4
|
||||
config RP2040_PWM4A_GPIO
|
||||
int "PWM4 channel 1 GPIO pin assign (8, 24 or -1:no assign)"
|
||||
default 8
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 8 or 24, any other value disables the output.
|
||||
|
||||
config RP2040_PWM4A_INVERT
|
||||
bool "PWM4 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM4B_GPIO
|
||||
int "PWM4 channel 2 GPIO pin assign (9, 25 or -1:no assign)"
|
||||
default 9
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 9 or 25, any other value disables the output.
|
||||
|
||||
config RP2040_PWM4B_INVERT
|
||||
bool "PWM4 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM4_PHASE_CORRECT
|
||||
bool "PWM4 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM5
|
||||
config RP2040_PWM5A_GPIO
|
||||
int "PWM5 channel 1 GPIO pin assign (10, 26 or -1:no assign)"
|
||||
default 10
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 10 or 26, any other value disables the output.
|
||||
|
||||
config RP2040_PWM5A_INVERT
|
||||
bool "PWM5 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM5B_GPIO
|
||||
int "PWM5 channel 2 GPIO pin assign (11, 27 or -1:no assign)"
|
||||
default 11
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 11 or 27, any other value disables the output.
|
||||
|
||||
config RP2040_PWM5B_INVERT
|
||||
bool "PWM5 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM5_PHASE_CORRECT
|
||||
bool "PWM5 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM6
|
||||
config RP2040_PWM6A_GPIO
|
||||
int "PWM6 channel 1 GPIO pin assign (12, 28 or -1:no assign)"
|
||||
default 12
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 12 or 28, any other value disables the output.
|
||||
|
||||
config RP2040_PWM6A_INVERT
|
||||
bool "PWM6 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM6B_GPIO
|
||||
int "PWM6 channel 2 GPIO pin assign (13, 29 or -1:no assign)"
|
||||
default 13
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 13 or 29, any other value disables the output.
|
||||
|
||||
config RP2040_PWM6B_INVERT
|
||||
bool "PWM6 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM6_PHASE_CORRECT
|
||||
bool "PWM6 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
config RP2040_SPI0_GPIO
|
||||
int "SPI0 GPIO pin assign (0,16 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_SPI0
|
||||
|
||||
config RP2040_SPI1_GPIO
|
||||
int "SPI1 GPIO pin assign (8,24,28 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_SPI1
|
||||
|
||||
config RP2040_LCD_SPI_CH
|
||||
int "RP2040 LCD SPI channel number"
|
||||
default 0
|
||||
range 0 1
|
||||
depends on LCD
|
||||
---help---
|
||||
Select SPI channel number to use LCD display.
|
||||
|
||||
config RP2040_ENC28J60_SPI_CH
|
||||
int "ENC28J60 SPI channel number"
|
||||
default 1
|
||||
range 0 1
|
||||
depends on ENC28J60
|
||||
---help---
|
||||
Select SPI channel number to use ENC28J60 ethernet.
|
||||
|
||||
config RP2040_ENC28J60_INTR_GPIO
|
||||
int "ENC28J60 interrupt GPIO pin assign"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on ENC28J60
|
||||
|
||||
config RP2040_ENC28J60_RESET_GPIO
|
||||
int "ENC28J60 reset GPIO pin assign (optional)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on ENC28J60
|
||||
|
||||
endif
|
180
boards/arm/rp2040/adafruit-feather-rp2040/README.txt
Normal file
180
boards/arm/rp2040/adafruit-feather-rp2040/README.txt
Normal file
@ -0,0 +1,180 @@
|
||||
README
|
||||
======
|
||||
|
||||
This directory contains the port of NuttX to the Adafruit Feather RP2040.
|
||||
See https://www.adafruit.com/product/4884 for information
|
||||
about Adafruit Feather RP2040.
|
||||
|
||||
Currently only the following devices are supported.
|
||||
|
||||
Supported:
|
||||
- UART (console port)
|
||||
- GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console.
|
||||
- I2C
|
||||
- SPI
|
||||
- DMAC
|
||||
- PWM
|
||||
- USB device
|
||||
- MSC, CDC/ACM serial and these composite device are supported.
|
||||
- CDC/ACM serial device can be used for the console.
|
||||
- PIO (RP2040 Programmable I/O)
|
||||
- Flash ROM Boot
|
||||
- SRAM Boot
|
||||
- If Pico SDK is available, nuttx.uf2 file which can be used in
|
||||
BOOTSEL mode will be created.
|
||||
- BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu)
|
||||
- INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu)
|
||||
- Pico Display Pack (ST7789 LCD)
|
||||
- RGB leds and buttons are not supported yet.
|
||||
- Pico Audio Pack (PCM5100A I2S DAC)
|
||||
- I2S interface is realized by PIO.
|
||||
|
||||
Not supported:
|
||||
- All other devices
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
1. Download Raspberry Pi Pico SDK
|
||||
|
||||
$ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git
|
||||
|
||||
2. Set PICO_SDK_PATH environment variable
|
||||
|
||||
$ export PICO_SDK_PATH=<absolute_path_to_pico-sdk_directory>
|
||||
|
||||
3. Configure and build NuttX
|
||||
|
||||
$ git clone https://github.com/apache/incubator-nuttx.git nuttx
|
||||
$ git clone https://github.com/apache/incubator-nuttx-apps.git apps
|
||||
$ cd nuttx
|
||||
$ make distclean
|
||||
$ ./tools/configure.sh raspberrypi-pico:nsh
|
||||
$ make V=1
|
||||
|
||||
4. Connect Adafruit Feather RP2040 board to USB port while pressing BOOTSEL.
|
||||
The board will be detected as USB Mass Storage Device.
|
||||
Then copy "nuttx.uf2" into the device.
|
||||
(Same manner as the standard Pico SDK applications installation.)
|
||||
|
||||
5. To access the console, GPIO 0 and 1 pins must be connected to the
|
||||
device such as USB-serial converter.
|
||||
|
||||
`usbnsh` configuration provides the console access by USB CDC/ACM serial
|
||||
devcice. The console is available by using a terminal software on the USB
|
||||
host.
|
||||
|
||||
Defconfigs
|
||||
==========
|
||||
|
||||
- nsh
|
||||
Minimum configuration with NuttShell
|
||||
|
||||
- nshsram
|
||||
Load NuttX binary to SRAM
|
||||
|
||||
- smp
|
||||
Enable SMP mode. Both Core 0 and Core 1 are used by NuttX.
|
||||
|
||||
- ssd1306
|
||||
SSD1306 OLED display (I2C) test configuration
|
||||
Connection:
|
||||
SSD1306 Raspberry Pi Pico
|
||||
GND ----- GND (Pin 3 or 38 or ...)
|
||||
VCC ----- 3V3 OUT (Pin 36)
|
||||
SDA ----- GP4 (I2C0 SDA) (Pin 6)
|
||||
SCL ----- GP5 (I2C0 SCL) (Pin 7)
|
||||
|
||||
- lcd1602
|
||||
LCD 1602 Segment LCD Disaply (I2C)
|
||||
Connection:
|
||||
PCF8574 BackPack Raspberry Pi Pico
|
||||
GND ----- GND (Pin 3 or 38 or ...)
|
||||
VCC ----- 5V Vbus (Pin 40)
|
||||
SDA ----- GP4 (I2C0 SDA) (Pin 6)
|
||||
SCL ----- GP5 (I2C0 SCL) (Pin 7)
|
||||
- spisd
|
||||
SD card support (SPI connection)
|
||||
Connection:
|
||||
SD card slot Raspberry Pi Pico
|
||||
DAT2 (NC)
|
||||
DAT3/CS ----- GP17 (SPI0 CSn) (Pin 22)
|
||||
CMD /DI ----- GP19 (SPI0 TX) (Pin 25)
|
||||
VDD ----- 3V3 OUT (Pin 36)
|
||||
CLK/SCK ----- GP18 (SPI0 SCK) (Pin 24)
|
||||
VSS ----- GND (Pin 3 or 38 or ...)
|
||||
DAT0/DO ----- GP16 (SPI0 RX) (Pin 21)
|
||||
DAT1 (NC)
|
||||
* Card hot swapping is not supported.
|
||||
|
||||
- st7735
|
||||
st7735 SPI LCD support
|
||||
Connection:
|
||||
st7735 Raspberry Pi Pico
|
||||
GND ----- GND (Pin 3 or 38 or ...)
|
||||
VCC ----- 5V Vbus (Pin 40)
|
||||
SDA ----- GP15 (SPI1 TX) (Pin 20)
|
||||
SCK ----- GP14 (SPI1 SCK) (Pin 19)
|
||||
CS ----- GP13 (SPI1 CSn) (Pin 17)
|
||||
AO(D/C) ----- GP12 (SPI1 RX) (Pin 16)
|
||||
BL ----- GP11 (Pin 15)
|
||||
RESET ----- GP10 (Pin 14)
|
||||
|
||||
- enc28j60
|
||||
ENC28J60 SPI ethernet controller support
|
||||
- IP address is configured by DHCP.
|
||||
- DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR)
|
||||
- NTP client is enabled.
|
||||
Connection:
|
||||
ENC28J60 Raspberry Pi Pico
|
||||
GND ----- GND (Pin 3 or 38 or ...)
|
||||
3.3 ----- 3V3 OUT (Pin 36)
|
||||
SI ----- GP15 (SPI1 TX) (Pin 20)
|
||||
SCK ----- GP14 (SPI1 SCK) (Pin 19)
|
||||
CS ----- GP13 (SPI1 CSn) (Pin 17)
|
||||
SO ----- GP12 (SPI1 RX) (Pin 16)
|
||||
INT ----- GP11 (Pin 15)
|
||||
RESET ----- GP10 (Pin 14)
|
||||
|
||||
- displaypack
|
||||
Pico Display Pack support
|
||||
See the following page for connection:
|
||||
https://shop.pimoroni.com/products/pico-display-pack
|
||||
|
||||
- audiopack
|
||||
Pico Audio Pack support
|
||||
See the following page for connection:
|
||||
https://shop.pimoroni.com/products/pico-audio-pack
|
||||
SD card interface is also enabled.
|
||||
|
||||
- usbnsh
|
||||
USB CDC/ACM serial console with NuttShell
|
||||
|
||||
- usbmsc
|
||||
USB MSC and CDC/ACM support
|
||||
`msconn` and `sercon` commands enable the MSC and CDC/ACM devices.
|
||||
The MSC support provides the interface to the SD card with SPI,
|
||||
so the SD card slot connection like spisd configuration is required.
|
||||
|
||||
- composite
|
||||
USB composite device (MSC + CDC/ACM) support
|
||||
`conn` command enables the composite device.
|
||||
|
||||
License exceptions
|
||||
==================
|
||||
|
||||
The following files are originated from the files in Pico SDK.
|
||||
So, the files are licensed under 3-Clause BSD same as Pico SDK.
|
||||
|
||||
- arch/arm/src/rp2040/rp2040_clock.c
|
||||
- arch/arm/src/rp2040/rp2040_pll.c
|
||||
- arch/arm/src/rp2040/rp2040_xosc.c
|
||||
- These are created by referring the Pico SDK clock initialization.
|
||||
|
||||
- arch/arm/src/rp2040/rp2040_pio.c
|
||||
- arch/arm/src/rp2040/rp2040_pio.h
|
||||
- arch/arm/src/rp2040/rp2040_pio_instructions.h
|
||||
- These provide the similar APIs to Pico SDK's hardware_pio APIs.
|
||||
|
||||
- arch/arm/src/rp2040/hardware/*.h
|
||||
- These are generated from rp2040.svd originally provided in Pico SDK.
|
@ -0,0 +1,76 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_AUDIO_FORMAT_MP3 is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NSH_DISABLE_MB is not set
|
||||
# CONFIG_NSH_DISABLE_MH is not set
|
||||
# CONFIG_NSH_DISABLE_MW is not set
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_AUDIO=y
|
||||
CONFIG_AUDIO_I2S=y
|
||||
CONFIG_AUDIO_I2SCHAR=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_AUDIO=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sd0"
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_I2S=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RP2040_SPISD=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_NXPLAYER=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,79 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_COMPOSITE=y
|
||||
CONFIG_COMPOSITE_IAD=y
|
||||
CONFIG_COMPOSITE_MSFT_OS_DESCRIPTORS=y
|
||||
CONFIG_COMPOSITE_PRODUCTID=0x2022
|
||||
CONFIG_COMPOSITE_SERIALSTR="12345"
|
||||
CONFIG_COMPOSITE_VENDORID=0x03eb
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_USBSERIAL=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RP2040_SPISD=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSTEM_COMPOSITE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_USBDEV_COMPOSITE=y
|
||||
CONFIG_USBMSC=y
|
||||
CONFIG_USBMSC_COMPOSITE=y
|
||||
CONFIG_USBMSC_NOT_STALL_BULKEP=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,103 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_DEV_CONSOLE is not set
|
||||
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_PACKEDMSFIRST is not set
|
||||
# CONFIG_NX_WRITEONLY is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_CONSOLE=y
|
||||
CONFIG_DEBUG_ASSERTIONS=y
|
||||
CONFIG_DEBUG_FEATURES=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_NX=y
|
||||
CONFIG_EXAMPLES_NXDEMO=y
|
||||
CONFIG_EXAMPLES_NXDEMO_BPP=16
|
||||
CONFIG_EXAMPLES_NXHELLO=y
|
||||
CONFIG_EXAMPLES_NXHELLO_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NX_BPP=16
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_DEV=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_MAXCONTRAST=255
|
||||
CONFIG_LCD_NOGETRUN=y
|
||||
CONFIG_LCD_ST7789=y
|
||||
CONFIG_LCD_ST7789_FREQUENCY=64000000
|
||||
CONFIG_LCD_ST7789_XOFFSET=53
|
||||
CONFIG_LCD_ST7789_XRES=135
|
||||
CONFIG_LCD_ST7789_YOFFSET=40
|
||||
CONFIG_LCD_ST7789_YRES=240
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_USBCONSOLE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONTS_PACKEDMSFIRST=y
|
||||
CONFIG_NXFONT_SANS40X49B=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SPI_CMDDATA=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,88 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEV_ZERO=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_ENC28J60=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NET=y
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
CONFIG_NETDB_DNSSERVER_NOADDR=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETINIT_DHCPC=y
|
||||
CONFIG_NETINIT_DNS=y
|
||||
CONFIG_NETINIT_DNSIPADDR=0x08080808
|
||||
CONFIG_NETINIT_NOMAC=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_LOOPBACK=y
|
||||
CONFIG_NET_ROUTE=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_NET_UDP_CHECKSUMS=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_ENC28J60_INTR_GPIO=11
|
||||
CONFIG_RP2040_ENC28J60_RESET_GPIO=10
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI1=y
|
||||
CONFIG_RP2040_SPI1_GPIO=12
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_DHCPC_RENEW=y
|
||||
CONFIG_SYSTEM_NETDB=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_NTPC=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_SYSTEM_SYSTEM=y
|
||||
CONFIG_SYSTEM_TELNET_CLIENT=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WQUEUE_NOTIFIER=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,61 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_SLCD=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD_BACKPACK=y
|
||||
CONFIG_LCD_LCD1602=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_I2C0=y
|
||||
CONFIG_RP2040_I2C0_GPIO=4
|
||||
CONFIG_RP2040_I2C=y
|
||||
CONFIG_RP2040_I2C_DRIVER=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SLCD=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,53 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,53 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_RP2040_FLASH_BOOT is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,59 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_NCPUS=2
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SYSTEM=y
|
||||
CONFIG_SYSTEM_TASKSET=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_SMP=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,65 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RP2040_SPISD=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,80 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NX_DISABLE_1BPP is not set
|
||||
# CONFIG_NX_PACKEDMSFIRST is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_NX=y
|
||||
CONFIG_EXAMPLES_NXDEMO=y
|
||||
CONFIG_EXAMPLES_NXHELLO=y
|
||||
CONFIG_EXAMPLES_NXHELLO_BPP=1
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=1
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=1
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xff
|
||||
CONFIG_EXAMPLES_NXLINES_LINEWIDTH=1
|
||||
CONFIG_EXAMPLES_NX_BPP=1
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_DEV=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_MAXCONTRAST=255
|
||||
CONFIG_LCD_SH1106_OLED_132=y
|
||||
CONFIG_LCD_SSD1306_I2C=y
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONTS_PACKEDMSFIRST=y
|
||||
CONFIG_NXFONT_SANS20X26=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_I2C0=y
|
||||
CONFIG_RP2040_I2C0_GPIO=4
|
||||
CONFIG_RP2040_I2C=y
|
||||
CONFIG_RP2040_I2C_DRIVER=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,64 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_PORTRAIT=y
|
||||
CONFIG_LCD_ST7735=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI1=y
|
||||
CONFIG_RP2040_SPI1_GPIO=12
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SPI_CMDDATA=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,72 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_USBSERIAL=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RP2040_SPISD=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSTEM_CDCACM=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_SYSTEM_USBMSC=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_USBMSC=y
|
||||
CONFIG_USBMSC_NOT_STALL_BULKEP=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,57 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_DEV_CONSOLE is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_RP2040_UART0 is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_CONSOLE=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_USBCONSOLE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,100 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_PACKEDMSFIRST is not set
|
||||
# CONFIG_NX_WRITEONLY is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_ASSERTIONS=y
|
||||
CONFIG_DEBUG_FEATURES=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_NX=y
|
||||
CONFIG_EXAMPLES_NXDEMO=y
|
||||
CONFIG_EXAMPLES_NXDEMO_BPP=16
|
||||
CONFIG_EXAMPLES_NXHELLO=y
|
||||
CONFIG_EXAMPLES_NXHELLO_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NX_BPP=16
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_DEV=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_MAXCONTRAST=255
|
||||
CONFIG_LCD_NOGETRUN=y
|
||||
CONFIG_LCD_ST7789=y
|
||||
CONFIG_LCD_ST7789_FREQUENCY=64000000
|
||||
CONFIG_LCD_ST7789_XOFFSET=53
|
||||
CONFIG_LCD_ST7789_XRES=135
|
||||
CONFIG_LCD_ST7789_YOFFSET=40
|
||||
CONFIG_LCD_ST7789_YRES=240
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONTS_PACKEDMSFIRST=y
|
||||
CONFIG_NXFONT_SANS40X49B=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_LCD_SPI_CH=1
|
||||
CONFIG_RP2040_SPI1=y
|
||||
CONFIG_RP2040_SPI1_GPIO=8
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SPI_CMDDATA=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
@ -0,0 +1,97 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_PACKEDMSFIRST is not set
|
||||
# CONFIG_NX_WRITEONLY is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-feather-rp2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_FEATHER_RP2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_ASSERTIONS=y
|
||||
CONFIG_DEBUG_FEATURES=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_NX=y
|
||||
CONFIG_EXAMPLES_NXDEMO=y
|
||||
CONFIG_EXAMPLES_NXDEMO_BPP=16
|
||||
CONFIG_EXAMPLES_NXHELLO=y
|
||||
CONFIG_EXAMPLES_NXHELLO_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NX_BPP=16
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_DEV=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_MAXCONTRAST=255
|
||||
CONFIG_LCD_NOGETRUN=y
|
||||
CONFIG_LCD_ST7789=y
|
||||
CONFIG_LCD_ST7789_FREQUENCY=64000000
|
||||
CONFIG_LCD_ST7789_YRES=240
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONTS_PACKEDMSFIRST=y
|
||||
CONFIG_NXFONT_SANS40X49B=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_LCD_SPI_CH=1
|
||||
CONFIG_RP2040_SPI1=y
|
||||
CONFIG_RP2040_SPI1_GPIO=8
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SPI_CMDDATA=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=16
|
116
boards/arm/rp2040/adafruit-feather-rp2040/include/board.h
Normal file
116
boards/arm/rp2040/adafruit-feather-rp2040/include/board.h
Normal file
@ -0,0 +1,116 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/include/board.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_BOARD_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include "rp2040_i2cdev.h"
|
||||
#include "rp2040_spidev.h"
|
||||
#include "rp2040_i2sdev.h"
|
||||
|
||||
#include "rp2040_spisd.h"
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
|
||||
#define MHZ 1000000
|
||||
|
||||
#define BOARD_XOSC_FREQ (12 * MHZ)
|
||||
#define BOARD_PLL_SYS_FREQ (125 * MHZ)
|
||||
#define BOARD_PLL_USB_FREQ (48 * MHZ)
|
||||
|
||||
#define BOARD_REF_FREQ (12 * MHZ)
|
||||
#define BOARD_SYS_FREQ (125 * MHZ)
|
||||
#define BOARD_PERI_FREQ (125 * MHZ)
|
||||
#define BOARD_USB_FREQ (48 * MHZ)
|
||||
#define BOARD_ADC_FREQ (48 * MHZ)
|
||||
#define BOARD_RTC_FREQ 46875
|
||||
|
||||
#define BOARD_UART_BASEFREQ BOARD_PERI_FREQ
|
||||
|
||||
#define BOARD_TICK_CLOCK (1 * MHZ)
|
||||
|
||||
/* GPIO definitions *********************************************************/
|
||||
|
||||
#define BOARD_GPIO_LED_PIN 13
|
||||
#define BOARD_NGPIOOUT 1
|
||||
#define BOARD_NGPIOIN 1
|
||||
#define BOARD_NGPIOINT 1
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_boardearlyinitialize
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void rp2040_boardearlyinitialize(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void rp2040_boardinitialize(void);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_BOARD_H */
|
@ -0,0 +1,72 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/include/rp2040_i2cdev.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_I2CDEV_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_I2CDEV_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_i2cdev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize i2c driver and register the /dev/i2c device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_I2C_DRIVER
|
||||
int board_i2cdev_initialize(int bus);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_I2CDEV_H */
|
@ -0,0 +1,72 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/include/rp2040_i2sdev.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_I2SDEV_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_I2SDEV_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_i2sdev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize i2s driver and register the /dev/audio/pcm0 device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_I2S
|
||||
int board_i2sdev_initialize(int bus);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_I2SDEV_H */
|
@ -0,0 +1,69 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/include/rp2040_spidev.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_SPIDEV_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_SPIDEV_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize spi driver and register the /dev/spi device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_spidev_initialize(int bus);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_SPIDEV_H */
|
@ -0,0 +1,83 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/include/rp2040_spisd.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_SPISD_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_SPISD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_spisd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the SPI-based SD card.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_SPISD
|
||||
int board_spisd_initialize(int minor, int bus);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_spisd_status
|
||||
*
|
||||
* Description:
|
||||
* Get the status whether SD Card is present or not.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_SPISD
|
||||
uint8_t board_spisd_status(struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_INCLUDE_RP2040_SPISD_H */
|
45
boards/arm/rp2040/adafruit-feather-rp2040/scripts/Make.defs
Normal file
45
boards/arm/rp2040/adafruit-feather-rp2040/scripts/Make.defs
Normal file
@ -0,0 +1,45 @@
|
||||
############################################################################
|
||||
# boards/arm/rp2040/adafruit-feather-rp2040/scripts/Make.defs
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include $(TOPDIR)/.config
|
||||
include $(TOPDIR)/tools/Config.mk
|
||||
include $(TOPDIR)/tools/rp2040/Config.mk
|
||||
include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs
|
||||
|
||||
ifeq ($(CONFIG_RP2040_FLASH_BOOT),y)
|
||||
LDSCRIPT = adafruit-feather-rp2040-flash.ld
|
||||
else
|
||||
LDSCRIPT = adafruit-feather-rp2040-sram.ld
|
||||
endif
|
||||
|
||||
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
||||
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
||||
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
@ -0,0 +1,112 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/scripts/adafruit-feather-rp2040-flash.ld
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
flash (rx) : ORIGIN = 0x10000000, LENGTH = 2048K
|
||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 264K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
EXTERN(_vectors)
|
||||
ENTRY(_stext)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.flash_begin : {
|
||||
__flash_binary_start = .;
|
||||
} > flash
|
||||
|
||||
.boot2 : {
|
||||
__boot2_start__ = .;
|
||||
KEEP (*(.boot2))
|
||||
__boot2_end__ = .;
|
||||
} > flash
|
||||
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
*(.init_array .init_array.*)
|
||||
_einit = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > flash
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > flash
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
|
||||
.ram_vectors (COPY) : {
|
||||
*(.ram_vectors)
|
||||
} > sram
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
. = ALIGN(4);
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram AT > flash
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/scripts/adafruit-feather-rp2040-sram.ld
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 264K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
EXTERN(_vectors)
|
||||
ENTRY(_stext)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
rp2040_start.o(.text)
|
||||
. = ALIGN(256);
|
||||
*(.vectors)
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
*(.init_array .init_array.*)
|
||||
_einit = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > sram
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > sram
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
. = ALIGN(4);
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
41
boards/arm/rp2040/adafruit-feather-rp2040/src/Make.defs
Normal file
41
boards/arm/rp2040/adafruit-feather-rp2040/src/Make.defs
Normal file
@ -0,0 +1,41 @@
|
||||
############################################################################
|
||||
# boards/arm/rp2040/adafruit-feather-rp2040/src/Make.defs
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include $(TOPDIR)/Make.defs
|
||||
|
||||
CSRCS = rp2040_boardinitialize.c
|
||||
CSRCS += rp2040_appinit.c
|
||||
CSRCS += rp2040_bringup.c
|
||||
|
||||
ifeq ($(CONFIG_BOARDCTL_RESET),y)
|
||||
CSRCS += rp2040_reset.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SPI),y)
|
||||
CSRCS += rp2040_spi.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEV_GPIO),y)
|
||||
CSRCS += rp2040_gpio.c
|
||||
endif
|
||||
|
||||
DEPPATH += --dep-path board
|
||||
VPATH += :board
|
||||
CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board)
|
@ -0,0 +1,76 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_appinit.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "rp2040_pico.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX; the meaning of the argument is a contract
|
||||
* between the board-specific initialization logic and the
|
||||
* matching application logic. The value could be such things as a
|
||||
* mode enumeration value, a set of DIP switch switch settings, a
|
||||
* pointer to configuration data read from a file or serial FLASH,
|
||||
* or whatever you would like to do with it. Every implementation
|
||||
* should accept zero/NULL as a default configuration.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
/* Board initialization already performed by board_late_initialize() */
|
||||
|
||||
return OK;
|
||||
#else
|
||||
/* Perform board-specific initialization */
|
||||
|
||||
return rp2040_bringup();
|
||||
#endif
|
||||
}
|
@ -0,0 +1,166 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_boardinitialize.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
#include "rp2040_gpio.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_boardearlyinitialize
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void rp2040_boardearlyinitialize(void)
|
||||
{
|
||||
rp2040_gpio_initialize();
|
||||
|
||||
/* Disable IE on GPIO 26-29 */
|
||||
|
||||
clrbits_reg32(RP2040_PADS_BANK0_GPIO_IE, RP2040_PADS_BANK0_GPIO(26));
|
||||
clrbits_reg32(RP2040_PADS_BANK0_GPIO_IE, RP2040_PADS_BANK0_GPIO(27));
|
||||
clrbits_reg32(RP2040_PADS_BANK0_GPIO_IE, RP2040_PADS_BANK0_GPIO(28));
|
||||
clrbits_reg32(RP2040_PADS_BANK0_GPIO_IE, RP2040_PADS_BANK0_GPIO(29));
|
||||
|
||||
/* Set board LED pin */
|
||||
|
||||
rp2040_gpio_init(BOARD_GPIO_LED_PIN);
|
||||
rp2040_gpio_setdir(BOARD_GPIO_LED_PIN, true);
|
||||
rp2040_gpio_put(BOARD_GPIO_LED_PIN, true);
|
||||
|
||||
/* Set default UART pin */
|
||||
|
||||
#if defined(CONFIG_RP2040_UART0) && CONFIG_RP2040_UART0_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART0_GPIO,
|
||||
RP2040_GPIO_FUNC_UART); /* TX */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART0_GPIO + 1,
|
||||
RP2040_GPIO_FUNC_UART); /* RX */
|
||||
#ifdef CONFIG_SERIAL_OFLOWCONTROL
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART0_GPIO + 2,
|
||||
RP2040_GPIO_FUNC_UART); /* CTS */
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_IFLOWCONTROL
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART0_GPIO + 3,
|
||||
RP2040_GPIO_FUNC_UART); /* RTS */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_UART1) && CONFIG_RP2040_UART1_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART1_GPIO,
|
||||
RP2040_GPIO_FUNC_UART); /* TX */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART1_GPIO + 1,
|
||||
RP2040_GPIO_FUNC_UART); /* RX */
|
||||
#ifdef CONFIG_SERIAL_OFLOWCONTROL
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART1_GPIO + 2,
|
||||
RP2040_GPIO_FUNC_UART); /* CTS */
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_IFLOWCONTROL
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART1_GPIO + 3,
|
||||
RP2040_GPIO_FUNC_UART); /* RTS */
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void rp2040_boardinitialize(void)
|
||||
{
|
||||
/* Set default I2C pin */
|
||||
|
||||
#if defined(CONFIG_RP2040_I2C0) && CONFIG_RP2040_I2C0_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_I2C0_GPIO,
|
||||
RP2040_GPIO_FUNC_I2C); /* SDA */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_I2C0_GPIO + 1,
|
||||
RP2040_GPIO_FUNC_I2C); /* SCL */
|
||||
|
||||
rp2040_gpio_set_pulls(CONFIG_RP2040_I2C0_GPIO, true, false); /* Pull up */
|
||||
rp2040_gpio_set_pulls(CONFIG_RP2040_I2C0_GPIO + 1, true, false);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_I2C1) && CONFIG_RP2040_I2C1_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_I2C1_GPIO,
|
||||
RP2040_GPIO_FUNC_I2C); /* SDA */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_I2C1_GPIO + 1,
|
||||
RP2040_GPIO_FUNC_I2C); /* SCL */
|
||||
|
||||
rp2040_gpio_set_pulls(CONFIG_RP2040_I2C1_GPIO, true, false); /* Pull up */
|
||||
rp2040_gpio_set_pulls(CONFIG_RP2040_I2C1_GPIO + 1, true, false);
|
||||
#endif
|
||||
|
||||
/* Set default SPI pin */
|
||||
|
||||
#if defined(CONFIG_RP2040_SPI0) && CONFIG_RP2040_SPI0_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI0_GPIO,
|
||||
RP2040_GPIO_FUNC_SPI); /* RX */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI0_GPIO + 2,
|
||||
RP2040_GPIO_FUNC_SPI); /* SCK */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI0_GPIO + 3,
|
||||
RP2040_GPIO_FUNC_SPI); /* TX */
|
||||
|
||||
/* CSn is controlled by board-specific logic */
|
||||
|
||||
rp2040_gpio_init(CONFIG_RP2040_SPI0_GPIO + 1); /* CSn */
|
||||
rp2040_gpio_setdir(CONFIG_RP2040_SPI0_GPIO + 1, true);
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI0_GPIO + 1, true);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_SPI1) && CONFIG_RP2040_SPI1_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI1_GPIO,
|
||||
RP2040_GPIO_FUNC_SPI); /* RX */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI1_GPIO + 2,
|
||||
RP2040_GPIO_FUNC_SPI); /* SCK */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI1_GPIO + 3,
|
||||
RP2040_GPIO_FUNC_SPI); /* TX */
|
||||
|
||||
/* CSn is controlled by board-specific logic */
|
||||
|
||||
rp2040_gpio_init(CONFIG_RP2040_SPI1_GPIO + 1); /* CSn */
|
||||
rp2040_gpio_setdir(CONFIG_RP2040_SPI1_GPIO + 1, true);
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI1_GPIO + 1, true);
|
||||
#endif
|
||||
}
|
466
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_bringup.c
Normal file
466
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_bringup.c
Normal file
@ -0,0 +1,466 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_bringup.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "rp2040_pico.h"
|
||||
|
||||
#ifdef CONFIG_LCD_BACKPACK
|
||||
#include "rp2040_lcd_backpack.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD
|
||||
#include <nuttx/board.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_DEV
|
||||
#include <nuttx/lcd/lcd_dev.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO_FB
|
||||
#include <nuttx/video/fb.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_INA219
|
||||
#include <nuttx/sensors/ina219.h>
|
||||
#include "rp2040_ina219.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_BMP180
|
||||
#include <nuttx/sensors/bmp180.h>
|
||||
#include "rp2040_bmp180.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_PWM
|
||||
#include "rp2040_pwm.h"
|
||||
#include "rp2040_pwmdev.h"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_BOARD_HAS_WS2812) && defined(CONFIG_WS2812)
|
||||
#include "rp2040_ws2812.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WS2812_HAS_WHITE
|
||||
#define HAS_WHITE true
|
||||
#else /* CONFIG_WS2812_HAS_WHITE */
|
||||
#define HAS_WHITE false
|
||||
#endif /* CONFIG_WS2812_HAS_WHITE */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_bringup
|
||||
****************************************************************************/
|
||||
|
||||
int rp2040_bringup(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
#ifdef CONFIG_RP2040_I2C_DRIVER
|
||||
#ifdef CONFIG_RP2040_I2C0
|
||||
ret = board_i2cdev_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize I2C0.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_I2C1
|
||||
ret = board_i2cdev_initialize(1);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize I2C1.\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_SPI_DRIVER
|
||||
#ifdef CONFIG_RP2040_SPI0
|
||||
ret = board_spidev_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize SPI0.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_SPI1
|
||||
ret = board_spidev_initialize(1);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize SPI1.\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_PWM
|
||||
# ifdef CONFIG_RP2040_PWM0
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(0,
|
||||
CONFIG_RP2040_PWM0A_GPIO,
|
||||
CONFIG_RP2040_PWM0B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM0A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM0B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM0_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(0,
|
||||
CONFIG_RP2040_PWM0A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM0A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM0_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM0.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM1
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(1,
|
||||
CONFIG_RP2040_PWM1A_GPIO,
|
||||
CONFIG_RP2040_PWM1B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM1A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM1B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM1_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(1,
|
||||
CONFIG_RP2040_PWM1A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM1A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM1_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM1.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM2
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(2,
|
||||
CONFIG_RP2040_PWM2A_GPIO,
|
||||
CONFIG_RP2040_PWM2B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM2A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM2B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM2_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(2,
|
||||
CONFIG_RP2040_PWM2A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM2A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM2_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM2.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM3
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(3,
|
||||
CONFIG_RP2040_PWM3A_GPIO,
|
||||
CONFIG_RP2040_PWM3B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM3A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM3B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM3_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(3,
|
||||
CONFIG_RP2040_PWM3A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM3A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM3_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM3.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM4
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(4,
|
||||
CONFIG_RP2040_PWM4A_GPIO,
|
||||
CONFIG_RP2040_PWM4B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM4A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM4B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM4_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(4,
|
||||
CONFIG_RP2040_PWM4A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM4A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM4_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM4.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM5
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(5,
|
||||
CONFIG_RP2040_PWM5A_GPIO,
|
||||
CONFIG_RP2040_PWM5B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM5A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM5B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM5_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(5,
|
||||
CONFIG_RP2040_PWM5A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM5A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM5_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM5.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM6
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(6,
|
||||
CONFIG_RP2040_PWM6A_GPIO,
|
||||
CONFIG_RP2040_PWM6B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM6A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM6B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM6_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(6,
|
||||
CONFIG_RP2040_PWM6A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM6A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM6_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM6.\n");
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_SPISD
|
||||
/* Mount the SPI-based MMC/SD block driver */
|
||||
|
||||
ret = board_spisd_initialize(0, CONFIG_RP2040_SPISD_SPI_CH);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize SPI device to MMC/SD: %d\n",
|
||||
ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("ERROR: Failed to mount procfs at %s: %d\n", "/proc", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_BMP180
|
||||
/* Try to register BMP180 device in I2C0 */
|
||||
|
||||
ret = board_bmp180_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "Failed to initialize BMP180 driver: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_INA219
|
||||
/* Configure and initialize the INA219 sensor in I2C0 */
|
||||
|
||||
ret = board_ina219_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: rp2040_ina219_initialize() failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO_FB
|
||||
ret = fb_register(0, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize Frame Buffer Driver.\n");
|
||||
}
|
||||
#elif defined(CONFIG_LCD)
|
||||
ret = board_lcd_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize LCD.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_DEV
|
||||
ret = lcddev_register(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: lcddev_register() failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_BACKPACK
|
||||
/* slcd:0, i2c:0, rows=2, cols=16 */
|
||||
|
||||
ret = board_lcd_backpack_init(0, 0, 2, 16);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "Failed to initialize PCF8574 LCD, error %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_I2S
|
||||
ret = board_i2sdev_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize I2S.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEV_GPIO
|
||||
ret = rp2040_dev_gpio_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "Failed to initialize GPIO Driver: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Initialize board neo-pixel */
|
||||
|
||||
#if defined(CONFIG_RP2040_BOARD_HAS_WS2812) && defined(CONFIG_WS2812)
|
||||
rp2040_ws2812_setup("/dev/leds0",
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN,
|
||||
CONFIG_WS2812_LED_COUNT,
|
||||
HAS_WHITE);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
392
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_gpio.c
Normal file
392
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_gpio.c
Normal file
@ -0,0 +1,392 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_gpio.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/irq.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/ioexpander/gpio.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
#include "chip.h"
|
||||
#include "rp2040_gpio.h"
|
||||
|
||||
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_GPIO_LOWER_HALF)
|
||||
|
||||
/* Output pins. GPIO13 is onboard LED any other outputs could be used.
|
||||
*/
|
||||
|
||||
#define GPIO_OUT1 13
|
||||
|
||||
/* Input pins.
|
||||
*/
|
||||
|
||||
#define GPIO_IN1 6
|
||||
|
||||
/* Interrupt pins.
|
||||
*/
|
||||
|
||||
#define GPIO_IRQPIN1 11
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
struct rp2040gpio_dev_s
|
||||
{
|
||||
struct gpio_dev_s gpio;
|
||||
uint8_t id;
|
||||
};
|
||||
|
||||
struct rp2040gpint_dev_s
|
||||
{
|
||||
struct rp2040gpio_dev_s rp2040gpio;
|
||||
pin_interrupt_t callback;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOOUT > 0
|
||||
static int gpout_read(struct gpio_dev_s *dev, bool *value);
|
||||
static int gpout_write(struct gpio_dev_s *dev, bool value);
|
||||
#endif
|
||||
|
||||
#if BOARD_NGPIOIN > 0
|
||||
static int gpin_read(struct gpio_dev_s *dev, bool *value);
|
||||
#endif
|
||||
|
||||
#if BOARD_NGPIOINT > 0
|
||||
static int gpint_read(struct gpio_dev_s *dev, bool *value);
|
||||
static int gpint_attach(struct gpio_dev_s *dev,
|
||||
pin_interrupt_t callback);
|
||||
static int gpint_enable(struct gpio_dev_s *dev, bool enable);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOOUT > 0
|
||||
static const struct gpio_operations_s gpout_ops =
|
||||
{
|
||||
.go_read = gpout_read,
|
||||
.go_write = gpout_write,
|
||||
.go_attach = NULL,
|
||||
.go_enable = NULL,
|
||||
};
|
||||
|
||||
/* This array maps the GPIO pins used as OUTPUT */
|
||||
|
||||
static const uint32_t g_gpiooutputs[BOARD_NGPIOOUT] =
|
||||
{
|
||||
GPIO_OUT1
|
||||
};
|
||||
|
||||
static struct rp2040gpio_dev_s g_gpout[BOARD_NGPIOOUT];
|
||||
#endif
|
||||
|
||||
#if BOARD_NGPIOIN > 0
|
||||
static const struct gpio_operations_s gpin_ops =
|
||||
{
|
||||
.go_read = gpin_read,
|
||||
.go_write = NULL,
|
||||
.go_attach = NULL,
|
||||
.go_enable = NULL,
|
||||
};
|
||||
|
||||
/* This array maps the GPIO pins used as INTERRUPT INPUTS */
|
||||
|
||||
static const uint32_t g_gpioinputs[BOARD_NGPIOIN] =
|
||||
{
|
||||
GPIO_IN1
|
||||
};
|
||||
|
||||
static struct rp2040gpio_dev_s g_gpin[BOARD_NGPIOIN];
|
||||
#endif
|
||||
|
||||
#if BOARD_NGPIOINT > 0
|
||||
static const struct gpio_operations_s gpint_ops =
|
||||
{
|
||||
.go_read = gpint_read,
|
||||
.go_write = NULL,
|
||||
.go_attach = gpint_attach,
|
||||
.go_enable = gpint_enable,
|
||||
};
|
||||
|
||||
/* This array maps the GPIO pins used as INTERRUPT INPUTS */
|
||||
|
||||
static const uint32_t g_gpiointinputs[BOARD_NGPIOINT] =
|
||||
{
|
||||
GPIO_IRQPIN1,
|
||||
};
|
||||
|
||||
static struct rp2040gpint_dev_s g_gpint[BOARD_NGPIOINT];
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpout_read
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOOUT > 0
|
||||
static int gpout_read(struct gpio_dev_s *dev, bool *value)
|
||||
{
|
||||
struct rp2040gpio_dev_s *rp2040gpio =
|
||||
(struct rp2040gpio_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(rp2040gpio != NULL && value != NULL);
|
||||
DEBUGASSERT(rp2040gpio->id < BOARD_NGPIOOUT);
|
||||
gpioinfo("Reading...\n");
|
||||
|
||||
*value = rp2040_gpio_get(g_gpiooutputs[rp2040gpio->id]);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpout_write
|
||||
****************************************************************************/
|
||||
|
||||
static int gpout_write(struct gpio_dev_s *dev, bool value)
|
||||
{
|
||||
struct rp2040gpio_dev_s *rp2040gpio =
|
||||
(struct rp2040gpio_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(rp2040gpio != NULL);
|
||||
DEBUGASSERT(rp2040gpio->id < BOARD_NGPIOOUT);
|
||||
gpioinfo("Writing %d\n", (int)value);
|
||||
|
||||
rp2040_gpio_put(g_gpiooutputs[rp2040gpio->id], value);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpin_read
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOIN > 0
|
||||
static int gpin_read(struct gpio_dev_s *dev, bool *value)
|
||||
{
|
||||
struct rp2040gpio_dev_s *rp2040gpio =
|
||||
(struct rp2040gpio_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(rp2040gpio != NULL && value != NULL);
|
||||
DEBUGASSERT(rp2040gpio->id < BOARD_NGPIOIN);
|
||||
gpioinfo("Reading... pin %d\n", (int)g_gpioinputs[rp2040gpio->id]);
|
||||
|
||||
*value = rp2040_gpio_get(g_gpioinputs[rp2040gpio->id]);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040gpio_interrupt
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOINT > 0
|
||||
static int rp2040gpio_interrupt(int irq, void *context, void *arg)
|
||||
{
|
||||
struct rp2040gpint_dev_s *rp2040gpint =
|
||||
(struct rp2040gpint_dev_s *)arg;
|
||||
|
||||
DEBUGASSERT(rp2040gpint != NULL && rp2040gpint->callback != NULL);
|
||||
gpioinfo("Interrupt! callback=%p\n", rp2040gpint->callback);
|
||||
|
||||
rp2040gpint->callback(&rp2040gpint->rp2040gpio.gpio,
|
||||
rp2040gpint->rp2040gpio.id);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpint_read
|
||||
****************************************************************************/
|
||||
|
||||
static int gpint_read(struct gpio_dev_s *dev, bool *value)
|
||||
{
|
||||
struct rp2040gpint_dev_s *rp2040gpint =
|
||||
(struct rp2040gpint_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(rp2040gpint != NULL && value != NULL);
|
||||
DEBUGASSERT(rp2040gpint->rp2040gpio.id < BOARD_NGPIOINT);
|
||||
gpioinfo("Reading int pin...\n");
|
||||
|
||||
*value = rp2040_gpio_get(g_gpiointinputs[rp2040gpint->rp2040gpio.id]);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpint_attach
|
||||
****************************************************************************/
|
||||
|
||||
static int gpint_attach(struct gpio_dev_s *dev,
|
||||
pin_interrupt_t callback)
|
||||
{
|
||||
struct rp2040gpint_dev_s *rp2040gpint =
|
||||
(struct rp2040gpint_dev_s *)dev;
|
||||
int irq = g_gpiointinputs[rp2040gpint->rp2040gpio.id];
|
||||
int ret;
|
||||
|
||||
gpioinfo("Attaching the callback\n");
|
||||
|
||||
/* Make sure the interrupt is disabled */
|
||||
|
||||
rp2040_gpio_disable_irq(irq);
|
||||
ret = rp2040_gpio_irq_attach(irq,
|
||||
RP2040_GPIO_INTR_EDGE_LOW,
|
||||
rp2040gpio_interrupt,
|
||||
&g_gpint[rp2040gpint->rp2040gpio.id]);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: gpint_attach() failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
gpioinfo("Attach %p\n", callback);
|
||||
rp2040gpint->callback = callback;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpint_enable
|
||||
****************************************************************************/
|
||||
|
||||
static int gpint_enable(struct gpio_dev_s *dev, bool enable)
|
||||
{
|
||||
struct rp2040gpint_dev_s *rp2040gpint =
|
||||
(struct rp2040gpint_dev_s *)dev;
|
||||
int irq = g_gpiointinputs[rp2040gpint->rp2040gpio.id];
|
||||
|
||||
if (enable)
|
||||
{
|
||||
if (rp2040gpint->callback != NULL)
|
||||
{
|
||||
gpioinfo("Enabling the interrupt\n");
|
||||
|
||||
/* Configure the interrupt for rising edge */
|
||||
|
||||
rp2040_gpio_enable_irq(irq);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gpioinfo("Disable the interrupt\n");
|
||||
rp2040_gpio_disable_irq(irq);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_dev_gpio_init
|
||||
****************************************************************************/
|
||||
|
||||
int rp2040_dev_gpio_init(void)
|
||||
{
|
||||
int i;
|
||||
int pincount = 0;
|
||||
|
||||
#if BOARD_NGPIOOUT > 0
|
||||
for (i = 0; i < BOARD_NGPIOOUT; i++)
|
||||
{
|
||||
/* Setup and register the GPIO pin */
|
||||
|
||||
g_gpout[i].gpio.gp_pintype = GPIO_OUTPUT_PIN;
|
||||
g_gpout[i].gpio.gp_ops = &gpout_ops;
|
||||
g_gpout[i].id = i;
|
||||
gpio_pin_register(&g_gpout[i].gpio, g_gpiooutputs[i]);
|
||||
|
||||
/* Configure the pins that will be used as output */
|
||||
|
||||
rp2040_gpio_init(g_gpiooutputs[i]);
|
||||
rp2040_gpio_setdir(g_gpiooutputs[i], true);
|
||||
rp2040_gpio_put(g_gpiooutputs[i], false);
|
||||
|
||||
pincount++;
|
||||
}
|
||||
#endif
|
||||
|
||||
pincount = 0;
|
||||
|
||||
#if BOARD_NGPIOIN > 0
|
||||
for (i = 0; i < BOARD_NGPIOIN; i++)
|
||||
{
|
||||
/* Setup and register the GPIO pin */
|
||||
|
||||
g_gpin[i].gpio.gp_pintype = GPIO_INPUT_PIN;
|
||||
g_gpin[i].gpio.gp_ops = &gpin_ops;
|
||||
g_gpin[i].id = i;
|
||||
gpio_pin_register(&g_gpin[i].gpio, g_gpioinputs[i]);
|
||||
|
||||
/* Configure the pins that will be used as INPUT */
|
||||
|
||||
rp2040_gpio_init(g_gpioinputs[i]);
|
||||
|
||||
pincount++;
|
||||
}
|
||||
#endif
|
||||
|
||||
pincount = 0;
|
||||
|
||||
#if BOARD_NGPIOINT > 0
|
||||
for (i = 0; i < BOARD_NGPIOINT; i++)
|
||||
{
|
||||
/* Setup and register the GPIO pin */
|
||||
|
||||
g_gpint[i].rp2040gpio.gpio.gp_pintype = GPIO_INTERRUPT_PIN;
|
||||
g_gpint[i].rp2040gpio.gpio.gp_ops = &gpint_ops;
|
||||
g_gpint[i].rp2040gpio.id = i;
|
||||
gpio_pin_register(&g_gpint[i].rp2040gpio.gpio, g_gpiointinputs[i]);
|
||||
|
||||
/* Configure the pins that will be used as interrupt input */
|
||||
|
||||
rp2040_gpio_init(g_gpiointinputs[i]);
|
||||
|
||||
/* pull-up = false : pull-down = true */
|
||||
|
||||
rp2040_gpio_set_pulls(g_gpiointinputs[i], false, true);
|
||||
|
||||
pincount++;
|
||||
}
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif /* CONFIG_DEV_GPIO && !CONFIG_GPIO_LOWER_HALF */
|
36
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_pico.h
Normal file
36
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_pico.h
Normal file
@ -0,0 +1,36 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_pico.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_RP2040_PICO_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_RP2040_PICO_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
int rp2040_bringup(void);
|
||||
|
||||
#ifdef CONFIG_DEV_GPIO
|
||||
int rp2040_dev_gpio_init(void);
|
||||
#endif
|
||||
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_FEATHER_RP2040_PICO_H */
|
61
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_reset.c
Normal file
61
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_reset.c
Normal file
@ -0,0 +1,61 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_reset.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_RESET
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_reset
|
||||
*
|
||||
* Description:
|
||||
* Reset board. Support for this function is required by board-level
|
||||
* logic if CONFIG_BOARDCTL_RESET is selected.
|
||||
*
|
||||
* Input Parameters:
|
||||
* status - Status information provided with the reset event. This
|
||||
* meaning of this status information is board-specific. If not
|
||||
* used by a board, the value zero may be provided in calls to
|
||||
* board_reset().
|
||||
*
|
||||
* Returned Value:
|
||||
* If this function returns, then it was not possible to power-off the
|
||||
* board due to some constraints. The return value int this case is a
|
||||
* board-specific reason for the failure to shutdown.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_reset(int status)
|
||||
{
|
||||
up_systemreset();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BOARDCTL_RESET */
|
150
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_spi.c
Normal file
150
boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_spi.c
Normal file
@ -0,0 +1,150 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_spi.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
#include "chip.h"
|
||||
#include "rp2040_gpio.h"
|
||||
#include "hardware/rp2040_spi.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_spi0/1select and rp2040_spi0/1status
|
||||
*
|
||||
* Description:
|
||||
* The external functions, rp2040_spi0/1select and rp2040_spi0/1status
|
||||
* must be provided by board-specific logic.
|
||||
* They are implementations of the select and status methods of the SPI
|
||||
* interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h).
|
||||
* All other methods (including rp2040_spibus_initialize()) are provided by
|
||||
* common RP2040 logic. To use this common SPI logic on your board:
|
||||
*
|
||||
* 1. Provide logic in rp2040_boardinitialize() to configure SPI chip
|
||||
* select pins.
|
||||
* 2. Provide rp2040_spi0/1select() and rp2040_spi0/1status()
|
||||
* functions in your board-specific logic.
|
||||
* These functions will perform chip selection and status operations
|
||||
* using GPIOs in the way your board is configured.
|
||||
* 3. Add a calls to rp2040_spibus_initialize() in your low level
|
||||
* application initialization logic
|
||||
* 4. The handle returned by rp2040_spibus_initialize() may then be used to
|
||||
* bind the SPI driver to higher level logic (e.g., calling
|
||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||
* the SPI MMC/SD driver).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_SPI0
|
||||
void rp2040_spi0select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid,
|
||||
selected ? "assert" : "de-assert");
|
||||
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI0_GPIO + 1, !selected);
|
||||
}
|
||||
|
||||
uint8_t rp2040_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
# if defined(CONFIG_RP2040_SPISD) && (CONFIG_RP2040_SPISD_SPI_CH == 0)
|
||||
ret = board_spisd_status(dev, devid);
|
||||
# endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int rp2040_spi0cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_LCD_ST7789
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
{
|
||||
/* This is the Data/Command control pad which determines whether the
|
||||
* data bits are data or a command.
|
||||
*/
|
||||
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI0_GPIO, !cmd);
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_SPI1
|
||||
void rp2040_spi1select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid,
|
||||
selected ? "assert" : "de-assert");
|
||||
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI1_GPIO + 1, !selected);
|
||||
}
|
||||
|
||||
uint8_t rp2040_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
# if defined(CONFIG_RP2040_SPISD) && (CONFIG_RP2040_SPISD_SPI_CH == 1)
|
||||
ret = board_spisd_status(dev, devid);
|
||||
# endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int rp2040_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#if defined (CONFIG_LCD_ST7789) || (CONFIG_LCD_ST7735)
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
{
|
||||
/* This is the Data/Command control pad which determines whether the
|
||||
* data bits are data or a command.
|
||||
*/
|
||||
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI1_GPIO, !cmd);
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
#endif
|
359
boards/arm/rp2040/adafruit-kb2040/Kconfig
Normal file
359
boards/arm/rp2040/adafruit-kb2040/Kconfig
Normal file
@ -0,0 +1,359 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||
#
|
||||
|
||||
if ARCH_BOARD_ADAFRUIT_KB2040
|
||||
|
||||
config RP2040_FLASH_BOOT
|
||||
bool "flash boot"
|
||||
default y
|
||||
---help---
|
||||
If y, the built binary can be used for flash boot.
|
||||
If not, the binary is for SRAM boot.
|
||||
|
||||
config RP2040_FLASH_CHIP
|
||||
string "flash chip name"
|
||||
default "w25q080"
|
||||
---help---
|
||||
Name of NOR flash device connected to RP2040 SoC.
|
||||
(Used to choose the secondary boot loader.)
|
||||
Basically this option should not be changed.
|
||||
|
||||
config RP2040_UF2_BINARY
|
||||
bool "uf2 binary format"
|
||||
default y
|
||||
---help---
|
||||
Create nuttx.uf2 binary format used on RP2040 based arch.
|
||||
|
||||
config RP2040_UART0_GPIO
|
||||
int "UART0 GPIO pin assign (0,12,16,28 or -1:no assign)"
|
||||
default 0
|
||||
range -1 29
|
||||
depends on RP2040_UART0
|
||||
|
||||
config RP2040_UART1_GPIO
|
||||
int "UART1 GPIO pin assign (4,8,20,24 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_UART1
|
||||
|
||||
config RP2040_I2C0_GPIO
|
||||
int "I2C0 GPIO pin assign (0,4,8,12,28 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_I2C0
|
||||
|
||||
config RP2040_I2C1_GPIO
|
||||
int "I2C1 GPIO pin assign (2,6,10,18,26 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_I2C1
|
||||
|
||||
if RP2040_PWM0
|
||||
config RP2040_PWM0A_GPIO
|
||||
int "PWM0 channel 1 GPIO pin assign (0, 16 or -1:no assign)"
|
||||
default 0
|
||||
range -1 16
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 0 or 16, any other value disables the output.
|
||||
|
||||
config RP2040_PWM0A_INVERT
|
||||
bool "PWM0 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM0B_GPIO
|
||||
int "PWM0 channel 2 GPIO pin assign (1 or -1:no assign)"
|
||||
default 1
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 1 or 17, any other value disables the output.
|
||||
|
||||
config RP2040_PWM0B_INVERT
|
||||
bool "PWM0 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM0_PHASE_CORRECT
|
||||
bool "PWM0 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM1
|
||||
config RP2040_PWM1A_GPIO
|
||||
int "PWM1 channel 1 GPIO pin assign (2, 18 or -1:no assign)"
|
||||
default 2
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 2 or 18, any other value disables the output.
|
||||
|
||||
config RP2040_PWM1A_INVERT
|
||||
bool "PWM1 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM1B_GPIO
|
||||
int "PWM1 channel 2 GPIO pin assign (3, 19 or -1:no assign)"
|
||||
default 3
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 3 or 19, any other value disables the output.
|
||||
|
||||
config RP2040_PWM1B_INVERT
|
||||
bool "PWM1 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM1_PHASE_CORRECT
|
||||
bool "PWM1 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM2
|
||||
config RP2040_PWM2A_GPIO
|
||||
int "PWM2 channel 1 GPIO pin assign (4, 20 or -1:no assign)"
|
||||
default 4
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 4 or 20, any other value disables the output.
|
||||
|
||||
config RP2040_PWM2A_INVERT
|
||||
bool "PWM2 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM2B_GPIO
|
||||
int "PWM2 channel 2 GPIO pin assign (5 or -1:no assign)"
|
||||
default 5
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 5 or 21, any other value disables the output.
|
||||
|
||||
config RP2040_PWM2B_INVERT
|
||||
bool "PWM2 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM2_PHASE_CORRECT
|
||||
bool "PWM2 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM3
|
||||
config RP2040_PWM3A_GPIO
|
||||
int "PWM3 channel 1 GPIO pin assign (6 or -1:no assign)"
|
||||
default 6
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 6 or 22, any other value disables the output.
|
||||
|
||||
config RP2040_PWM3A_INVERT
|
||||
bool "PWM3 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM3B_GPIO
|
||||
int "PWM3 channel 2 GPIO pin assign (7 or -1:no assign)"
|
||||
default 7
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 7 or 23, any other value disables the output.
|
||||
|
||||
config RP2040_PWM3B_INVERT
|
||||
bool "PWM3 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM3_PHASE_CORRECT
|
||||
bool "PWM3 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM4
|
||||
config RP2040_PWM4A_GPIO
|
||||
int "PWM4 channel 1 GPIO pin assign (8 or -1:no assign)"
|
||||
default 8
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 8 or 24, any other value disables the output.
|
||||
|
||||
config RP2040_PWM4A_INVERT
|
||||
bool "PWM4 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM4B_GPIO
|
||||
int "PWM4 channel 2 GPIO pin assign (9 or -1:no assign)"
|
||||
default 9
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 9 or 25, any other value disables the output.
|
||||
|
||||
config RP2040_PWM4B_INVERT
|
||||
bool "PWM4 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM4_PHASE_CORRECT
|
||||
bool "PWM4 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM5
|
||||
config RP2040_PWM5A_GPIO
|
||||
int "PWM5 channel 1 GPIO pin assign (10, 26 or -1:no assign)"
|
||||
default 10
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 10 or 26, any other value disables the output.
|
||||
|
||||
config RP2040_PWM5A_INVERT
|
||||
bool "PWM5 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM5B_GPIO
|
||||
int "PWM5 channel 2 GPIO pin assign (27 or -1:no assign)"
|
||||
default 11
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 11 or 27, any other value disables the output.
|
||||
|
||||
config RP2040_PWM5B_INVERT
|
||||
bool "PWM5 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM5_PHASE_CORRECT
|
||||
bool "PWM5 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
if RP2040_PWM6
|
||||
config RP2040_PWM6A_GPIO
|
||||
int "PWM6 channel 1 GPIO pin assign (12, 28 or -1:no assign)"
|
||||
default 12
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the A channel it must be
|
||||
either 12 or 28, any other value disables the output.
|
||||
|
||||
config RP2040_PWM6A_INVERT
|
||||
bool "PWM6 channel 1 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the A pin will idle high
|
||||
with the pulse going low.
|
||||
|
||||
if PWM_MULTICHAN && PWM_NCHANNELS > 1
|
||||
config RP2040_PWM6B_GPIO
|
||||
int "PWM6 channel 2 GPIO pin assign (13, 29 or -1:no assign)"
|
||||
default 13
|
||||
range -1 29
|
||||
---help---
|
||||
This sets the GPIO pin to use for the B channel it must be
|
||||
either 13 or 29, any other value disables the output.
|
||||
|
||||
config RP2040_PWM6B_INVERT
|
||||
bool "PWM6 channel 2 invert"
|
||||
default n
|
||||
---help---
|
||||
If invert is enabled, the PWM on the B pin will idle high
|
||||
with the pulse going low.
|
||||
endif
|
||||
|
||||
config RP2040_PWM6_PHASE_CORRECT
|
||||
bool "PWM6 phase correct"
|
||||
default n
|
||||
endif
|
||||
|
||||
config RP2040_SPI0_GPIO
|
||||
int "SPI0 GPIO pin assign (0,4,16,20 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_SPI0
|
||||
|
||||
config RP2040_SPI1_GPIO
|
||||
int "SPI1 GPIO pin assign (8,12,24,28 or -1:no assign)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on RP2040_SPI1
|
||||
|
||||
config RP2040_LCD_SPI_CH
|
||||
int "RP2040 LCD SPI channel number"
|
||||
default 0
|
||||
range 0 1
|
||||
depends on LCD
|
||||
---help---
|
||||
Select SPI channel number to use LCD display.
|
||||
|
||||
config RP2040_ENC28J60_SPI_CH
|
||||
int "ENC28J60 SPI channel number"
|
||||
default 1
|
||||
range 0 1
|
||||
depends on ENC28J60
|
||||
---help---
|
||||
Select SPI channel number to use ENC28J60 ethernet.
|
||||
|
||||
config RP2040_ENC28J60_INTR_GPIO
|
||||
int "ENC28J60 interrupt GPIO pin assign"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on ENC28J60
|
||||
|
||||
config RP2040_ENC28J60_RESET_GPIO
|
||||
int "ENC28J60 reset GPIO pin assign (optional)"
|
||||
default -1
|
||||
range -1 29
|
||||
depends on ENC28J60
|
||||
|
||||
endif
|
179
boards/arm/rp2040/adafruit-kb2040/README.txt
Normal file
179
boards/arm/rp2040/adafruit-kb2040/README.txt
Normal file
@ -0,0 +1,179 @@
|
||||
README
|
||||
======
|
||||
|
||||
This directory contains the port of NuttX to the Adafruit KB2040.
|
||||
See https://www.adafruit.com/product/5302 for information about Adafruit KB2040.
|
||||
|
||||
Currently only the following devices are supported.
|
||||
|
||||
Supported:
|
||||
- UART (console port)
|
||||
- GPIO 0 (UART0 TX) and GPIO 1 (UART0 RX) are used for the console.
|
||||
- I2C
|
||||
- SPI
|
||||
- DMAC
|
||||
- PWM
|
||||
- USB device
|
||||
- MSC, CDC/ACM serial and these composite device are supported.
|
||||
- CDC/ACM serial device can be used for the console.
|
||||
- PIO (RP2040 Programmable I/O)
|
||||
- Flash ROM Boot
|
||||
- SRAM Boot
|
||||
- If Pico SDK is available, nuttx.uf2 file which can be used in
|
||||
BOOTSEL mode will be created.
|
||||
- BMP180 sensor at I2C0 (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu)
|
||||
- INA219 sensor / module (don't forget to define I2C0 GPIOs at "I2C0 GPIO pin assign" in Board Selection menu)
|
||||
- Pico Display Pack (ST7789 LCD)
|
||||
- RGB leds and buttons are not supported yet.
|
||||
- Pico Audio Pack (PCM5100A I2S DAC)
|
||||
- I2S interface is realized by PIO.
|
||||
|
||||
Not supported:
|
||||
- All other devices
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
1. Download Raspberry Pi Pico SDK
|
||||
|
||||
$ git clone -b 1.1.2 https://github.com/raspberrypi/pico-sdk.git
|
||||
|
||||
2. Set PICO_SDK_PATH environment variable
|
||||
|
||||
$ export PICO_SDK_PATH=<absolute_path_to_pico-sdk_directory>
|
||||
|
||||
3. Configure and build NuttX
|
||||
|
||||
$ git clone https://github.com/apache/incubator-nuttx.git nuttx
|
||||
$ git clone https://github.com/apache/incubator-nuttx-apps.git apps
|
||||
$ cd nuttx
|
||||
$ make distclean
|
||||
$ ./tools/configure.sh raspberrypi-pico:nsh
|
||||
$ make V=1
|
||||
|
||||
4. Connect Adafruit KB2040 board to USB port while pressing BOOTSEL.
|
||||
The board will be detected as USB Mass Storage Device.
|
||||
Then copy "nuttx.uf2" into the device.
|
||||
(Same manner as the standard Pico SDK applications installation.)
|
||||
|
||||
5. To access the console, GPIO 0 and 1 pins must be connected to the
|
||||
device such as USB-serial converter.
|
||||
|
||||
`usbnsh` configuration provides the console access by USB CDC/ACM serial
|
||||
devcice. The console is available by using a terminal software on the USB
|
||||
host.
|
||||
|
||||
Defconfigs
|
||||
==========
|
||||
|
||||
- nsh
|
||||
Minimum configuration with NuttShell
|
||||
|
||||
- nshsram
|
||||
Load NuttX binary to SRAM
|
||||
|
||||
- smp
|
||||
Enable SMP mode. Both Core 0 and Core 1 are used by NuttX.
|
||||
|
||||
- ssd1306
|
||||
SSD1306 OLED display (I2C) test configuration
|
||||
Connection:
|
||||
SSD1306 Raspberry Pi Pico
|
||||
GND ----- GND (Pin 3 or 38 or ...)
|
||||
VCC ----- 3V3 OUT (Pin 36)
|
||||
SDA ----- GP4 (I2C0 SDA) (Pin 6)
|
||||
SCL ----- GP5 (I2C0 SCL) (Pin 7)
|
||||
|
||||
- lcd1602
|
||||
LCD 1602 Segment LCD Disaply (I2C)
|
||||
Connection:
|
||||
PCF8574 BackPack Raspberry Pi Pico
|
||||
GND ----- GND (Pin 3 or 38 or ...)
|
||||
VCC ----- 5V Vbus (Pin 40)
|
||||
SDA ----- GP4 (I2C0 SDA) (Pin 6)
|
||||
SCL ----- GP5 (I2C0 SCL) (Pin 7)
|
||||
- spisd
|
||||
SD card support (SPI connection)
|
||||
Connection:
|
||||
SD card slot Raspberry Pi Pico
|
||||
DAT2 (NC)
|
||||
DAT3/CS ----- GP17 (SPI0 CSn) (Pin 22)
|
||||
CMD /DI ----- GP19 (SPI0 TX) (Pin 25)
|
||||
VDD ----- 3V3 OUT (Pin 36)
|
||||
CLK/SCK ----- GP18 (SPI0 SCK) (Pin 24)
|
||||
VSS ----- GND (Pin 3 or 38 or ...)
|
||||
DAT0/DO ----- GP16 (SPI0 RX) (Pin 21)
|
||||
DAT1 (NC)
|
||||
* Card hot swapping is not supported.
|
||||
|
||||
- st7735
|
||||
st7735 SPI LCD support
|
||||
Connection:
|
||||
st7735 Raspberry Pi Pico
|
||||
GND ----- GND (Pin 3 or 38 or ...)
|
||||
VCC ----- 5V Vbus (Pin 40)
|
||||
SDA ----- GP15 (SPI1 TX) (Pin 20)
|
||||
SCK ----- GP14 (SPI1 SCK) (Pin 19)
|
||||
CS ----- GP13 (SPI1 CSn) (Pin 17)
|
||||
AO(D/C) ----- GP12 (SPI1 RX) (Pin 16)
|
||||
BL ----- GP11 (Pin 15)
|
||||
RESET ----- GP10 (Pin 14)
|
||||
|
||||
- enc28j60
|
||||
ENC28J60 SPI ethernet controller support
|
||||
- IP address is configured by DHCP.
|
||||
- DNS address is 8.8.8.8 (CONFIG_NETINIT_DNSIPADDR)
|
||||
- NTP client is enabled.
|
||||
Connection:
|
||||
ENC28J60 Raspberry Pi Pico
|
||||
GND ----- GND (Pin 3 or 38 or ...)
|
||||
3.3 ----- 3V3 OUT (Pin 36)
|
||||
SI ----- GP15 (SPI1 TX) (Pin 20)
|
||||
SCK ----- GP14 (SPI1 SCK) (Pin 19)
|
||||
CS ----- GP13 (SPI1 CSn) (Pin 17)
|
||||
SO ----- GP12 (SPI1 RX) (Pin 16)
|
||||
INT ----- GP11 (Pin 15)
|
||||
RESET ----- GP10 (Pin 14)
|
||||
|
||||
- displaypack
|
||||
Pico Display Pack support
|
||||
See the following page for connection:
|
||||
https://shop.pimoroni.com/products/pico-display-pack
|
||||
|
||||
- audiopack
|
||||
Pico Audio Pack support
|
||||
See the following page for connection:
|
||||
https://shop.pimoroni.com/products/pico-audio-pack
|
||||
SD card interface is also enabled.
|
||||
|
||||
- usbnsh
|
||||
USB CDC/ACM serial console with NuttShell
|
||||
|
||||
- usbmsc
|
||||
USB MSC and CDC/ACM support
|
||||
`msconn` and `sercon` commands enable the MSC and CDC/ACM devices.
|
||||
The MSC support provides the interface to the SD card with SPI,
|
||||
so the SD card slot connection like spisd configuration is required.
|
||||
|
||||
- composite
|
||||
USB composite device (MSC + CDC/ACM) support
|
||||
`conn` command enables the composite device.
|
||||
|
||||
License exceptions
|
||||
==================
|
||||
|
||||
The following files are originated from the files in Pico SDK.
|
||||
So, the files are licensed under 3-Clause BSD same as Pico SDK.
|
||||
|
||||
- arch/arm/src/rp2040/rp2040_clock.c
|
||||
- arch/arm/src/rp2040/rp2040_pll.c
|
||||
- arch/arm/src/rp2040/rp2040_xosc.c
|
||||
- These are created by referring the Pico SDK clock initialization.
|
||||
|
||||
- arch/arm/src/rp2040/rp2040_pio.c
|
||||
- arch/arm/src/rp2040/rp2040_pio.h
|
||||
- arch/arm/src/rp2040/rp2040_pio_instructions.h
|
||||
- These provide the similar APIs to Pico SDK's hardware_pio APIs.
|
||||
|
||||
- arch/arm/src/rp2040/hardware/*.h
|
||||
- These are generated from rp2040.svd originally provided in Pico SDK.
|
@ -0,0 +1,76 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_AUDIO_FORMAT_MP3 is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NSH_DISABLE_MB is not set
|
||||
# CONFIG_NSH_DISABLE_MH is not set
|
||||
# CONFIG_NSH_DISABLE_MW is not set
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_AUDIO=y
|
||||
CONFIG_AUDIO_I2S=y
|
||||
CONFIG_AUDIO_I2SCHAR=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_AUDIO=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sd0"
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_I2S=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RP2040_SPISD=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_NXPLAYER=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
@ -0,0 +1,79 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_COMPOSITE=y
|
||||
CONFIG_COMPOSITE_IAD=y
|
||||
CONFIG_COMPOSITE_MSFT_OS_DESCRIPTORS=y
|
||||
CONFIG_COMPOSITE_PRODUCTID=0x2022
|
||||
CONFIG_COMPOSITE_SERIALSTR="12345"
|
||||
CONFIG_COMPOSITE_VENDORID=0x03eb
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_USBSERIAL=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RP2040_SPISD=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSTEM_COMPOSITE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_USBDEV_COMPOSITE=y
|
||||
CONFIG_USBMSC=y
|
||||
CONFIG_USBMSC_COMPOSITE=y
|
||||
CONFIG_USBMSC_NOT_STALL_BULKEP=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
103
boards/arm/rp2040/adafruit-kb2040/configs/displaypack/defconfig
Normal file
103
boards/arm/rp2040/adafruit-kb2040/configs/displaypack/defconfig
Normal file
@ -0,0 +1,103 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_DEV_CONSOLE is not set
|
||||
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_PACKEDMSFIRST is not set
|
||||
# CONFIG_NX_WRITEONLY is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_CONSOLE=y
|
||||
CONFIG_DEBUG_ASSERTIONS=y
|
||||
CONFIG_DEBUG_FEATURES=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_NX=y
|
||||
CONFIG_EXAMPLES_NXDEMO=y
|
||||
CONFIG_EXAMPLES_NXDEMO_BPP=16
|
||||
CONFIG_EXAMPLES_NXHELLO=y
|
||||
CONFIG_EXAMPLES_NXHELLO_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NX_BPP=16
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_DEV=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_MAXCONTRAST=255
|
||||
CONFIG_LCD_NOGETRUN=y
|
||||
CONFIG_LCD_ST7789=y
|
||||
CONFIG_LCD_ST7789_FREQUENCY=64000000
|
||||
CONFIG_LCD_ST7789_XOFFSET=53
|
||||
CONFIG_LCD_ST7789_XRES=135
|
||||
CONFIG_LCD_ST7789_YOFFSET=40
|
||||
CONFIG_LCD_ST7789_YRES=240
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_USBCONSOLE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONTS_PACKEDMSFIRST=y
|
||||
CONFIG_NXFONT_SANS40X49B=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SPI_CMDDATA=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
88
boards/arm/rp2040/adafruit-kb2040/configs/enc28j60/defconfig
Normal file
88
boards/arm/rp2040/adafruit-kb2040/configs/enc28j60/defconfig
Normal file
@ -0,0 +1,88 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEV_ZERO=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_ENC28J60=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NET=y
|
||||
CONFIG_NETDB_DNSCLIENT=y
|
||||
CONFIG_NETDB_DNSSERVER_NOADDR=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_NETDEV_PHY_IOCTL=y
|
||||
CONFIG_NETINIT_DHCPC=y
|
||||
CONFIG_NETINIT_DNS=y
|
||||
CONFIG_NETINIT_DNSIPADDR=0x08080808
|
||||
CONFIG_NETINIT_NOMAC=y
|
||||
CONFIG_NET_BROADCAST=y
|
||||
CONFIG_NET_ICMP=y
|
||||
CONFIG_NET_ICMP_SOCKET=y
|
||||
CONFIG_NET_LOOPBACK=y
|
||||
CONFIG_NET_ROUTE=y
|
||||
CONFIG_NET_TCP=y
|
||||
CONFIG_NET_UDP=y
|
||||
CONFIG_NET_UDP_CHECKSUMS=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_ENC28J60_INTR_GPIO=11
|
||||
CONFIG_RP2040_ENC28J60_RESET_GPIO=10
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI1=y
|
||||
CONFIG_RP2040_SPI1_GPIO=12
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_DHCPC_RENEW=y
|
||||
CONFIG_SYSTEM_NETDB=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_NTPC=y
|
||||
CONFIG_SYSTEM_PING=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_SYSTEM_SYSTEM=y
|
||||
CONFIG_SYSTEM_TELNET_CLIENT=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WQUEUE_NOTIFIER=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
61
boards/arm/rp2040/adafruit-kb2040/configs/lcd1602/defconfig
Normal file
61
boards/arm/rp2040/adafruit-kb2040/configs/lcd1602/defconfig
Normal file
@ -0,0 +1,61 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_SLCD=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD_BACKPACK=y
|
||||
CONFIG_LCD_LCD1602=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_I2C0=y
|
||||
CONFIG_RP2040_I2C0_GPIO=4
|
||||
CONFIG_RP2040_I2C=y
|
||||
CONFIG_RP2040_I2C_DRIVER=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SLCD=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
53
boards/arm/rp2040/adafruit-kb2040/configs/nsh/defconfig
Normal file
53
boards/arm/rp2040/adafruit-kb2040/configs/nsh/defconfig
Normal file
@ -0,0 +1,53 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
53
boards/arm/rp2040/adafruit-kb2040/configs/nshsram/defconfig
Normal file
53
boards/arm/rp2040/adafruit-kb2040/configs/nshsram/defconfig
Normal file
@ -0,0 +1,53 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_RP2040_FLASH_BOOT is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
59
boards/arm/rp2040/adafruit-kb2040/configs/smp/defconfig
Normal file
59
boards/arm/rp2040/adafruit-kb2040/configs/smp/defconfig
Normal file
@ -0,0 +1,59 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_NCPUS=2
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SYSTEM=y
|
||||
CONFIG_SYSTEM_TASKSET=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_SMP=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
65
boards/arm/rp2040/adafruit-kb2040/configs/spisd/defconfig
Normal file
65
boards/arm/rp2040/adafruit-kb2040/configs/spisd/defconfig
Normal file
@ -0,0 +1,65 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RP2040_SPISD=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
80
boards/arm/rp2040/adafruit-kb2040/configs/ssd1306/defconfig
Normal file
80
boards/arm/rp2040/adafruit-kb2040/configs/ssd1306/defconfig
Normal file
@ -0,0 +1,80 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NX_DISABLE_1BPP is not set
|
||||
# CONFIG_NX_PACKEDMSFIRST is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_NX=y
|
||||
CONFIG_EXAMPLES_NXDEMO=y
|
||||
CONFIG_EXAMPLES_NXHELLO=y
|
||||
CONFIG_EXAMPLES_NXHELLO_BPP=1
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=1
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=1
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xff
|
||||
CONFIG_EXAMPLES_NXLINES_LINEWIDTH=1
|
||||
CONFIG_EXAMPLES_NX_BPP=1
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_DEV=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_MAXCONTRAST=255
|
||||
CONFIG_LCD_SH1106_OLED_132=y
|
||||
CONFIG_LCD_SSD1306_I2C=y
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONTS_PACKEDMSFIRST=y
|
||||
CONFIG_NXFONT_SANS20X26=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_I2C0=y
|
||||
CONFIG_RP2040_I2C0_GPIO=4
|
||||
CONFIG_RP2040_I2C=y
|
||||
CONFIG_RP2040_I2C_DRIVER=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
64
boards/arm/rp2040/adafruit-kb2040/configs/st7735/defconfig
Normal file
64
boards/arm/rp2040/adafruit-kb2040/configs/st7735/defconfig
Normal file
@ -0,0 +1,64 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_PORTRAIT=y
|
||||
CONFIG_LCD_ST7735=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI1=y
|
||||
CONFIG_RP2040_SPI1_GPIO=12
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SPI_CMDDATA=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
72
boards/arm/rp2040/adafruit-kb2040/configs/usbmsc/defconfig
Normal file
72
boards/arm/rp2040/adafruit-kb2040/configs/usbmsc/defconfig
Normal file
@ -0,0 +1,72 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_SPI_CALLBACK is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_USBSERIAL=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_SPI0=y
|
||||
CONFIG_RP2040_SPI0_GPIO=16
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RP2040_SPISD=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSTEM_CDCACM=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_SYSTEM_USBMSC=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_USBMSC=y
|
||||
CONFIG_USBMSC_NOT_STALL_BULKEP=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
57
boards/arm/rp2040/adafruit-kb2040/configs/usbnsh/defconfig
Normal file
57
boards/arm/rp2040/adafruit-kb2040/configs/usbnsh/defconfig
Normal file
@ -0,0 +1,57 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_DEV_CONSOLE is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_RP2040_UART0 is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_CONSOLE=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NSH_USBCONSOLE=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
@ -0,0 +1,100 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_PACKEDMSFIRST is not set
|
||||
# CONFIG_NX_WRITEONLY is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_ASSERTIONS=y
|
||||
CONFIG_DEBUG_FEATURES=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_NX=y
|
||||
CONFIG_EXAMPLES_NXDEMO=y
|
||||
CONFIG_EXAMPLES_NXDEMO_BPP=16
|
||||
CONFIG_EXAMPLES_NXHELLO=y
|
||||
CONFIG_EXAMPLES_NXHELLO_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NX_BPP=16
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_DEV=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_MAXCONTRAST=255
|
||||
CONFIG_LCD_NOGETRUN=y
|
||||
CONFIG_LCD_ST7789=y
|
||||
CONFIG_LCD_ST7789_FREQUENCY=64000000
|
||||
CONFIG_LCD_ST7789_XOFFSET=53
|
||||
CONFIG_LCD_ST7789_XRES=135
|
||||
CONFIG_LCD_ST7789_YOFFSET=40
|
||||
CONFIG_LCD_ST7789_YRES=240
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONTS_PACKEDMSFIRST=y
|
||||
CONFIG_NXFONT_SANS40X49B=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_LCD_SPI_CH=1
|
||||
CONFIG_RP2040_SPI1=y
|
||||
CONFIG_RP2040_SPI1_GPIO=8
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SPI_CMDDATA=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
@ -0,0 +1,97 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_EXAMPLES_NXLINES_DEFAULT_COLORS is not set
|
||||
# CONFIG_FS_PROCFS_EXCLUDE_ENVIRON is not set
|
||||
# CONFIG_LIBC_LONG_LONG is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_LOSMART is not set
|
||||
# CONFIG_NXFONTS_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_DISABLE_16BPP is not set
|
||||
# CONFIG_NX_PACKEDMSFIRST is not set
|
||||
# CONFIG_NX_WRITEONLY is not set
|
||||
# CONFIG_STANDARD_SERIAL is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="adafruit-kb2040"
|
||||
CONFIG_ARCH_BOARD_COMMON=y
|
||||
CONFIG_ARCH_BOARD_ADAFRUIT_KB2040=y
|
||||
CONFIG_ARCH_CHIP="rp2040"
|
||||
CONFIG_ARCH_CHIP_RP2040=y
|
||||
CONFIG_ARCH_RAMVECTORS=y
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=10450
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_ASSERTIONS=y
|
||||
CONFIG_DEBUG_FEATURES=y
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DISABLE_POSIX_TIMERS=y
|
||||
CONFIG_DRIVERS_VIDEO=y
|
||||
CONFIG_EXAMPLES_FB=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_EXAMPLES_NX=y
|
||||
CONFIG_EXAMPLES_NXDEMO=y
|
||||
CONFIG_EXAMPLES_NXDEMO_BPP=16
|
||||
CONFIG_EXAMPLES_NXHELLO=y
|
||||
CONFIG_EXAMPLES_NXHELLO_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=16
|
||||
CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NX_BPP=16
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_LCD=y
|
||||
CONFIG_LCD_DEV=y
|
||||
CONFIG_LCD_FRAMEBUFFER=y
|
||||
CONFIG_LCD_MAXCONTRAST=255
|
||||
CONFIG_LCD_NOGETRUN=y
|
||||
CONFIG_LCD_ST7789=y
|
||||
CONFIG_LCD_ST7789_FREQUENCY=64000000
|
||||
CONFIG_LCD_ST7789_YRES=240
|
||||
CONFIG_MQ_MAXMSGSIZE=64
|
||||
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_NX=y
|
||||
CONFIG_NXFONTS_PACKEDMSFIRST=y
|
||||
CONFIG_NXFONT_SANS40X49B=y
|
||||
CONFIG_NX_BLOCKING=y
|
||||
CONFIG_RAM_SIZE=270336
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_RP2040_LCD_SPI_CH=1
|
||||
CONFIG_RP2040_SPI1=y
|
||||
CONFIG_RP2040_SPI1_GPIO=8
|
||||
CONFIG_RP2040_SPI=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SPI_CMDDATA=y
|
||||
CONFIG_START_DAY=9
|
||||
CONFIG_START_MONTH=2
|
||||
CONFIG_START_YEAR=2021
|
||||
CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_SYSTEM_I2CTOOL=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
CONFIG_WS2812=y
|
||||
CONFIG_RP2040_BOARD_HAS_WS2812=y
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN=17
|
116
boards/arm/rp2040/adafruit-kb2040/include/board.h
Normal file
116
boards/arm/rp2040/adafruit-kb2040/include/board.h
Normal file
@ -0,0 +1,116 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/include/board.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_BOARD_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_BOARD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include "rp2040_i2cdev.h"
|
||||
#include "rp2040_spidev.h"
|
||||
#include "rp2040_i2sdev.h"
|
||||
|
||||
#include "rp2040_spisd.h"
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Clocking *****************************************************************/
|
||||
|
||||
#define MHZ 1000000
|
||||
|
||||
#define BOARD_XOSC_FREQ (12 * MHZ)
|
||||
#define BOARD_PLL_SYS_FREQ (125 * MHZ)
|
||||
#define BOARD_PLL_USB_FREQ (48 * MHZ)
|
||||
|
||||
#define BOARD_REF_FREQ (12 * MHZ)
|
||||
#define BOARD_SYS_FREQ (125 * MHZ)
|
||||
#define BOARD_PERI_FREQ (125 * MHZ)
|
||||
#define BOARD_USB_FREQ (48 * MHZ)
|
||||
#define BOARD_ADC_FREQ (48 * MHZ)
|
||||
#define BOARD_RTC_FREQ 46875
|
||||
|
||||
#define BOARD_UART_BASEFREQ BOARD_PERI_FREQ
|
||||
|
||||
#define BOARD_TICK_CLOCK (1 * MHZ)
|
||||
|
||||
/* GPIO definitions *********************************************************/
|
||||
|
||||
#undef BOARD_GPIO_LED_PIN
|
||||
#define BOARD_NGPIOOUT 1
|
||||
#define BOARD_NGPIOIN 1
|
||||
#define BOARD_NGPIOINT 1
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_boardearlyinitialize
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void rp2040_boardearlyinitialize(void);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void rp2040_boardinitialize(void);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_BOARD_H */
|
72
boards/arm/rp2040/adafruit-kb2040/include/rp2040_i2cdev.h
Normal file
72
boards/arm/rp2040/adafruit-kb2040/include/rp2040_i2cdev.h
Normal file
@ -0,0 +1,72 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/include/rp2040_i2cdev.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_I2CDEV_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_I2CDEV_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_i2cdev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize i2c driver and register the /dev/i2c device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_I2C_DRIVER
|
||||
int board_i2cdev_initialize(int bus);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_I2CDEV_H */
|
72
boards/arm/rp2040/adafruit-kb2040/include/rp2040_i2sdev.h
Normal file
72
boards/arm/rp2040/adafruit-kb2040/include/rp2040_i2sdev.h
Normal file
@ -0,0 +1,72 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/include/rp2040_i2sdev.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_I2SDEV_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_I2SDEV_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_i2sdev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize i2s driver and register the /dev/audio/pcm0 device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_I2S
|
||||
int board_i2sdev_initialize(int bus);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_I2SDEV_H */
|
69
boards/arm/rp2040/adafruit-kb2040/include/rp2040_spidev.h
Normal file
69
boards/arm/rp2040/adafruit-kb2040/include/rp2040_spidev.h
Normal file
@ -0,0 +1,69 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/include/rp2040_spidev.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_SPIDEV_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_SPIDEV_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_spidev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize spi driver and register the /dev/spi device.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_spidev_initialize(int bus);
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_SPIDEV_H */
|
83
boards/arm/rp2040/adafruit-kb2040/include/rp2040_spisd.h
Normal file
83
boards/arm/rp2040/adafruit-kb2040/include/rp2040_spisd.h
Normal file
@ -0,0 +1,83 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/include/rp2040_spisd.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_SPISD_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_SPISD_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_spisd_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the SPI-based SD card.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_SPISD
|
||||
int board_spisd_initialize(int minor, int bus);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_spisd_status
|
||||
*
|
||||
* Description:
|
||||
* Get the status whether SD Card is present or not.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_SPISD
|
||||
uint8_t board_spisd_status(struct spi_dev_s *dev, uint32_t devid);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_INCLUDE_RP2040_SPISD_H */
|
45
boards/arm/rp2040/adafruit-kb2040/scripts/Make.defs
Normal file
45
boards/arm/rp2040/adafruit-kb2040/scripts/Make.defs
Normal file
@ -0,0 +1,45 @@
|
||||
############################################################################
|
||||
# boards/arm/rp2040/adafruit-kb2040/scripts/Make.defs
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include $(TOPDIR)/.config
|
||||
include $(TOPDIR)/tools/Config.mk
|
||||
include $(TOPDIR)/tools/rp2040/Config.mk
|
||||
include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs
|
||||
|
||||
ifeq ($(CONFIG_RP2040_FLASH_BOOT),y)
|
||||
LDSCRIPT = adafruit-kb2040-flash.ld
|
||||
else
|
||||
LDSCRIPT = adafruit-kb2040-sram.ld
|
||||
endif
|
||||
|
||||
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
|
||||
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
||||
CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||
CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
|
||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||
CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
|
||||
AFLAGS := $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
@ -0,0 +1,112 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/scripts/adafruit-kb2040-flash.ld
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
flash (rx) : ORIGIN = 0x10000000, LENGTH = 2048K
|
||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 264K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
EXTERN(_vectors)
|
||||
ENTRY(_stext)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.flash_begin : {
|
||||
__flash_binary_start = .;
|
||||
} > flash
|
||||
|
||||
.boot2 : {
|
||||
__boot2_start__ = .;
|
||||
KEEP (*(.boot2))
|
||||
__boot2_end__ = .;
|
||||
} > flash
|
||||
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
*(.init_array .init_array.*)
|
||||
_einit = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > flash
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > flash
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
|
||||
.ram_vectors (COPY) : {
|
||||
*(.ram_vectors)
|
||||
} > sram
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
. = ALIGN(4);
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram AT > flash
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/scripts/adafruit-kb2040-sram.ld
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 264K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
EXTERN(_vectors)
|
||||
ENTRY(_stext)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
rp2040_start.o(.text)
|
||||
. = ALIGN(256);
|
||||
*(.vectors)
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
*(.init_array .init_array.*)
|
||||
_einit = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > sram
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > sram
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
. = ALIGN(4);
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
41
boards/arm/rp2040/adafruit-kb2040/src/Make.defs
Normal file
41
boards/arm/rp2040/adafruit-kb2040/src/Make.defs
Normal file
@ -0,0 +1,41 @@
|
||||
############################################################################
|
||||
# boards/arm/rp2040/adafruit-kb2040/src/Make.defs
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
include $(TOPDIR)/Make.defs
|
||||
|
||||
CSRCS = rp2040_boardinitialize.c
|
||||
CSRCS += rp2040_appinit.c
|
||||
CSRCS += rp2040_bringup.c
|
||||
|
||||
ifeq ($(CONFIG_BOARDCTL_RESET),y)
|
||||
CSRCS += rp2040_reset.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SPI),y)
|
||||
CSRCS += rp2040_spi.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEV_GPIO),y)
|
||||
CSRCS += rp2040_gpio.c
|
||||
endif
|
||||
|
||||
DEPPATH += --dep-path board
|
||||
VPATH += :board
|
||||
CFLAGS += $(shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board)
|
76
boards/arm/rp2040/adafruit-kb2040/src/rp2040_appinit.c
Normal file
76
boards/arm/rp2040/adafruit-kb2040/src/rp2040_appinit.c
Normal file
@ -0,0 +1,76 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/src/rp2040_appinit.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/board.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "rp2040_pico.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX; the meaning of the argument is a contract
|
||||
* between the board-specific initialization logic and the
|
||||
* matching application logic. The value could be such things as a
|
||||
* mode enumeration value, a set of DIP switch switch settings, a
|
||||
* pointer to configuration data read from a file or serial FLASH,
|
||||
* or whatever you would like to do with it. Every implementation
|
||||
* should accept zero/NULL as a default configuration.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
/* Board initialization already performed by board_late_initialize() */
|
||||
|
||||
return OK;
|
||||
#else
|
||||
/* Perform board-specific initialization */
|
||||
|
||||
return rp2040_bringup();
|
||||
#endif
|
||||
}
|
160
boards/arm/rp2040/adafruit-kb2040/src/rp2040_boardinitialize.c
Normal file
160
boards/arm/rp2040/adafruit-kb2040/src/rp2040_boardinitialize.c
Normal file
@ -0,0 +1,160 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/src/rp2040_boardinitialize.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
#include "rp2040_gpio.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_boardearlyinitialize
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void rp2040_boardearlyinitialize(void)
|
||||
{
|
||||
rp2040_gpio_initialize();
|
||||
|
||||
/* Disable IE on GPIO 26-29 */
|
||||
|
||||
clrbits_reg32(RP2040_PADS_BANK0_GPIO_IE, RP2040_PADS_BANK0_GPIO(26));
|
||||
clrbits_reg32(RP2040_PADS_BANK0_GPIO_IE, RP2040_PADS_BANK0_GPIO(27));
|
||||
clrbits_reg32(RP2040_PADS_BANK0_GPIO_IE, RP2040_PADS_BANK0_GPIO(28));
|
||||
clrbits_reg32(RP2040_PADS_BANK0_GPIO_IE, RP2040_PADS_BANK0_GPIO(29));
|
||||
|
||||
/* Set default UART pin */
|
||||
|
||||
#if defined(CONFIG_RP2040_UART0) && CONFIG_RP2040_UART0_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART0_GPIO,
|
||||
RP2040_GPIO_FUNC_UART); /* TX */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART0_GPIO + 1,
|
||||
RP2040_GPIO_FUNC_UART); /* RX */
|
||||
#ifdef CONFIG_SERIAL_OFLOWCONTROL
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART0_GPIO + 2,
|
||||
RP2040_GPIO_FUNC_UART); /* CTS */
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_IFLOWCONTROL
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART0_GPIO + 3,
|
||||
RP2040_GPIO_FUNC_UART); /* RTS */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_UART1) && CONFIG_RP2040_UART1_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART1_GPIO,
|
||||
RP2040_GPIO_FUNC_UART); /* TX */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART1_GPIO + 1,
|
||||
RP2040_GPIO_FUNC_UART); /* RX */
|
||||
#ifdef CONFIG_SERIAL_OFLOWCONTROL
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART1_GPIO + 2,
|
||||
RP2040_GPIO_FUNC_UART); /* CTS */
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_IFLOWCONTROL
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_UART1_GPIO + 3,
|
||||
RP2040_GPIO_FUNC_UART); /* RTS */
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void rp2040_boardinitialize(void)
|
||||
{
|
||||
/* Set default I2C pin */
|
||||
|
||||
#if defined(CONFIG_RP2040_I2C0) && CONFIG_RP2040_I2C0_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_I2C0_GPIO,
|
||||
RP2040_GPIO_FUNC_I2C); /* SDA */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_I2C0_GPIO + 1,
|
||||
RP2040_GPIO_FUNC_I2C); /* SCL */
|
||||
|
||||
rp2040_gpio_set_pulls(CONFIG_RP2040_I2C0_GPIO, true, false); /* Pull up */
|
||||
rp2040_gpio_set_pulls(CONFIG_RP2040_I2C0_GPIO + 1, true, false);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_I2C1) && CONFIG_RP2040_I2C1_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_I2C1_GPIO,
|
||||
RP2040_GPIO_FUNC_I2C); /* SDA */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_I2C1_GPIO + 1,
|
||||
RP2040_GPIO_FUNC_I2C); /* SCL */
|
||||
|
||||
rp2040_gpio_set_pulls(CONFIG_RP2040_I2C1_GPIO, true, false); /* Pull up */
|
||||
rp2040_gpio_set_pulls(CONFIG_RP2040_I2C1_GPIO + 1, true, false);
|
||||
#endif
|
||||
|
||||
/* Set default SPI pin */
|
||||
|
||||
#if defined(CONFIG_RP2040_SPI0) && CONFIG_RP2040_SPI0_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI0_GPIO,
|
||||
RP2040_GPIO_FUNC_SPI); /* RX */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI0_GPIO + 2,
|
||||
RP2040_GPIO_FUNC_SPI); /* SCK */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI0_GPIO + 3,
|
||||
RP2040_GPIO_FUNC_SPI); /* TX */
|
||||
|
||||
/* CSn is controlled by board-specific logic */
|
||||
|
||||
rp2040_gpio_init(CONFIG_RP2040_SPI0_GPIO + 1); /* CSn */
|
||||
rp2040_gpio_setdir(CONFIG_RP2040_SPI0_GPIO + 1, true);
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI0_GPIO + 1, true);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_SPI1) && CONFIG_RP2040_SPI1_GPIO >= 0
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI1_GPIO,
|
||||
RP2040_GPIO_FUNC_SPI); /* RX */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI1_GPIO + 2,
|
||||
RP2040_GPIO_FUNC_SPI); /* SCK */
|
||||
rp2040_gpio_set_function(CONFIG_RP2040_SPI1_GPIO + 3,
|
||||
RP2040_GPIO_FUNC_SPI); /* TX */
|
||||
|
||||
/* CSn is controlled by board-specific logic */
|
||||
|
||||
rp2040_gpio_init(CONFIG_RP2040_SPI1_GPIO + 1); /* CSn */
|
||||
rp2040_gpio_setdir(CONFIG_RP2040_SPI1_GPIO + 1, true);
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI1_GPIO + 1, true);
|
||||
#endif
|
||||
}
|
466
boards/arm/rp2040/adafruit-kb2040/src/rp2040_bringup.c
Normal file
466
boards/arm/rp2040/adafruit-kb2040/src/rp2040_bringup.c
Normal file
@ -0,0 +1,466 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/src/rp2040_bringup.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "rp2040_pico.h"
|
||||
|
||||
#ifdef CONFIG_LCD_BACKPACK
|
||||
#include "rp2040_lcd_backpack.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD
|
||||
#include <nuttx/board.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_DEV
|
||||
#include <nuttx/lcd/lcd_dev.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO_FB
|
||||
#include <nuttx/video/fb.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_INA219
|
||||
#include <nuttx/sensors/ina219.h>
|
||||
#include "rp2040_ina219.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_BMP180
|
||||
#include <nuttx/sensors/bmp180.h>
|
||||
#include "rp2040_bmp180.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_PWM
|
||||
#include "rp2040_pwm.h"
|
||||
#include "rp2040_pwmdev.h"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RP2040_BOARD_HAS_WS2812) && defined(CONFIG_WS2812)
|
||||
#include "rp2040_ws2812.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WS2812_HAS_WHITE
|
||||
#define HAS_WHITE true
|
||||
#else /* CONFIG_WS2812_HAS_WHITE */
|
||||
#define HAS_WHITE false
|
||||
#endif /* CONFIG_WS2812_HAS_WHITE */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_bringup
|
||||
****************************************************************************/
|
||||
|
||||
int rp2040_bringup(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
#ifdef CONFIG_RP2040_I2C_DRIVER
|
||||
#ifdef CONFIG_RP2040_I2C0
|
||||
ret = board_i2cdev_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize I2C0.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_I2C1
|
||||
ret = board_i2cdev_initialize(1);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize I2C1.\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_SPI_DRIVER
|
||||
#ifdef CONFIG_RP2040_SPI0
|
||||
ret = board_spidev_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize SPI0.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_SPI1
|
||||
ret = board_spidev_initialize(1);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize SPI1.\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_PWM
|
||||
# ifdef CONFIG_RP2040_PWM0
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(0,
|
||||
CONFIG_RP2040_PWM0A_GPIO,
|
||||
CONFIG_RP2040_PWM0B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM0A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM0B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM0_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(0,
|
||||
CONFIG_RP2040_PWM0A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM0A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM0_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM0.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM1
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(1,
|
||||
CONFIG_RP2040_PWM1A_GPIO,
|
||||
CONFIG_RP2040_PWM1B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM1A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM1B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM1_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(1,
|
||||
CONFIG_RP2040_PWM1A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM1A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM1_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM1.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM2
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(2,
|
||||
CONFIG_RP2040_PWM2A_GPIO,
|
||||
CONFIG_RP2040_PWM2B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM2A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM2B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM2_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(2,
|
||||
CONFIG_RP2040_PWM2A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM2A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM2_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM2.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM3
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(3,
|
||||
CONFIG_RP2040_PWM3A_GPIO,
|
||||
CONFIG_RP2040_PWM3B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM3A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM3B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM3_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(3,
|
||||
CONFIG_RP2040_PWM3A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM3A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM3_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM3.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM4
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(4,
|
||||
CONFIG_RP2040_PWM4A_GPIO,
|
||||
CONFIG_RP2040_PWM4B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM4A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM4B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM4_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(4,
|
||||
CONFIG_RP2040_PWM4A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM4A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM4_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM4.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM5
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(5,
|
||||
CONFIG_RP2040_PWM5A_GPIO,
|
||||
CONFIG_RP2040_PWM5B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM5A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM5B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM5_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(5,
|
||||
CONFIG_RP2040_PWM5A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM5A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM5_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM5.\n");
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef CONFIG_RP2040_PWM6
|
||||
# if defined(CONFIG_PWM_NCHANNELS) && CONFIG_PWM_NCHANNELS == 2
|
||||
ret = rp2040_pwmdev_initialize(6,
|
||||
CONFIG_RP2040_PWM6A_GPIO,
|
||||
CONFIG_RP2040_PWM6B_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM6A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM6B_INVERT
|
||||
| RP2040_PWM_CSR_B_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM6_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# else
|
||||
ret = rp2040_pwmdev_initialize(6,
|
||||
CONFIG_RP2040_PWM6A_GPIO,
|
||||
(0
|
||||
# ifdef CONFIG_RP2040_PWM6A_INVERT
|
||||
| RP2040_PWM_CSR_A_INV
|
||||
# endif
|
||||
# ifdef CONFIG_RP2040_PWM6_PHASE_CORRECT
|
||||
| RP2040_PWM_CSR_PH_CORRECT
|
||||
# endif
|
||||
));
|
||||
# endif
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize PWM6.\n");
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_SPISD
|
||||
/* Mount the SPI-based MMC/SD block driver */
|
||||
|
||||
ret = board_spisd_initialize(0, CONFIG_RP2040_SPISD_SPI_CH);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize SPI device to MMC/SD: %d\n",
|
||||
ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
serr("ERROR: Failed to mount procfs at %s: %d\n", "/proc", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_BMP180
|
||||
/* Try to register BMP180 device in I2C0 */
|
||||
|
||||
ret = board_bmp180_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "Failed to initialize BMP180 driver: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SENSORS_INA219
|
||||
/* Configure and initialize the INA219 sensor in I2C0 */
|
||||
|
||||
ret = board_ina219_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: rp2040_ina219_initialize() failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VIDEO_FB
|
||||
ret = fb_register(0, 0);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize Frame Buffer Driver.\n");
|
||||
}
|
||||
#elif defined(CONFIG_LCD)
|
||||
ret = board_lcd_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: Failed to initialize LCD.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_DEV
|
||||
ret = lcddev_register(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: lcddev_register() failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LCD_BACKPACK
|
||||
/* slcd:0, i2c:0, rows=2, cols=16 */
|
||||
|
||||
ret = board_lcd_backpack_init(0, 0, 2, 16);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "Failed to initialize PCF8574 LCD, error %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_I2S
|
||||
ret = board_i2sdev_initialize(0);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: Failed to initialize I2S.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEV_GPIO
|
||||
ret = rp2040_dev_gpio_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "Failed to initialize GPIO Driver: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Initialize board neo-pixel */
|
||||
|
||||
#if defined(CONFIG_RP2040_BOARD_HAS_WS2812) && defined(CONFIG_WS2812)
|
||||
rp2040_ws2812_setup("/dev/leds0",
|
||||
CONFIG_RP2040_WS2812_GPIO_PIN,
|
||||
CONFIG_WS2812_LED_COUNT,
|
||||
HAS_WHITE);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
392
boards/arm/rp2040/adafruit-kb2040/src/rp2040_gpio.c
Normal file
392
boards/arm/rp2040/adafruit-kb2040/src/rp2040_gpio.c
Normal file
@ -0,0 +1,392 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/src/rp2040_gpio.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <arch/irq.h>
|
||||
#include <assert.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/ioexpander/gpio.h>
|
||||
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
#include "chip.h"
|
||||
#include "rp2040_gpio.h"
|
||||
|
||||
#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_GPIO_LOWER_HALF)
|
||||
|
||||
/* Output pins. GPIO25 is onboard LED any other outputs could be used.
|
||||
*/
|
||||
|
||||
#define GPIO_OUT1 25
|
||||
|
||||
/* Input pins.
|
||||
*/
|
||||
|
||||
#define GPIO_IN1 6
|
||||
|
||||
/* Interrupt pins.
|
||||
*/
|
||||
|
||||
#define GPIO_IRQPIN1 11
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
struct rp2040gpio_dev_s
|
||||
{
|
||||
struct gpio_dev_s gpio;
|
||||
uint8_t id;
|
||||
};
|
||||
|
||||
struct rp2040gpint_dev_s
|
||||
{
|
||||
struct rp2040gpio_dev_s rp2040gpio;
|
||||
pin_interrupt_t callback;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOOUT > 0
|
||||
static int gpout_read(struct gpio_dev_s *dev, bool *value);
|
||||
static int gpout_write(struct gpio_dev_s *dev, bool value);
|
||||
#endif
|
||||
|
||||
#if BOARD_NGPIOIN > 0
|
||||
static int gpin_read(struct gpio_dev_s *dev, bool *value);
|
||||
#endif
|
||||
|
||||
#if BOARD_NGPIOINT > 0
|
||||
static int gpint_read(struct gpio_dev_s *dev, bool *value);
|
||||
static int gpint_attach(struct gpio_dev_s *dev,
|
||||
pin_interrupt_t callback);
|
||||
static int gpint_enable(struct gpio_dev_s *dev, bool enable);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOOUT > 0
|
||||
static const struct gpio_operations_s gpout_ops =
|
||||
{
|
||||
.go_read = gpout_read,
|
||||
.go_write = gpout_write,
|
||||
.go_attach = NULL,
|
||||
.go_enable = NULL,
|
||||
};
|
||||
|
||||
/* This array maps the GPIO pins used as OUTPUT */
|
||||
|
||||
static const uint32_t g_gpiooutputs[BOARD_NGPIOOUT] =
|
||||
{
|
||||
GPIO_OUT1
|
||||
};
|
||||
|
||||
static struct rp2040gpio_dev_s g_gpout[BOARD_NGPIOOUT];
|
||||
#endif
|
||||
|
||||
#if BOARD_NGPIOIN > 0
|
||||
static const struct gpio_operations_s gpin_ops =
|
||||
{
|
||||
.go_read = gpin_read,
|
||||
.go_write = NULL,
|
||||
.go_attach = NULL,
|
||||
.go_enable = NULL,
|
||||
};
|
||||
|
||||
/* This array maps the GPIO pins used as INTERRUPT INPUTS */
|
||||
|
||||
static const uint32_t g_gpioinputs[BOARD_NGPIOIN] =
|
||||
{
|
||||
GPIO_IN1
|
||||
};
|
||||
|
||||
static struct rp2040gpio_dev_s g_gpin[BOARD_NGPIOIN];
|
||||
#endif
|
||||
|
||||
#if BOARD_NGPIOINT > 0
|
||||
static const struct gpio_operations_s gpint_ops =
|
||||
{
|
||||
.go_read = gpint_read,
|
||||
.go_write = NULL,
|
||||
.go_attach = gpint_attach,
|
||||
.go_enable = gpint_enable,
|
||||
};
|
||||
|
||||
/* This array maps the GPIO pins used as INTERRUPT INPUTS */
|
||||
|
||||
static const uint32_t g_gpiointinputs[BOARD_NGPIOINT] =
|
||||
{
|
||||
GPIO_IRQPIN1,
|
||||
};
|
||||
|
||||
static struct rp2040gpint_dev_s g_gpint[BOARD_NGPIOINT];
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpout_read
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOOUT > 0
|
||||
static int gpout_read(struct gpio_dev_s *dev, bool *value)
|
||||
{
|
||||
struct rp2040gpio_dev_s *rp2040gpio =
|
||||
(struct rp2040gpio_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(rp2040gpio != NULL && value != NULL);
|
||||
DEBUGASSERT(rp2040gpio->id < BOARD_NGPIOOUT);
|
||||
gpioinfo("Reading...\n");
|
||||
|
||||
*value = rp2040_gpio_get(g_gpiooutputs[rp2040gpio->id]);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpout_write
|
||||
****************************************************************************/
|
||||
|
||||
static int gpout_write(struct gpio_dev_s *dev, bool value)
|
||||
{
|
||||
struct rp2040gpio_dev_s *rp2040gpio =
|
||||
(struct rp2040gpio_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(rp2040gpio != NULL);
|
||||
DEBUGASSERT(rp2040gpio->id < BOARD_NGPIOOUT);
|
||||
gpioinfo("Writing %d\n", (int)value);
|
||||
|
||||
rp2040_gpio_put(g_gpiooutputs[rp2040gpio->id], value);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpin_read
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOIN > 0
|
||||
static int gpin_read(struct gpio_dev_s *dev, bool *value)
|
||||
{
|
||||
struct rp2040gpio_dev_s *rp2040gpio =
|
||||
(struct rp2040gpio_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(rp2040gpio != NULL && value != NULL);
|
||||
DEBUGASSERT(rp2040gpio->id < BOARD_NGPIOIN);
|
||||
gpioinfo("Reading... pin %d\n", (int)g_gpioinputs[rp2040gpio->id]);
|
||||
|
||||
*value = rp2040_gpio_get(g_gpioinputs[rp2040gpio->id]);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040gpio_interrupt
|
||||
****************************************************************************/
|
||||
|
||||
#if BOARD_NGPIOINT > 0
|
||||
static int rp2040gpio_interrupt(int irq, void *context, void *arg)
|
||||
{
|
||||
struct rp2040gpint_dev_s *rp2040gpint =
|
||||
(struct rp2040gpint_dev_s *)arg;
|
||||
|
||||
DEBUGASSERT(rp2040gpint != NULL && rp2040gpint->callback != NULL);
|
||||
gpioinfo("Interrupt! callback=%p\n", rp2040gpint->callback);
|
||||
|
||||
rp2040gpint->callback(&rp2040gpint->rp2040gpio.gpio,
|
||||
rp2040gpint->rp2040gpio.id);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpint_read
|
||||
****************************************************************************/
|
||||
|
||||
static int gpint_read(struct gpio_dev_s *dev, bool *value)
|
||||
{
|
||||
struct rp2040gpint_dev_s *rp2040gpint =
|
||||
(struct rp2040gpint_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(rp2040gpint != NULL && value != NULL);
|
||||
DEBUGASSERT(rp2040gpint->rp2040gpio.id < BOARD_NGPIOINT);
|
||||
gpioinfo("Reading int pin...\n");
|
||||
|
||||
*value = rp2040_gpio_get(g_gpiointinputs[rp2040gpint->rp2040gpio.id]);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpint_attach
|
||||
****************************************************************************/
|
||||
|
||||
static int gpint_attach(struct gpio_dev_s *dev,
|
||||
pin_interrupt_t callback)
|
||||
{
|
||||
struct rp2040gpint_dev_s *rp2040gpint =
|
||||
(struct rp2040gpint_dev_s *)dev;
|
||||
int irq = g_gpiointinputs[rp2040gpint->rp2040gpio.id];
|
||||
int ret;
|
||||
|
||||
gpioinfo("Attaching the callback\n");
|
||||
|
||||
/* Make sure the interrupt is disabled */
|
||||
|
||||
rp2040_gpio_disable_irq(irq);
|
||||
ret = rp2040_gpio_irq_attach(irq,
|
||||
RP2040_GPIO_INTR_EDGE_LOW,
|
||||
rp2040gpio_interrupt,
|
||||
&g_gpint[rp2040gpint->rp2040gpio.id]);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: gpint_attach() failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
gpioinfo("Attach %p\n", callback);
|
||||
rp2040gpint->callback = callback;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: gpint_enable
|
||||
****************************************************************************/
|
||||
|
||||
static int gpint_enable(struct gpio_dev_s *dev, bool enable)
|
||||
{
|
||||
struct rp2040gpint_dev_s *rp2040gpint =
|
||||
(struct rp2040gpint_dev_s *)dev;
|
||||
int irq = g_gpiointinputs[rp2040gpint->rp2040gpio.id];
|
||||
|
||||
if (enable)
|
||||
{
|
||||
if (rp2040gpint->callback != NULL)
|
||||
{
|
||||
gpioinfo("Enabling the interrupt\n");
|
||||
|
||||
/* Configure the interrupt for rising edge */
|
||||
|
||||
rp2040_gpio_enable_irq(irq);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gpioinfo("Disable the interrupt\n");
|
||||
rp2040_gpio_disable_irq(irq);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_dev_gpio_init
|
||||
****************************************************************************/
|
||||
|
||||
int rp2040_dev_gpio_init(void)
|
||||
{
|
||||
int i;
|
||||
int pincount = 0;
|
||||
|
||||
#if BOARD_NGPIOOUT > 0
|
||||
for (i = 0; i < BOARD_NGPIOOUT; i++)
|
||||
{
|
||||
/* Setup and register the GPIO pin */
|
||||
|
||||
g_gpout[i].gpio.gp_pintype = GPIO_OUTPUT_PIN;
|
||||
g_gpout[i].gpio.gp_ops = &gpout_ops;
|
||||
g_gpout[i].id = i;
|
||||
gpio_pin_register(&g_gpout[i].gpio, g_gpiooutputs[i]);
|
||||
|
||||
/* Configure the pins that will be used as output */
|
||||
|
||||
rp2040_gpio_init(g_gpiooutputs[i]);
|
||||
rp2040_gpio_setdir(g_gpiooutputs[i], true);
|
||||
rp2040_gpio_put(g_gpiooutputs[i], false);
|
||||
|
||||
pincount++;
|
||||
}
|
||||
#endif
|
||||
|
||||
pincount = 0;
|
||||
|
||||
#if BOARD_NGPIOIN > 0
|
||||
for (i = 0; i < BOARD_NGPIOIN; i++)
|
||||
{
|
||||
/* Setup and register the GPIO pin */
|
||||
|
||||
g_gpin[i].gpio.gp_pintype = GPIO_INPUT_PIN;
|
||||
g_gpin[i].gpio.gp_ops = &gpin_ops;
|
||||
g_gpin[i].id = i;
|
||||
gpio_pin_register(&g_gpin[i].gpio, g_gpioinputs[i]);
|
||||
|
||||
/* Configure the pins that will be used as INPUT */
|
||||
|
||||
rp2040_gpio_init(g_gpioinputs[i]);
|
||||
|
||||
pincount++;
|
||||
}
|
||||
#endif
|
||||
|
||||
pincount = 0;
|
||||
|
||||
#if BOARD_NGPIOINT > 0
|
||||
for (i = 0; i < BOARD_NGPIOINT; i++)
|
||||
{
|
||||
/* Setup and register the GPIO pin */
|
||||
|
||||
g_gpint[i].rp2040gpio.gpio.gp_pintype = GPIO_INTERRUPT_PIN;
|
||||
g_gpint[i].rp2040gpio.gpio.gp_ops = &gpint_ops;
|
||||
g_gpint[i].rp2040gpio.id = i;
|
||||
gpio_pin_register(&g_gpint[i].rp2040gpio.gpio, g_gpiointinputs[i]);
|
||||
|
||||
/* Configure the pins that will be used as interrupt input */
|
||||
|
||||
rp2040_gpio_init(g_gpiointinputs[i]);
|
||||
|
||||
/* pull-up = false : pull-down = true */
|
||||
|
||||
rp2040_gpio_set_pulls(g_gpiointinputs[i], false, true);
|
||||
|
||||
pincount++;
|
||||
}
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif /* CONFIG_DEV_GPIO && !CONFIG_GPIO_LOWER_HALF */
|
36
boards/arm/rp2040/adafruit-kb2040/src/rp2040_pico.h
Normal file
36
boards/arm/rp2040/adafruit-kb2040/src/rp2040_pico.h
Normal file
@ -0,0 +1,36 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/src/rp2040_pico.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_SRC_RP2040_PICO_H
|
||||
#define __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_SRC_RP2040_PICO_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
int rp2040_bringup(void);
|
||||
|
||||
#ifdef CONFIG_DEV_GPIO
|
||||
int rp2040_dev_gpio_init(void);
|
||||
#endif
|
||||
|
||||
#endif /* __BOARDS_ARM_RP2040_ADAFRUIT_KB2040_SRC_RP2040_PICO_H */
|
61
boards/arm/rp2040/adafruit-kb2040/src/rp2040_reset.c
Normal file
61
boards/arm/rp2040/adafruit-kb2040/src/rp2040_reset.c
Normal file
@ -0,0 +1,61 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/src/rp2040_reset.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_RESET
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_reset
|
||||
*
|
||||
* Description:
|
||||
* Reset board. Support for this function is required by board-level
|
||||
* logic if CONFIG_BOARDCTL_RESET is selected.
|
||||
*
|
||||
* Input Parameters:
|
||||
* status - Status information provided with the reset event. This
|
||||
* meaning of this status information is board-specific. If not
|
||||
* used by a board, the value zero may be provided in calls to
|
||||
* board_reset().
|
||||
*
|
||||
* Returned Value:
|
||||
* If this function returns, then it was not possible to power-off the
|
||||
* board due to some constraints. The return value int this case is a
|
||||
* board-specific reason for the failure to shutdown.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_reset(int status)
|
||||
{
|
||||
up_systemreset();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BOARDCTL_RESET */
|
150
boards/arm/rp2040/adafruit-kb2040/src/rp2040_spi.c
Normal file
150
boards/arm/rp2040/adafruit-kb2040/src/rp2040_spi.c
Normal file
@ -0,0 +1,150 @@
|
||||
/****************************************************************************
|
||||
* boards/arm/rp2040/adafruit-kb2040/src/rp2040_spi.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
#include "chip.h"
|
||||
#include "rp2040_gpio.h"
|
||||
#include "hardware/rp2040_spi.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp2040_spi0/1select and rp2040_spi0/1status
|
||||
*
|
||||
* Description:
|
||||
* The external functions, rp2040_spi0/1select and rp2040_spi0/1status
|
||||
* must be provided by board-specific logic.
|
||||
* They are implementations of the select and status methods of the SPI
|
||||
* interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h).
|
||||
* All other methods (including rp2040_spibus_initialize()) are provided by
|
||||
* common RP2040 logic. To use this common SPI logic on your board:
|
||||
*
|
||||
* 1. Provide logic in rp2040_boardinitialize() to configure SPI chip
|
||||
* select pins.
|
||||
* 2. Provide rp2040_spi0/1select() and rp2040_spi0/1status()
|
||||
* functions in your board-specific logic.
|
||||
* These functions will perform chip selection and status operations
|
||||
* using GPIOs in the way your board is configured.
|
||||
* 3. Add a calls to rp2040_spibus_initialize() in your low level
|
||||
* application initialization logic
|
||||
* 4. The handle returned by rp2040_spibus_initialize() may then be used to
|
||||
* bind the SPI driver to higher level logic (e.g., calling
|
||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||
* the SPI MMC/SD driver).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RP2040_SPI0
|
||||
void rp2040_spi0select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid,
|
||||
selected ? "assert" : "de-assert");
|
||||
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI0_GPIO + 1, !selected);
|
||||
}
|
||||
|
||||
uint8_t rp2040_spi0status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
# if defined(CONFIG_RP2040_SPISD) && (CONFIG_RP2040_SPISD_SPI_CH == 0)
|
||||
ret = board_spisd_status(dev, devid);
|
||||
# endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int rp2040_spi0cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#ifdef CONFIG_LCD_ST7789
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
{
|
||||
/* This is the Data/Command control pad which determines whether the
|
||||
* data bits are data or a command.
|
||||
*/
|
||||
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI0_GPIO, !cmd);
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RP2040_SPI1
|
||||
void rp2040_spi1select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
spiinfo("devid: %d CS: %s\n", (int)devid,
|
||||
selected ? "assert" : "de-assert");
|
||||
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI1_GPIO + 1, !selected);
|
||||
}
|
||||
|
||||
uint8_t rp2040_spi1status(struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
# if defined(CONFIG_RP2040_SPISD) && (CONFIG_RP2040_SPISD_SPI_CH == 1)
|
||||
ret = board_spisd_status(dev, devid);
|
||||
# endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_CMDDATA
|
||||
int rp2040_spi1cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd)
|
||||
{
|
||||
#if defined (CONFIG_LCD_ST7789) || (CONFIG_LCD_ST7735)
|
||||
if (devid == SPIDEV_DISPLAY(0))
|
||||
{
|
||||
/* This is the Data/Command control pad which determines whether the
|
||||
* data bits are data or a command.
|
||||
*/
|
||||
|
||||
rp2040_gpio_put(CONFIG_RP2040_SPI1_GPIO, !cmd);
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
#endif
|
@ -37,7 +37,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_pwmdev_initialize
|
||||
* Name: rp2040_pwmdev_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize and register spi driver for the specified pwm port
|
||||
|
@ -73,3 +73,4 @@ CONFIG_USBDEV_COMPOSITE=y
|
||||
CONFIG_USBMSC=y
|
||||
CONFIG_USBMSC_COMPOSITE=y
|
||||
CONFIG_USBMSC_NOT_STALL_BULKEP=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -49,3 +49,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -49,3 +49,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -47,3 +47,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -53,3 +53,4 @@ CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_SMP=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -59,3 +59,4 @@ CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -66,3 +66,4 @@ CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_USBMSC=y
|
||||
CONFIG_USBMSC_NOT_STALL_BULKEP=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -51,3 +51,4 @@ CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -70,3 +70,4 @@ CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -73,3 +73,4 @@ CONFIG_USBDEV_COMPOSITE=y
|
||||
CONFIG_USBMSC=y
|
||||
CONFIG_USBMSC_COMPOSITE=y
|
||||
CONFIG_USBMSC_NOT_STALL_BULKEP=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -97,3 +97,4 @@ CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -82,3 +82,4 @@ CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WQUEUE_NOTIFIER=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -55,3 +55,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -47,3 +47,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -47,3 +47,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -53,3 +53,4 @@ CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_TESTING_SMP=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -59,3 +59,4 @@ CONFIG_SYSTEM_SPITOOL=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -74,3 +74,4 @@ CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -58,3 +58,4 @@ CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -66,3 +66,4 @@ CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_USBMSC=y
|
||||
CONFIG_USBMSC_NOT_STALL_BULKEP=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -51,3 +51,4 @@ CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -94,3 +94,4 @@ CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
@ -91,3 +91,4 @@ CONFIG_TESTING_GETPRIME=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
CONFIG_VIDEO_FB=y
|
||||
CONFIG_WS2812_NON_SPI_DRIVER=y
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user