Add uart0-5 configure
|
@ -19,12 +19,19 @@ if GetDepend(['RT_USING_SERIAL']):
|
|||
src += ['drv_uart.c']
|
||||
|
||||
if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
|
||||
if GetDepend('BSP_USING_I2C1') or GetDepend('BSP_USING_I2C2'):
|
||||
if GetDepend('BSP_USING_I2C1'):
|
||||
src += ['drv_soft_i2c.c']
|
||||
|
||||
if GetDepend(['RT_USING_I2C']):
|
||||
if GetDepend('BSP_USING_HW_I2C1'):
|
||||
src += ['drv_i2c.c']
|
||||
|
||||
if GetDepend(['RT_USING_ADC']):
|
||||
src += ['drv_adc.c']
|
||||
|
||||
if GetDepend(['RT_USING_QSPI']):
|
||||
src += ['drv_qspi.c']
|
||||
|
||||
path = [cwd]
|
||||
path += [cwd + '/config']
|
||||
|
||||
|
|
|
@ -70,32 +70,14 @@ void _Error_Handler(char *s, int num)
|
|||
*/
|
||||
void rt_hw_us_delay(rt_uint32_t us)
|
||||
{
|
||||
rt_uint32_t ticks;
|
||||
rt_uint32_t told, tnow, tcnt = 0;
|
||||
rt_uint32_t reload = SysTick->LOAD;
|
||||
|
||||
ticks = us * reload / (1000000 / RT_TICK_PER_SECOND);
|
||||
told = SysTick->VAL;
|
||||
while (1)
|
||||
{
|
||||
tnow = SysTick->VAL;
|
||||
if (tnow != told)
|
||||
{
|
||||
if (tnow < told)
|
||||
{
|
||||
tcnt += told - tnow;
|
||||
}
|
||||
else
|
||||
{
|
||||
tcnt += reload - tnow + told;
|
||||
}
|
||||
told = tnow;
|
||||
if (tcnt >= ticks)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
rt_uint32_t start, now, delta, reload, us_tick;
|
||||
start = SysTick->VAL;
|
||||
reload = SysTick->LOAD;
|
||||
us_tick = SystemCoreClock / 1000000UL;
|
||||
do {
|
||||
now = SysTick->VAL;
|
||||
delta = start > now ? start - now : reload + start - now;
|
||||
} while(delta < us_tick * us);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,67 +11,146 @@
|
|||
#include <rtthread.h>
|
||||
#include "drv_uart.h"
|
||||
|
||||
#include "uart_config.h"
|
||||
#include "cy_retarget_io.h"
|
||||
#include "cyhal_scb_common.h"
|
||||
|
||||
struct ifx_usart
|
||||
{
|
||||
char *name;
|
||||
CySCB_Type *usart_x;
|
||||
IRQn_Type intrSrc;
|
||||
struct rt_serial_device serial;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
#ifdef BSP_USING_UART0
|
||||
UART0_INDEX,
|
||||
#endif
|
||||
#ifdef BSP_USING_UART1
|
||||
UART1_INDEX,
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef BSP_USING_UART1
|
||||
/* UART1 device driver structure */
|
||||
const cy_stc_sysint_t UART1_SCB_IRQ_cfg =
|
||||
{
|
||||
.intrSrc = scb_5_interrupt_IRQn,
|
||||
.intrPriority = 7u,
|
||||
};
|
||||
#ifdef BSP_USING_UART2
|
||||
UART2_INDEX,
|
||||
#endif
|
||||
|
||||
static struct ifx_usart usart_config[] =
|
||||
{
|
||||
#ifdef BSP_USING_UART1
|
||||
{
|
||||
"uart1",
|
||||
SCB5,
|
||||
scb_5_interrupt_IRQn,
|
||||
},
|
||||
#ifdef BSP_USING_UART3
|
||||
UART3_INDEX,
|
||||
#endif
|
||||
#ifdef BSP_USING_UART4
|
||||
UART4_INDEX,
|
||||
#endif
|
||||
#ifdef BSP_USING_UART5
|
||||
UART5_INDEX,
|
||||
#endif
|
||||
};
|
||||
|
||||
static void usart_isr(struct rt_serial_device *serial)
|
||||
static struct ifx_uart_config uart_config[] =
|
||||
{
|
||||
#ifdef BSP_USING_UART0
|
||||
UART0_CONFIG,
|
||||
#endif
|
||||
#ifdef BSP_USING_UART1
|
||||
UART1_CONFIG,
|
||||
#endif
|
||||
#ifdef BSP_USING_UART2
|
||||
UART2_CONFIG,
|
||||
#endif
|
||||
#ifdef BSP_USING_UART3
|
||||
UART3_CONFIG,
|
||||
#endif
|
||||
#ifdef BSP_USING_UART4
|
||||
UART4_CONFIG,
|
||||
#endif
|
||||
#ifdef BSP_USING_UART5
|
||||
UART5_CONFIG,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct ifx_uart uart_obj[sizeof(uart_config) / sizeof(uart_config[0])] = {0};
|
||||
|
||||
static void uart_isr(struct rt_serial_device *serial)
|
||||
{
|
||||
RT_ASSERT(serial != RT_NULL);
|
||||
struct ifx_uart *uart = (struct ifx_uart *) serial->parent.user_data;
|
||||
RT_ASSERT(uart != RT_NULL);
|
||||
|
||||
#ifdef BSP_USING_UART1
|
||||
if ((SCB5->INTR_RX_MASKED & SCB_INTR_RX_MASKED_NOT_EMPTY_Msk) != 0)
|
||||
#ifdef BSP_USING_UART5
|
||||
if ((uart->config->usart_x->INTR_RX_MASKED & SCB_INTR_RX_MASKED_NOT_EMPTY_Msk) != 0)
|
||||
{
|
||||
/* Clear UART "RX fifo not empty interrupt" */
|
||||
SCB5->INTR_RX = SCB5->INTR_RX & SCB_INTR_RX_NOT_EMPTY_Msk;
|
||||
uart->config->usart_x->INTR_RX = uart->config->usart_x->INTR_RX & SCB_INTR_RX_NOT_EMPTY_Msk;
|
||||
|
||||
rt_hw_serial_isr(serial, RT_SERIAL_EVENT_RX_IND);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef BSP_USING_UART1
|
||||
#ifdef BSP_USING_UART0
|
||||
/* UART0 Interrupt Hanlder */
|
||||
void uart0_isr_callback(void)
|
||||
{
|
||||
/* enter interrupt */
|
||||
rt_interrupt_enter();
|
||||
|
||||
uart_isr(&uart_obj[UART0_INDEX].serial);
|
||||
|
||||
/* leave interrupt */
|
||||
rt_interrupt_leave();
|
||||
}
|
||||
#endif
|
||||
#ifdef BSP_USING_UART1
|
||||
/* UART1 Interrupt Hanlder */
|
||||
void uart1_isr_callback(void)
|
||||
{
|
||||
/* enter interrupt */
|
||||
rt_interrupt_enter();
|
||||
|
||||
usart_isr(&usart_config[UART1_INDEX].serial);
|
||||
uart_isr(&uart_obj[UART1_INDEX].serial);
|
||||
|
||||
/* leave interrupt */
|
||||
rt_interrupt_leave();
|
||||
}
|
||||
#endif
|
||||
#ifdef BSP_USING_UART2
|
||||
/* UART2 Interrupt Hanlder */
|
||||
void uart2_isr_callback(void)
|
||||
{
|
||||
/* enter interrupt */
|
||||
rt_interrupt_enter();
|
||||
|
||||
uart_isr(&uart_obj[UART2_INDEX].serial);
|
||||
|
||||
/* leave interrupt */
|
||||
rt_interrupt_leave();
|
||||
}
|
||||
#endif
|
||||
#ifdef BSP_USING_UART3
|
||||
/* UART3 Interrupt Hanlder */
|
||||
void uart3_isr_callback(void)
|
||||
{
|
||||
/* enter interrupt */
|
||||
rt_interrupt_enter();
|
||||
|
||||
uart_isr(&uart_obj[UART3_INDEX].serial);
|
||||
|
||||
/* leave interrupt */
|
||||
rt_interrupt_leave();
|
||||
}
|
||||
#endif
|
||||
#ifdef BSP_USING_UART4
|
||||
/* UART4 Interrupt Hanlder */
|
||||
void uart4_isr_callback(void)
|
||||
{
|
||||
/* enter interrupt */
|
||||
rt_interrupt_enter();
|
||||
|
||||
uart_isr(&uart_obj[UART4_INDEX].serial);
|
||||
|
||||
/* leave interrupt */
|
||||
rt_interrupt_leave();
|
||||
}
|
||||
#endif
|
||||
#ifdef BSP_USING_UART5
|
||||
/* UART5 Interrupt Hanlder */
|
||||
void uart5_isr_callback(void)
|
||||
{
|
||||
/* enter interrupt */
|
||||
rt_interrupt_enter();
|
||||
|
||||
uart_isr(&uart_obj[UART5_INDEX].serial);
|
||||
|
||||
/* leave interrupt */
|
||||
rt_interrupt_leave();
|
||||
|
@ -83,18 +162,17 @@ void uart1_isr_callback(void)
|
|||
*/
|
||||
static rt_err_t ifx_configure(struct rt_serial_device *serial, struct serial_configure *cfg)
|
||||
{
|
||||
struct ifx_usart *usart_instance = (struct ifx_usart *) serial->parent.user_data;
|
||||
struct ifx_uart *uart = (struct ifx_uart *) serial->parent.user_data;
|
||||
|
||||
RT_ASSERT(serial != RT_NULL);
|
||||
RT_ASSERT(usart_instance != RT_NULL);
|
||||
RT_ASSERT(uart != RT_NULL);
|
||||
|
||||
cy_en_scb_uart_status_t result;
|
||||
|
||||
/* Initialize retarget-io to use the debug UART port */
|
||||
result = cy_retarget_io_init(CYBSP_DEBUG_UART_TX, CYBSP_DEBUG_UART_RX,
|
||||
result = cy_retarget_io_init(uart->config->tx_pin, uart->config->rx_pin,
|
||||
CY_RETARGET_IO_BAUDRATE);
|
||||
|
||||
/* retarget-io init failed. Stop program execution */
|
||||
RT_ASSERT(result != RT_ERROR);
|
||||
|
||||
return RT_EOK;
|
||||
|
@ -103,8 +181,8 @@ static rt_err_t ifx_configure(struct rt_serial_device *serial, struct serial_con
|
|||
static rt_err_t ifx_control(struct rt_serial_device *serial, int cmd, void *arg)
|
||||
{
|
||||
RT_ASSERT(serial != RT_NULL);
|
||||
struct ifx_usart *usart = (struct ifx_usart *) serial->parent.user_data;
|
||||
RT_ASSERT(usart != RT_NULL);
|
||||
struct ifx_uart *uart = (struct ifx_uart *) serial->parent.user_data;
|
||||
RT_ASSERT(uart != RT_NULL);
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
|
@ -114,15 +192,13 @@ static rt_err_t ifx_control(struct rt_serial_device *serial, int cmd, void *arg)
|
|||
|
||||
case RT_DEVICE_CTRL_SET_INT:
|
||||
/* Unmasking only the RX fifo not empty interrupt bit */
|
||||
usart->usart_x->INTR_RX_MASK = SCB_INTR_RX_MASK_NOT_EMPTY_Msk;
|
||||
uart->config->usart_x->INTR_RX_MASK = SCB_INTR_RX_MASK_NOT_EMPTY_Msk;
|
||||
|
||||
#ifdef BSP_USING_UART1
|
||||
/* Interrupt Settings for UART */
|
||||
Cy_SysInt_Init(&UART1_SCB_IRQ_cfg, uart1_isr_callback);
|
||||
#endif
|
||||
Cy_SysInt_Init(uart->config->UART_SCB_IRQ_cfg, uart->config->userIsr);
|
||||
|
||||
/* Enable the interrupt */
|
||||
NVIC_EnableIRQ(usart->intrSrc);
|
||||
NVIC_EnableIRQ(uart->config->intrSrc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -133,9 +209,9 @@ static int ifx_uarths_putc(struct rt_serial_device *serial, char c)
|
|||
{
|
||||
RT_ASSERT(serial != RT_NULL);
|
||||
|
||||
struct ifx_usart *usart = (struct ifx_usart *) serial->parent.user_data;
|
||||
struct ifx_uart *uart = (struct ifx_uart *) serial->parent.user_data;
|
||||
|
||||
RT_ASSERT(usart != RT_NULL);
|
||||
RT_ASSERT(uart != RT_NULL);
|
||||
|
||||
if (_cyhal_scb_pm_transition_pending())
|
||||
return CYHAL_SYSPM_RSLT_ERR_PM_PENDING;
|
||||
|
@ -143,7 +219,7 @@ static int ifx_uarths_putc(struct rt_serial_device *serial, char c)
|
|||
uint32_t count = 0;
|
||||
while (count == 0)
|
||||
{
|
||||
count = Cy_SCB_UART_Put(usart->usart_x, c);
|
||||
count = Cy_SCB_UART_Put(uart->config->usart_x, c);
|
||||
}
|
||||
|
||||
return (1);
|
||||
|
@ -180,23 +256,23 @@ const struct rt_uart_ops _uart_ops =
|
|||
void rt_hw_uart_init(void)
|
||||
{
|
||||
int index;
|
||||
rt_size_t obj_num;
|
||||
|
||||
obj_num = sizeof(usart_config) / sizeof(struct ifx_usart);
|
||||
rt_size_t obj_num = sizeof(uart_obj) / sizeof(struct ifx_uart);
|
||||
struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT;
|
||||
rt_err_t result = 0;
|
||||
|
||||
for (index = 0; index < obj_num; index++)
|
||||
{
|
||||
usart_config[index].serial.ops = &_uart_ops;
|
||||
usart_config[index].serial.config = config;
|
||||
uart_obj[index].config = &uart_config[index];
|
||||
uart_obj[index].serial.ops = &_uart_ops;
|
||||
uart_obj[index].serial.config = config;
|
||||
|
||||
/* register uart device */
|
||||
result = rt_hw_serial_register(&usart_config[index].serial,
|
||||
usart_config[index].name,
|
||||
result = rt_hw_serial_register(&uart_obj[index].serial,
|
||||
uart_obj[index].config->name,
|
||||
RT_DEVICE_FLAG_RDWR |
|
||||
RT_DEVICE_FLAG_INT_RX,
|
||||
&usart_config[index]);
|
||||
&uart_obj[index]);
|
||||
|
||||
RT_ASSERT(result == RT_EOK);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,25 @@
|
|||
#include "board.h"
|
||||
#include "cycfg_peripherals.h"
|
||||
|
||||
#define uart_isr_callback(name) name##_isr_callback
|
||||
|
||||
struct ifx_uart_config
|
||||
{
|
||||
const char *name;
|
||||
rt_uint32_t tx_pin;
|
||||
rt_uint32_t rx_pin;
|
||||
CySCB_Type *usart_x;
|
||||
IRQn_Type intrSrc;
|
||||
cy_israddress userIsr;
|
||||
cy_stc_sysint_t *UART_SCB_IRQ_cfg;
|
||||
};
|
||||
|
||||
struct ifx_uart
|
||||
{
|
||||
struct ifx_uart_config *config;
|
||||
struct rt_serial_device serial;
|
||||
};
|
||||
|
||||
void rt_hw_uart_init(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2022-07-08 Rbb666 first version
|
||||
*/
|
||||
|
||||
#ifndef __UART_CONFIG_H__
|
||||
#define __UART_CONFIG_H__
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "board.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_UART0
|
||||
/* UART0 device driver structure */
|
||||
cy_stc_sysint_t UART2_SCB_IRQ_cfg =
|
||||
{
|
||||
.intrSrc = (IRQn_Type) scb_0_interrupt_IRQn,
|
||||
.intrPriority = (7u),
|
||||
};
|
||||
#endif
|
||||
#ifdef BSP_USING_UART1
|
||||
/* UART1 device driver structure */
|
||||
cy_stc_sysint_t UART1_SCB_IRQ_cfg =
|
||||
{
|
||||
.intrSrc = (IRQn_Type) scb_1_interrupt_IRQn,
|
||||
.intrPriority = (7u),
|
||||
};
|
||||
#endif
|
||||
#ifdef BSP_USING_UART2
|
||||
/* UART2 device driver structure */
|
||||
cy_stc_sysint_t UART2_SCB_IRQ_cfg =
|
||||
{
|
||||
.intrSrc = (IRQn_Type) scb_2_interrupt_IRQn,
|
||||
.intrPriority = (7u),
|
||||
};
|
||||
#endif
|
||||
#ifdef BSP_USING_UART3
|
||||
/* UART3 device driver structure */
|
||||
cy_stc_sysint_t UART3_SCB_IRQ_cfg =
|
||||
{
|
||||
.intrSrc = (IRQn_Type) scb_3_interrupt_IRQn,
|
||||
.intrPriority = (7u),
|
||||
};
|
||||
#endif
|
||||
#ifdef BSP_USING_UART4
|
||||
/* UART4 device driver structure */
|
||||
cy_stc_sysint_t UART4_SCB_IRQ_cfg =
|
||||
{
|
||||
.intrSrc = (IRQn_Type) scb_4_interrupt_IRQn,
|
||||
.intrPriority = (7u),
|
||||
};
|
||||
#endif
|
||||
#ifdef BSP_USING_UART5
|
||||
/* UART5 device driver structure */
|
||||
cy_stc_sysint_t UART5_SCB_IRQ_cfg =
|
||||
{
|
||||
.intrSrc = (IRQn_Type) scb_5_interrupt_IRQn,
|
||||
.intrPriority = (7u),
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(BSP_USING_UART0)
|
||||
#ifndef UART0_CONFIG
|
||||
#define UART0_CONFIG \
|
||||
{ \
|
||||
.name = "uart0", \
|
||||
.tx_pin = P0_3, \
|
||||
.rx_pin = P0_2, \
|
||||
.usart_x = SCB0, \
|
||||
.intrSrc = scb_0_interrupt_IRQn, \
|
||||
.userIsr = uart_isr_callback(uart0) \
|
||||
.UART_SCB_IRQ_cfg = &UART0_SCB_IRQ_cfg, \
|
||||
}
|
||||
void uart0_isr_callback(void);
|
||||
#endif /* UART0_CONFIG */
|
||||
#endif /* BSP_USING_UART0 */
|
||||
|
||||
#if defined(BSP_USING_UART1)
|
||||
#ifndef UART1_CONFIG
|
||||
#define UART1_CONFIG \
|
||||
{ \
|
||||
.name = "uart1", \
|
||||
.tx_pin = P10_1, \
|
||||
.rx_pin = P10_0, \
|
||||
.usart_x = SCB1, \
|
||||
.intrSrc = scb_1_interrupt_IRQn, \
|
||||
.userIsr = uart_isr_callback(uart1) \
|
||||
.UART_SCB_IRQ_cfg = &UART1_SCB_IRQ_cfg, \
|
||||
}
|
||||
void uart1_isr_callback(void);
|
||||
#endif /* UART1_CONFIG */
|
||||
#endif /* BSP_USING_UART1 */
|
||||
|
||||
#if defined(BSP_USING_UART2)
|
||||
#ifndef UART2_CONFIG
|
||||
#define UART2_CONFIG \
|
||||
{ \
|
||||
.name = "uart2", \
|
||||
.tx_pin = P9_1, \
|
||||
.rx_pin = P9_0, \
|
||||
.usart_x = SCB2, \
|
||||
.intrSrc = scb_2_interrupt_IRQn, \
|
||||
.userIsr = uart_isr_callback(uart2), \
|
||||
.UART_SCB_IRQ_cfg = &UART2_SCB_IRQ_cfg, \
|
||||
}
|
||||
void uart2_isr_callback(void);
|
||||
#endif /* UART2_CONFIG */
|
||||
#endif /* BSP_USING_UART2 */
|
||||
|
||||
#if defined(BSP_USING_UART3)
|
||||
#ifndef UART3_CONFIG
|
||||
#define UART3_CONFIG \
|
||||
{ \
|
||||
.name = "uart3", \
|
||||
.tx_pin = P6_1, \
|
||||
.rx_pin = P6_0, \
|
||||
.usart_x = SCB3, \
|
||||
.intrSrc = scb_3_interrupt_IRQn, \
|
||||
.userIsr = uart_isr_callback(uart3), \
|
||||
.UART_SCB_IRQ_cfg = &UART3_SCB_IRQ_cfg, \
|
||||
}
|
||||
void uart3_isr_callback(void);
|
||||
#endif /* UART3_CONFIG */
|
||||
#endif /* BSP_USING_UART3 */
|
||||
|
||||
#if defined(BSP_USING_UART4)
|
||||
#ifndef UART4_CONFIG
|
||||
#define UART4_CONFIG \
|
||||
{ \
|
||||
.name = "uart4", \
|
||||
.tx_pin = P7_1, \
|
||||
.rx_pin = P7_0, \
|
||||
.usart_x = SCB4, \
|
||||
.intrSrc = scb_4_interrupt_IRQn, \
|
||||
.userIsr = uart_isr_callback(uart4), \
|
||||
.UART_SCB_IRQ_cfg = &UART4_SCB_IRQ_cfg, \
|
||||
}
|
||||
void uart4_isr_callback(void);
|
||||
#endif /* UART4_CONFIG */
|
||||
#endif /* BSP_USING_UART4 */
|
||||
|
||||
#if defined(BSP_USING_UART5)
|
||||
#ifndef UART5_CONFIG
|
||||
#define UART5_CONFIG \
|
||||
{ \
|
||||
.name = "uart5", \
|
||||
.tx_pin = P5_1, \
|
||||
.rx_pin = P5_0, \
|
||||
.usart_x = SCB5, \
|
||||
.intrSrc = scb_5_interrupt_IRQn, \
|
||||
.userIsr = uart_isr_callback(uart5), \
|
||||
.UART_SCB_IRQ_cfg = &UART5_SCB_IRQ_cfg, \
|
||||
}
|
||||
void uart5_isr_callback(void);
|
||||
#endif /* UART5_CONFIG */
|
||||
#endif /* BSP_USING_UART5 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -67,10 +67,23 @@ if GetDepend(['RT_USING_ADC']):
|
|||
src += ['mtb-pdl-cat1/drivers/source/cy_dmac.c']
|
||||
src += ['mtb-pdl-cat1/drivers/source/cy_sysanalog.c']
|
||||
|
||||
if GetDepend(['RT_USING_QSPI']):
|
||||
src += ['mtb-hal-cat1/source/cyhal_qspi.c']
|
||||
src += ['mtb-pdl-cat1/drivers/source/cy_dma.c']
|
||||
src += ['mtb-pdl-cat1/drivers/source/cy_smif.c']
|
||||
src += ['mtb-pdl-cat1/drivers/source/cy_smif_sfdp.c']
|
||||
src += ['mtb-pdl-cat1/drivers/source/cy_smif_memslot.c']
|
||||
src += ['mtb_shared/serial-flash/cy_serial_flash_qspi.c']
|
||||
src += ['TARGET_CY8CKIT-062S2-43012/COMPONENT_BSP_DESIGN_MODUS/GeneratedSource/cycfg_qspi_memslot.c']
|
||||
|
||||
if GetDepend(['RT_USING_I2C']):
|
||||
src += ['mtb-hal-cat1/source/cyhal_i2c.c']
|
||||
|
||||
path = [cwd + '/capsense',
|
||||
cwd + '/psoc6cm0p',
|
||||
cwd + '/retarget-io',
|
||||
cwd + '/core-lib/include',
|
||||
cwd + '/mtb_shared/serial-flash',
|
||||
cwd + '/mtb-hal-cat1/include',
|
||||
cwd + '/mtb-hal-cat1/include_pvt',
|
||||
cwd + '/mtb-pdl-cat1/cmsis/include',
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
#include <rtthread.h>
|
||||
|
||||
#include "cycfg_peripherals.h"
|
||||
|
||||
|
@ -34,8 +35,32 @@ cy_stc_csd_context_t cy_csd_0_context =
|
|||
.lockKey = CY_CSD_NONE_KEY,
|
||||
};
|
||||
|
||||
|
||||
void init_cycfg_peripherals(void)
|
||||
{
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_CSD_CLOCK, CY_SYSCLK_DIV_8_BIT, 0U);
|
||||
|
||||
#ifdef BSP_USING_UART0
|
||||
/* UART0 Device Clock*/
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_SCB0_CLOCK, CY_SYSCLK_DIV_8_BIT, 0U);
|
||||
#endif
|
||||
#ifdef BSP_USING_UART1
|
||||
/* UART1 Device Clock*/
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_SCB1_CLOCK, CY_SYSCLK_DIV_8_BIT, 0U);
|
||||
#endif
|
||||
#ifdef BSP_USING_UART2
|
||||
/* UART2 Device Clock*/
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_SCB2_CLOCK, CY_SYSCLK_DIV_8_BIT, 0U);
|
||||
#endif
|
||||
#ifdef BSP_USING_UART3
|
||||
/* UART3 Device Clock*/
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_SCB3_CLOCK, CY_SYSCLK_DIV_8_BIT, 0U);
|
||||
#endif
|
||||
#ifdef BSP_USING_UART4
|
||||
/* UART4 Device Clock*/
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_SCB4_CLOCK, CY_SYSCLK_DIV_8_BIT, 0U);
|
||||
#endif
|
||||
#ifdef BSP_USING_UART5
|
||||
/* UART5 Device Clock*/
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_SCB5_CLOCK, CY_SYSCLK_DIV_8_BIT, 0U);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
docs
|
|
@ -0,0 +1,55 @@
|
|||
CYPRESS END USER LICENSE AGREEMENT
|
||||
|
||||
PLEASE READ THIS END USER LICENSE AGREEMENT ("Agreement") CAREFULLY BEFORE DOWNLOADING, INSTALLING, COPYING, OR USING THIS SOFTWARE AND ACCOMPANYING DOCUMENTATION. BY DOWNLOADING, INSTALLING, COPYING OR USING THE SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, PROMPTLY RETURN AND DO NOT USE THE SOFTWARE. IF YOU HAVE PURCHASED THIS LICENSE TO THE SOFTWARE, YOUR RIGHT TO RETURN THE SOFTWARE EXPIRES 30 DAYS AFTER YOUR PURCHASE AND APPLIES ONLY TO THE ORIGINAL PURCHASER.
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"Software" means this software and any accompanying documentation, including any upgrades, updates, bug fixes or modified versions provided to you by Cypress.
|
||||
|
||||
"Source Code" means software in human-readable form.
|
||||
|
||||
"Binary Code" means the software in binary code form such as object code or an executable.
|
||||
|
||||
"Development Tools" means software that is intended to be installed on a personal computer and used to create programming code for Firmware, Drivers, or Host Applications. Examples of Development Tools are Cypress's PSoC Creator software, Cypress's WICED SDKs, and Cypress's ModusToolbox software.
|
||||
|
||||
"Firmware" means software that executes on a Cypress hardware product.
|
||||
|
||||
"Driver" means software that enables the use of a Cypress hardware product on a particular host operating system such as GNU/Linux, Windows, MacOS, Android, and iOS.
|
||||
|
||||
"Host Application" means software that executes on a device other than a Cypress hardware product in order to program, control, or communicate with a Cypress hardware product.
|
||||
|
||||
"inf File" means a hardware setup information file (.inf file) created by the Software to allow a Microsoft Windows operating system to install the driver for a Cypress hardware product.
|
||||
|
||||
2. License. Subject to the terms and conditions of this Agreement, Cypress Semiconductor Corporation ("Cypress") and its suppliers grant to you a non-exclusive, non-transferable license under their copyright rights:
|
||||
|
||||
a. to use the Development Tools in object code form solely for the purpose of creating Firmware, Drivers, Host Applications, and inf Files for Cypress hardware products; and
|
||||
|
||||
b. (i) if provided in Source Code form, to copy, modify, and compile the Firmware Source Code to create Firmware for execution on a Cypress hardware product, and (ii) to distribute Firmware in binary code form only, only when installed onto a Cypress hardware product; and
|
||||
|
||||
c. (i) if provided in Source Code form, to copy, modify, and compile the Driver Source Code to create one or more Drivers to enable the use of a Cypress hardware product on a particular host operating system, and (ii) to distribute the Driver, in binary code form only, only when installed on a device that includes the Cypress hardware product that the Driver is intended to enable; and
|
||||
|
||||
d. (i) if provided in Source Code form, to copy, modify, and compile the Host Application Source Code to create one or more Host Applications to program, control, or communicate with a Cypress hardware product, and (ii) to distribute Host Applications, in binary code form only, only when installed on a device that includes a Cypress hardware product that the Host Application is intended to program, control, or communicate with; and
|
||||
|
||||
e. to freely distribute any inf File.
|
||||
|
||||
Any distribution of Software permitted under this Agreement must be made pursuant to your standard end user license agreement used for your proprietary (closed source) software products, such end user license agreement to include, at a minimum, provisions limiting your licensors' liability and prohibiting reverse engineering of the Software, consistent with such provisions in this Agreement.
|
||||
|
||||
3. Free and Open Source Software. Portions of the Software may be licensed under free and/or open source licenses such as the GNU General Public License or other licenses from third parties ("Third Party Software"). Third Party Software is subject to the applicable license agreement and not this Agreement. If you are entitled to receive the source code from Cypress for any Third Party Software included with the Software, either the source code will be included with the Software or you may obtain the source code at no charge from <http://www.cypress.com/go/opensource>. The applicable license terms will accompany each source code package. To review the license terms applicable to any Third Party Software for which Cypress is not required to provide you with source code, please see the Software's installation directory on your computer.
|
||||
|
||||
4. Proprietary Rights; Ownership. The Software, including all intellectual property rights therein, is and will remain the sole and exclusive property of Cypress or its suppliers. Cypress retains ownership of the Source Code and any compiled version thereof. Subject to Cypress' ownership of the underlying Software (including Source Code), you retain ownership of any modifications you make to the Source Code. You agree not to remove any Cypress copyright or other notices from the Source Code and any modifications thereof. You agree to keep the Source Code confidential. Any reproduction, modification, translation, compilation, or representation of the Source Code except as permitted in Section 2 ("License") is prohibited without the express written permission of Cypress. Except as otherwise expressly provided in this Agreement, you may not: (i) modify, adapt, or create derivative works based upon the Software; (ii) copy the Software; (iii) except and only to the extent explicitly permitted by applicable law despite this limitation, decompile, translate, reverse engineer, disassemble or otherwise reduce the Software to human-readable form; or (iv) use the Software or any sample code other than for the Purpose. You hereby covenant that you will not assert any claim that the Software, or derivative works thereof created by or for Cypress, infringe any intellectual property right owned or controlled by you
|
||||
|
||||
5. No Support. Cypress may, but is not required to, provide technical support for the Software.
|
||||
|
||||
6. Term and Termination. This Agreement is effective until terminated, and either party may terminate this Agreement at any time with or without cause. This Agreement and your license rights under this Agreement will terminate immediately without notice from Cypress if you fail to comply with any provision of this Agreement. Upon termination, you must destroy all copies of Software in your possession or control. The following paragraphs shall survive any termination of this Agreement: "Free and Open Source Software," "Proprietary Rights; Ownership," "Compliance With Law," "Disclaimer," "Limitation of Liability," and "General."
|
||||
|
||||
7. Compliance With Law. Each party agrees to comply with all applicable laws, rules and regulations in connection with its activities under this Agreement. Without limiting the foregoing, the Software may be subject to export control laws and regulations of the United States and other countries. You agree to comply strictly with all such laws and regulations and acknowledge that you have the responsibility to obtain licenses to export, re-export, or import the Software.
|
||||
|
||||
8. Disclaimer. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THE SOFTWARE, INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes to the Software without notice. Cypress does not assume any liability arising out of the application or use of Software or any product or circuit described in the Software. It is the responsibility of the user of the Software to properly design, program, and test the functionality and safety of any application made of the Software and any resulting product. Cypress does not authorize its Software or products for use in any products where a malfunction or failure of the Software or Cypress product may reasonably be expected to result in significant property damage, injury or death ("High Risk Product"). If you include any Software or Cypress product in a High Risk Product, you assume all risk of such use and agree to indemnify Cypress and its suppliers against all liability. No computing device can be absolutely secure. Therefore, despite security measures implemented in Cypress hardware or software products, Cypress does not assume any liability arising out of any security breach, such as unauthorized access to or use of a Cypress product.
|
||||
|
||||
9. Limitation of Liability. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL CYPRESS OR ITS SUPPLIERS, RESELLERS, OR DISTRIBUTORS BE LIABLE FOR ANY LOST REVENUE, PROFIT, OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF CYPRESS OR ITS SUPPLIERS, RESELLERS, OR DISTRIBUTORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL CYPRESS' OR ITS SUPPLIERS', RESELLERS', OR DISTRIBUTORS' TOTAL LIABILITY TO YOU, WHETHER IN CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, EXCEED THE GREATER OF US$500 OR THE PRICE PAID BY YOU FOR THE SOFTWARE. THE FOREGOING LIMITATIONS SHALL APPLY EVEN IF THE ABOVE-STATED WARRANTY FAILS OF ITS ESSENTIAL PURPOSE. BECAUSE SOME STATES OR JURISDICTIONS DO NOT ALLOW LIMITATION OR EXCLUSION OF CONSEQUENTIAL OR INCIDENTAL DAMAGES, ALL OR PORTIONS OF THE ABOVE LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. Restricted Rights. The Software is commercial computer software as that term is described in 48 C.F.R. 252.227-7014(a)(1). If the Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in Software shall be only those set forth in this Agreement.
|
||||
|
||||
11. Personal Information. You agree that information you provide through your registration on Cypress IoT Community Forum or other Cypress websites, including contact information or other personal information, may be collected and used by Cypress consistent with its Data Privacy Policy (www.cypress.com/privacy-policy), as updated or revised from time to time, and may be provided to its third party sales representatives, distributors and other entities conducting sales activities for Cypress for sales-related and other business purposes.
|
||||
|
||||
12. General. This Agreement will bind and inure to the benefit of each party's successors and assigns, provided that you may not assign or transfer this Agreement, in whole or in part, without Cypress' written consent. This Agreement shall be governed by and construed in accordance with the laws of the State of California, United States of America, as if performed wholly within the state and without giving effect to the principles of conflict of law. The parties consent to personal and exclusive jurisdiction of and venue in, the state and federal courts within Santa Clara County, California; provided however, that nothing in this Agreement will limit Cypress' right to bring legal action in any venue in order to protect or enforce its intellectual property rights. No failure of either party to exercise or enforce any of its rights under this Agreement will act as a waiver of such rights. If any portion of this Agreement is found to be void or unenforceable, the remaining provisions of this Agreement shall remain in full force and effect. This Agreement is the complete and exclusive agreement between the parties with respect to the subject matter hereof, superseding and replacing any and all prior agreements, communications, and understandings (both written and oral) regarding such subject matter. Any notice to Cypress will be deemed effective when actually received and must be sent to Cypress Semiconductor Corporation, ATTN: Chief Legal Officer, 198 Champion Court, San Jose, CA 95134 USA.
|
|
@ -0,0 +1,165 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
||||
owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities
|
||||
that control, are controlled by, or are under common control with that entity.
|
||||
For the purposes of this definition, "control" means (i) the power, direct or
|
||||
indirect, to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including
|
||||
but not limited to software source code, documentation source, and configuration
|
||||
files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or
|
||||
translation of a Source form, including but not limited to compiled object code,
|
||||
generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
||||
available under the License, as indicated by a copyright notice that is included
|
||||
in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
||||
is based on (or derived from) the Work and for which the editorial revisions,
|
||||
annotations, elaborations, or other modifications represent, as a whole, an
|
||||
original work of authorship. For the purposes of this License, Derivative Works
|
||||
shall not include works that remain separable from, or merely link (or bind by
|
||||
name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version
|
||||
of the Work and any modifications or additions to that Work or Derivative Works
|
||||
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
||||
by the copyright owner or by an individual or Legal Entity authorized to submit
|
||||
on behalf of the copyright owner. For the purposes of this definition,
|
||||
"submitted" means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems, and
|
||||
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
||||
the purpose of discussing and improving the Work, but excluding communication
|
||||
that is conspicuously marked or otherwise designated in writing by the copyright
|
||||
owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
||||
of whom a Contribution has been received by Licensor and subsequently
|
||||
incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable (except as stated in this section) patent license to make, have
|
||||
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
such license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by combination
|
||||
of their Contribution(s) with the Work to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or contributory
|
||||
patent infringement, then any patent licenses granted to You under this License
|
||||
for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution.
|
||||
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
||||
in any medium, with or without modifications, and in Source or Object form,
|
||||
provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of
|
||||
this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You
|
||||
changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute,
|
||||
all copyright, patent, trademark, and attribution notices from the Source form
|
||||
of the Work, excluding those notices that do not pertain to any part of the
|
||||
Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any
|
||||
Derivative Works that You distribute must include a readable copy of the
|
||||
attribution notices contained within such NOTICE file, excluding those notices
|
||||
that do not pertain to any part of the Derivative Works, in at least one of the
|
||||
following places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if provided along
|
||||
with the Derivative Works; or, within a display generated by the Derivative
|
||||
Works, if and wherever such third-party notices normally appear. The contents of
|
||||
the NOTICE file are for informational purposes only and do not modify the
|
||||
License. You may add Your own attribution notices within Derivative Works that
|
||||
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
||||
provided that such additional attribution notices cannot be construed as
|
||||
modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide
|
||||
additional or different license terms and conditions for use, reproduction, or
|
||||
distribution of Your modifications, or for any such Derivative Works as a whole,
|
||||
provided Your use, reproduction, and distribution of the Work otherwise complies
|
||||
with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions.
|
||||
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
||||
for inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
||||
any separate license agreement you may have executed with Licensor regarding
|
||||
such Contributions.
|
||||
|
||||
6. Trademarks.
|
||||
|
||||
This License does not grant permission to use the trade names, trademarks,
|
||||
service marks, or product names of the Licensor, except as required for
|
||||
reasonable and customary use in describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the
|
||||
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
||||
including, without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
||||
solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise of
|
||||
permissions under this License.
|
||||
|
||||
8. Limitation of Liability.
|
||||
|
||||
In no event and under no legal theory, whether in tort (including negligence),
|
||||
contract, or otherwise, unless required by applicable law (such as deliberate
|
||||
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License or
|
||||
out of the use or inability to use the Work (including but not limited to
|
||||
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
||||
any and all other commercial damages or losses), even if such Contributor has
|
||||
been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability.
|
||||
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to
|
||||
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
||||
other liability obligations and/or rights consistent with this License. However,
|
||||
in accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if You
|
||||
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason of your
|
||||
accepting any such warranty or additional liability.
|
|
@ -0,0 +1,42 @@
|
|||
# Serial Flash
|
||||
|
||||
### Overview
|
||||
|
||||
Provides functions for interacting with an external flash connected through its Single SPI/Dual SPI/Quad SPI/Octal SPI interface. The read operation can be performed in either blocking or non-blocking manner by calling the corresponding function while the write and erase operations are implemented as blocking functions. This library accepts the configuration generated using the QSPI Configurator tool but supports only one memory slot. Note that PSoC™ 6 supports up to 4 memory slots on the same QSPI block.
|
||||
|
||||
### Features
|
||||
|
||||
* Supports asynchronous (non-blocking) read operation
|
||||
* Implements thread-safety for use with multi-threaded RTOS environment using the [abstraction-rtos](https://github.com/infineon/abstraction-rtos) library
|
||||
* Accepts the configuration generated by the QSPI Configurator tool
|
||||
* Supports Execute-in-Place (XIP) mode of operation
|
||||
* Provides information about the external memory to the programming tool for it to be able to program the memory, for example, when user wants to place the code into the external memory for XIP operation.
|
||||
* Allows for programming external memory if CY_ENABLE_XIP_PROGRAM is defined when building the application. Note: This is not compatible with the PSoC™ 64 series of devices.
|
||||
|
||||
### Quick Start
|
||||
1. Add \#include "cy_serial_flash_qspi.h"
|
||||
2. Add `DEFINES=CY_SERIAL_FLASH_QSPI_THREAD_SAFE` in the Makefile to enable thread-safety when used in a multi-threaded RTOS environment
|
||||
3. See the [PSoC™ 6 MCU: QSPI Flash Read and Write](https://github.com/infineon/mtb-example-psoc6-qspi-readwrite) code example to learn using this library
|
||||
|
||||
**NOTE:**
|
||||
If you delete the contents of the GeneratedSource directory inside the BSP, you must re-generate the memory configuration files *cycfg_qspi_memslot.c/.h*. To do this from inside the ModusToolbox™ IDE, open the QSPI Configurator tool from the Quick Panel and press **Ctrl+S** or click **File > Save**. If you open the tool outside the IDE, you need to first open the *design.cyqspi* file in the tool. To do this, click **File > Import** and then locate the file inside the BSP under *COMPONENT_BSP_DESIGN_MODUS* directory.
|
||||
|
||||
**NOTE:**
|
||||
For devices with no internal flash (eg:CAT1B device CYW20829), user needs to disable 'config data in flash' option in QSPI Configurator.
|
||||
|
||||
### Dependencies
|
||||
|
||||
* [abstraction-rtos](https://github.com/infineon/abstraction-rtos) library if `DEFINES=CY_SERIAL_FLASH_QSPI_THREAD_SAFE` is added in the Makefile
|
||||
|
||||
### More information
|
||||
|
||||
* [API Reference Guide](https://infineon.github.io/serial-flash/html/index.html)
|
||||
* [Cypress Semiconductor, an Infineon Technologies Company](http://www.cypress.com)
|
||||
* [Infineon GitHub](https://github.com/infineon)
|
||||
* [ModusToolbox™](https://www.cypress.com/products/modustoolbox-software-environment)
|
||||
* [PSoC™ 6 Code Examples using ModusToolbox™ IDE](https://github.com/infineon/Code-Examples-for-ModusToolbox-Software)
|
||||
* [ModusToolbox™ Software](https://github.com/Infineon/modustoolbox-software)
|
||||
* [PSoC™ 6 Resources - KBA223067](https://community.cypress.com/docs/DOC-14644)
|
||||
|
||||
---
|
||||
© Cypress Semiconductor Corporation (an Infineon company) or an affiliate of Cypress Semiconductor Corporation, 2019-2021.
|
|
@ -0,0 +1,54 @@
|
|||
# Serial Flash Library Release Notes
|
||||
Provides functions for interacting with an external flash connected through its Single/Dual/Quad/Octal SPI interface.
|
||||
|
||||
### What's Included?
|
||||
* APIs for Read/Write/Erase operations
|
||||
* Supports Execute-in-Place (XIP) mode of operation
|
||||
* Accepts the configuration generated by the QSPI Configurator tool
|
||||
* Allows for providing information to the programming tool to program the external memory.
|
||||
|
||||
### What Changed?
|
||||
#### v1.3.0
|
||||
* Added support for CAT1B device - CYW20829.
|
||||
#### v1.2.0
|
||||
* Added support for HAL API v1 or v2
|
||||
#### v1.1.0
|
||||
* Added the following functions:
|
||||
- `cy_serial_flash_qspi_read_async()` - Supports asynchronous (non-blocking) read using fixed DMA resources. Refer to the API reference manual for details on the list of devices supported for DMA operation and the exact DMA resources used.
|
||||
- `cy_serial_flash_qspi_abort_read()` - Aborts an ongoing asynchronous read operation
|
||||
- `cy_serial_flash_qspi_set_dma_interrupt_priority()` - Changes the DMA interrupt priority
|
||||
* Implemented thread-safety for use with multi-threaded RTOS environment using the [abstraction-rtos](https://github.com/infineon/abstraction-rtos) library
|
||||
- Add `DEFINES=CY_SERIAL_FLASH_QSPI_THREAD_SAFE` in the Makefile to enable thread-safety
|
||||
* Updated `cy_serial_flash_qspi_get_erase_size()` to support memories with hybrid sectors
|
||||
#### v1.0.2
|
||||
* Added new function `cy_serial_flash_qspi_get_prog_size()` to get the programming size
|
||||
* Minor documentation updates
|
||||
#### v1.0.1
|
||||
* Minor update for documentation & branding
|
||||
#### v1.0.0
|
||||
* Initial release
|
||||
|
||||
### Supported Software and Tools
|
||||
This version of the Serial Flash library was validated for compatibility with the following Software and Tools:
|
||||
|
||||
| Software and Tools | Version |
|
||||
| :--- | :----: |
|
||||
| ModusToolbox™ Software Environment | 2.4.0 |
|
||||
| GCC Compiler | 10.3.1 |
|
||||
| IAR Compiler | 8.4 |
|
||||
| ARM Compiler 6 | 6.11 |
|
||||
|
||||
Minimum required ModusToolbox™ Software Environment: v2.0
|
||||
|
||||
### More information
|
||||
|
||||
* [API Reference Guide](https://infineon.github.io/serial-flash/html/index.html)
|
||||
* [Cypress Semiconductor, an Infineon Technologies Company](http://www.cypress.com)
|
||||
* [Infineon GitHub](https://github.com/infineon)
|
||||
* [ModusToolbox™](https://www.cypress.com/products/modustoolbox-software-environment)
|
||||
* [PSoC™ 6 Code Examples using ModusToolbox™ IDE](https://github.com/infineon/Code-Examples-for-ModusToolbox-Software)
|
||||
* [ModusToolbox™ Software](https://github.com/Infineon/modustoolbox-software)
|
||||
* [PSoC™ 6 Resources - KBA223067](https://community.cypress.com/docs/DOC-14644)
|
||||
|
||||
---
|
||||
© Cypress Semiconductor Corporation (an Infineon company) or an affiliate of Cypress Semiconductor Corporation, 2019-2021.
|
|
@ -0,0 +1,101 @@
|
|||
/***********************************************************************************************//**
|
||||
* \file cy_serial_flash_prog.c
|
||||
*
|
||||
* \brief
|
||||
* Provides variables necessary to inform programming tools how to program the
|
||||
* attached serial flash memory. The variables used here must be placed at
|
||||
* specific locations in order to be detected and used by programming tools
|
||||
* to know that there is an attached memory and its characteristics. Uses the
|
||||
* configuration provided as part of BSP.
|
||||
*
|
||||
***************************************************************************************************
|
||||
* \copyright
|
||||
* Copyright 2018-2022 Cypress Semiconductor Corporation (an Infineon company) or
|
||||
* an affiliate of Cypress Semiconductor Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed 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.
|
||||
**************************************************************************************************/
|
||||
|
||||
/**
|
||||
* \addtogroup group_board_libs
|
||||
* \{
|
||||
* In addition to the APIs for reading and writting to memory at runtime, this library also
|
||||
* provides support for informing programming tools about the external memory so it can be
|
||||
* be written at the same time as internal flash. This support can be enabled by defining
|
||||
* CY_ENABLE_XIP_PROGRAM while building the application. With this define in place, code
|
||||
* will be generated in the .cy_sflash_user_data & .cy_toc_part2 sections. These sections
|
||||
* must be provided by the linker script for the application. One the application has been
|
||||
* built, these locations can be read by programming tools (eg: Cypress Programmer, OpenOCD,
|
||||
* pyOCD) to know that there is a memory device attached and how to program it.
|
||||
* \note This support is not compatible with the PSoCâ„¢ 64 series of devices.
|
||||
* \} group_board_libs
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(CY_ENABLE_XIP_PROGRAM)
|
||||
|
||||
#include "cycfg_qspi_memslot.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const cy_stc_smif_block_config_t* smifCfg; // Pointer to SMIF top-level configuration
|
||||
const uint32_t null_t; // NULL termination
|
||||
} stc_smif_ipblocks_arr_t;
|
||||
|
||||
// This data can be placed anywhere in the internal memory, but it must be at a location that
|
||||
// can be determined and used for the calculation of the CRC16 checksum in the cyToc below. There
|
||||
// are multiple ways this can be accomplished including:
|
||||
// 1) Placing it in a dedicated memory block with a known address. (as done here)
|
||||
// 2) Placing it at an absolute location via a the linker script
|
||||
// 3) Using 'cymcuelftool -S' to recompute the checksum and patch the elf file after linking
|
||||
CY_SECTION(".cy_sflash_user_data") __attribute__((used))
|
||||
const stc_smif_ipblocks_arr_t smifIpBlocksArr = { &smifBlockConfig, 0x00000000 };
|
||||
|
||||
// This data is used to populate the table of contents part 2. When present, it is used by the boot
|
||||
// process and programming tools to determine key characteristics about the memory usage including
|
||||
// where the boot process should start the application from and what external memories are connected
|
||||
// (if any). This must consume a full row of flash memory row. The last entry is a checksum of the
|
||||
// other values in the ToC which must be updated if any other value changes. This can be done
|
||||
// manually or by running 'cymcuelftool -S' to recompute the checksum.
|
||||
CY_SECTION(".cy_toc_part2") __attribute__((used))
|
||||
const uint32_t cyToc[128] =
|
||||
{
|
||||
0x200-4, // Offset=0x0000: Object Size, bytes
|
||||
0x01211220, // Offset=0x0004: Magic Number (TOC Part 2, ID)
|
||||
0, // Offset=0x0008: Key Storage Address
|
||||
(int)&smifIpBlocksArr, // Offset=0x000C: This points to a null terminated array of SMIF
|
||||
// structures.
|
||||
0x10000000u, // Offset=0x0010: App image start address
|
||||
// Offset=0x0014-0x01F7: Reserved
|
||||
[126] = 0x000002C2, // Offset=0x01
|
||||
// Bits[ 1: 0] CLOCK_CONFIG (0=8MHz, 1=25MHz, 2=50MHz, 3=100MHz)
|
||||
// Bits[ 4: 2] LISTEN_WINDOW (0=20ms, 1=10ms, 2=1ms, 3=0ms, 4=100ms)
|
||||
// Bits[ 6: 5] SWJ_PINS_CTL (0/1/3=Disable SWJ, 2=Enable SWJ)
|
||||
// Bits[ 8: 7] APP_AUTHENTICATION (0/2/3=Enable, 1=Disable)
|
||||
// Bits[10: 9] FB_BOOTLOADER_CTL: UNUSED
|
||||
[127] = 0x3BB30000 // Offset=0x01FC: CRC16-CCITT
|
||||
// (the upper 2 bytes contain the CRC and the lower 2 bytes are 0)
|
||||
};
|
||||
|
||||
#endif // defined(CY_ENABLE_XIP_PROGRAM)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,921 @@
|
|||
/***********************************************************************************************//**
|
||||
* \file cy_serial_flash_qspi.c
|
||||
*
|
||||
* \brief
|
||||
* Provides APIs for interacting with an external flash connected to the SPI or
|
||||
* QSPI interface, uses SFDP to auto-discover memory properties if SFDP is
|
||||
* enabled in the configuration.
|
||||
*
|
||||
***************************************************************************************************
|
||||
* \copyright
|
||||
* Copyright 2018-2022 Cypress Semiconductor Corporation (an Infineon company) or
|
||||
* an affiliate of Cypress Semiconductor Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed 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 <stdbool.h>
|
||||
#include "cy_serial_flash_qspi.h"
|
||||
#include "cyhal_qspi.h"
|
||||
#include "cy_trigmux.h"
|
||||
#include "cy_dma.h"
|
||||
#include "cy_utils.h"
|
||||
|
||||
#if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE)
|
||||
#include <stdlib.h>
|
||||
#include "cyabs_rtos.h"
|
||||
#endif /* #if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE) */
|
||||
|
||||
#ifdef CY_IP_MXSMIF
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/** \cond INTERNAL */
|
||||
|
||||
/** Timeout to apply while polling the memory for its ready status after quad
|
||||
* enable command has been sent out. Quad enable is a non-volatile write.
|
||||
*/
|
||||
#define CY_SERIAL_FLASH_QUAD_ENABLE_TIMEOUT_US (5000lu) // in microseconds
|
||||
|
||||
/** Number of loops to run while polling the SMIF for its busy status. */
|
||||
#define SMIF_BUSY_CHECK_LOOP_COUNT (10lu)
|
||||
|
||||
/** Timeout to apply per loop while polling the SMIF for its busy status. */
|
||||
#define SMIF_BUSY_CHECK_TIMEOUT_MS (1lu) // in milliseconds
|
||||
|
||||
// Number of memories supported by the driver
|
||||
#define SMIF_MEM_DEVICES (1u)
|
||||
|
||||
// SMIF slot from which the memory configuration is picked up - fixed to 0 as
|
||||
// the driver supports only one device
|
||||
#define MEM_SLOT (0u)
|
||||
|
||||
/* Maximum number of bytes that can be read by SMIF in one transfer */
|
||||
#define SMIF_MAX_RX_COUNT (65536lu)
|
||||
|
||||
#define DMA_YCOUNT_ONE_LOOP (1lu)
|
||||
|
||||
#define MSB_SHIFT_EIGHT (0x08u)
|
||||
#define LSB_MASK (0xFFlu)
|
||||
|
||||
/* Masks used for checking the flag bits */
|
||||
#define FLAG_QSPI_HAL_INIT_DONE (0x01lu << 0)
|
||||
#define FLAG_DMA_INIT_DONE (0x01lu << 1)
|
||||
#define FLAG_READ_IN_PROGRESS (0x01lu << 2)
|
||||
|
||||
#define IS_FLAG_SET(mask) (status_flags & (mask))
|
||||
#define SET_FLAG(mask) (status_flags |= (mask))
|
||||
#define CLEAR_FLAG(mask) (status_flags &= ~(mask))
|
||||
|
||||
#if defined(CY_DEVICE_PSOC6ABLE2)
|
||||
/* You cannot simply change these values. The trigger mux connect code in
|
||||
* _init_dma() needs to be updated correspondingly.
|
||||
*/
|
||||
#define RX_DMA_INSTANCE DW1
|
||||
#define RX_DMA_CHANNEL_NUM (15lu)
|
||||
#define RX_DMA_CH0_IRQn (cpuss_interrupts_dw1_0_IRQn)
|
||||
#elif defined(CY_DEVICE_PSOC6A2M) || defined(CY_DEVICE_PSOC6A512K) || defined(CY_DEVICE_PSOC6A256K)
|
||||
/* In these devices, only 1to1 triggers are available between SMIF and a
|
||||
* specific combination of DW instances and channel numbers.
|
||||
* i.e. TX trigger request from SMIF can connect only to DW1 CH22 and
|
||||
* RX trigger request from SMIF can connect only to DW1 CH23.
|
||||
*/
|
||||
#define RX_DMA_INSTANCE DW1
|
||||
#define RX_DMA_CHANNEL_NUM (23lu)
|
||||
#define RX_DMA_CH0_IRQn (cpuss_interrupts_dw1_0_IRQn)
|
||||
|
||||
#define DEVICE_GROUP_1TO1_TRIGGER
|
||||
#elif defined(CY_DEVICE_CYW20829)
|
||||
#define RX_DMA_INSTANCE DW0
|
||||
#define RX_DMA_CHANNEL_NUM (0u)
|
||||
#define RX_DMA_CH0_IRQn (cpuss_interrupts_dw0_0_IRQn)
|
||||
#else // if defined(CY_DEVICE_PSOC6ABLE2)
|
||||
#define DMA_UNSUPPORTED
|
||||
#endif // if defined(CY_DEVICE_PSOC6ABLE2)
|
||||
|
||||
#define DMA_CHANNEL_PRIORITY (3lu)
|
||||
#define DMA_INTR_PRIORITY (7lu)
|
||||
|
||||
/** \endcond */
|
||||
|
||||
static cyhal_qspi_t qspi_obj;
|
||||
static volatile uint32_t status_flags;
|
||||
static cy_stc_smif_mem_config_t* qspi_mem_config[SMIF_MEM_DEVICES];
|
||||
|
||||
static cy_stc_smif_block_config_t qspi_block_config =
|
||||
{
|
||||
// The number of SMIF memories defined.
|
||||
.memCount = SMIF_MEM_DEVICES,
|
||||
// The pointer to the array of memory config structures of size memCount.
|
||||
.memConfig = (cy_stc_smif_mem_config_t**)qspi_mem_config,
|
||||
// The version of the SMIF driver.
|
||||
.majorVersion = CY_SMIF_DRV_VERSION_MAJOR,
|
||||
// The version of the SMIF driver.
|
||||
.minorVersion = CY_SMIF_DRV_VERSION_MINOR
|
||||
};
|
||||
|
||||
#if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE)
|
||||
static cy_mutex_t serial_flash_mutex;
|
||||
#endif /* #if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE) */
|
||||
|
||||
#ifndef DMA_UNSUPPORTED
|
||||
typedef struct
|
||||
{
|
||||
uint32_t addr;
|
||||
size_t length;
|
||||
uint8_t* buf;
|
||||
cy_serial_flash_qspi_read_complete_callback_t callback;
|
||||
void* callback_arg;
|
||||
} read_txfr_info_t;
|
||||
|
||||
static read_txfr_info_t read_txfr_info;
|
||||
|
||||
/* DMA related variables */
|
||||
static cy_stc_dma_descriptor_t dma_descr;
|
||||
|
||||
/* Default DW descriptor config */
|
||||
static cy_stc_dma_descriptor_config_t dma_descr_config =
|
||||
{
|
||||
.retrigger = CY_DMA_RETRIG_4CYC,
|
||||
.interruptType = CY_DMA_DESCR,
|
||||
.triggerOutType = CY_DMA_DESCR_CHAIN,
|
||||
.channelState = CY_DMA_CHANNEL_ENABLED,
|
||||
.triggerInType = CY_DMA_DESCR,
|
||||
.dataSize = CY_DMA_BYTE,
|
||||
.srcTransferSize = CY_DMA_TRANSFER_SIZE_WORD,
|
||||
.dstTransferSize = CY_DMA_TRANSFER_SIZE_DATA,
|
||||
.descriptorType = CY_DMA_2D_TRANSFER,
|
||||
.srcAddress = 0,
|
||||
.dstAddress = 0,
|
||||
.srcXincrement = 0U,
|
||||
.dstXincrement = 1U,
|
||||
.xCount = 1UL,
|
||||
.srcYincrement = 0U,
|
||||
.dstYincrement = CY_DMA_LOOP_COUNT_MAX,
|
||||
.yCount = 1UL,
|
||||
.nextDescriptor = &dma_descr,
|
||||
};
|
||||
|
||||
/* Default DW channel config */
|
||||
static cy_stc_dma_channel_config_t dma_channel_config =
|
||||
{
|
||||
.descriptor = &dma_descr,
|
||||
.preemptable = false,
|
||||
.priority = DMA_CHANNEL_PRIORITY,
|
||||
.enable = false,
|
||||
.bufferable = false,
|
||||
};
|
||||
|
||||
static const cyhal_resource_inst_t DW_obj =
|
||||
{
|
||||
.type = CYHAL_RSC_DW,
|
||||
.block_num = ((uint32_t)RX_DMA_INSTANCE - DW0_BASE)/sizeof(DW_Type),
|
||||
.channel_num = RX_DMA_CHANNEL_NUM
|
||||
};
|
||||
|
||||
static cy_rslt_t _init_dma(void);
|
||||
static cy_rslt_t _deinit_dma(void);
|
||||
static void _rx_dma_irq_handler(void);
|
||||
static cy_en_smif_status_t _read_next_chunk(void);
|
||||
#if !defined(CY_DEVICE_CYW20829)
|
||||
static void _value_to_byte_array(uint32_t value, uint8_t* byte_array, uint32_t start_pos,
|
||||
uint32_t size);
|
||||
#endif /* #if !defined(CY_DEVICE_CYW20829) */
|
||||
#endif /* #ifndef DMA_UNSUPPORTED */
|
||||
|
||||
static inline cy_rslt_t _mutex_acquire(void);
|
||||
static inline cy_rslt_t _mutex_release(void);
|
||||
|
||||
#if defined(CY_DEVICE_CYW20829)
|
||||
static cy_stc_smif_context_t SMIFContext;
|
||||
#endif /* defined(CY_DEVICE_CYW20829) */
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_init
|
||||
//
|
||||
// The driver supports only one memory. When multiple memory configurations are generated by the
|
||||
// SMIF configurator tool, provide only the configuration for memory that need to be supported by
|
||||
// the driver. Memory configuration can be changed by deinit followed by init with new
|
||||
// configuration
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cy_rslt_t cy_serial_flash_qspi_init(
|
||||
const cy_stc_smif_mem_config_t* mem_config,
|
||||
cyhal_gpio_t io0,
|
||||
cyhal_gpio_t io1,
|
||||
cyhal_gpio_t io2,
|
||||
cyhal_gpio_t io3,
|
||||
cyhal_gpio_t io4,
|
||||
cyhal_gpio_t io5,
|
||||
cyhal_gpio_t io6,
|
||||
cyhal_gpio_t io7,
|
||||
cyhal_gpio_t sclk,
|
||||
cyhal_gpio_t ssel,
|
||||
uint32_t hz)
|
||||
{
|
||||
cy_rslt_t result = CY_RSLT_SUCCESS;
|
||||
cy_en_smif_status_t smif_status = CY_SMIF_SUCCESS;
|
||||
|
||||
#if (CYHAL_API_VERSION >= 2)
|
||||
// SMIF is already initialized for 20829 hence we can skip calling cyhal_qspi_init.
|
||||
// initializing only the SMIF base address and the context variables for 20829.
|
||||
#if defined(CY_DEVICE_CYW20829)
|
||||
qspi_obj.base = SMIF0;
|
||||
qspi_obj.context = SMIFContext;
|
||||
#else /* defined(CY_DEVICE_CYW20829) */
|
||||
cyhal_qspi_slave_pin_config_t memory_pin_set =
|
||||
{
|
||||
.io = { io0, io1, io2, io3, io4, io5, io6, io7 },
|
||||
.ssel = ssel
|
||||
};
|
||||
result = cyhal_qspi_init(&qspi_obj, sclk, &memory_pin_set, hz, 0, NULL);
|
||||
#endif /* defined(CY_DEVICE_CYW20829) */
|
||||
|
||||
#else /* HAL API version 1 */
|
||||
result = cyhal_qspi_init(&qspi_obj, io0, io1, io2, io3, io4, io5, io6, io7, sclk, ssel, hz, 0);
|
||||
#endif /* HAL API version 1 */
|
||||
|
||||
qspi_mem_config[MEM_SLOT] = (cy_stc_smif_mem_config_t*)mem_config;
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
SET_FLAG(FLAG_QSPI_HAL_INIT_DONE);
|
||||
|
||||
// Perform SFDP detection and XIP register configuration depending on the memory
|
||||
// configuration.
|
||||
smif_status = Cy_SMIF_MemInit(qspi_obj.base, &qspi_block_config, &qspi_obj.context);
|
||||
if (CY_SMIF_SUCCESS == smif_status)
|
||||
{
|
||||
// Enable Quad mode (1-1-4 or 1-4-4 modes) to use all the four I/Os during
|
||||
// communication.
|
||||
|
||||
if ((qspi_block_config.memConfig[MEM_SLOT]->deviceCfg->readCmd->dataWidth ==
|
||||
CY_SMIF_WIDTH_QUAD) ||
|
||||
(qspi_block_config.memConfig[MEM_SLOT]->deviceCfg->programCmd->dataWidth ==
|
||||
CY_SMIF_WIDTH_QUAD))
|
||||
{
|
||||
bool isQuadEnabled = false;
|
||||
smif_status =
|
||||
Cy_SMIF_MemIsQuadEnabled(qspi_obj.base, qspi_block_config.memConfig[MEM_SLOT],
|
||||
&isQuadEnabled, &qspi_obj.context);
|
||||
if ((CY_SMIF_SUCCESS == smif_status) && !isQuadEnabled)
|
||||
{
|
||||
smif_status =
|
||||
Cy_SMIF_MemEnableQuadMode(qspi_obj.base,
|
||||
qspi_block_config.memConfig[MEM_SLOT],
|
||||
CY_SERIAL_FLASH_QUAD_ENABLE_TIMEOUT_US,
|
||||
&qspi_obj.context);
|
||||
}
|
||||
}
|
||||
if (CY_SMIF_SUCCESS == smif_status)
|
||||
{
|
||||
#ifndef DMA_UNSUPPORTED
|
||||
result = _init_dma();
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
SET_FLAG(FLAG_DMA_INIT_DONE);
|
||||
#endif /* #ifndef DMA_UNSUPPORTED */
|
||||
|
||||
#if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE)
|
||||
/* Initialize the mutex */
|
||||
result = cy_rtos_init_mutex(&serial_flash_mutex);
|
||||
#endif /* #if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE) */
|
||||
|
||||
#ifndef DMA_UNSUPPORTED
|
||||
}
|
||||
#endif /* #ifndef DMA_UNSUPPORTED */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((CY_RSLT_SUCCESS != result) || (CY_SMIF_SUCCESS != smif_status))
|
||||
{
|
||||
cy_serial_flash_qspi_deinit();
|
||||
|
||||
if (CY_SMIF_SUCCESS != smif_status)
|
||||
{
|
||||
result = (cy_rslt_t)smif_status;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_deinit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void cy_serial_flash_qspi_deinit(void)
|
||||
{
|
||||
cy_rslt_t result;
|
||||
|
||||
if (IS_FLAG_SET(FLAG_QSPI_HAL_INIT_DONE))
|
||||
{
|
||||
/* For CYW20829, BOOTROM enables XIP by default and user is not expected to
|
||||
disable memory while in XIP */
|
||||
#if !defined(CY_DEVICE_CYW20829)
|
||||
if (qspi_obj.base != NULL)
|
||||
{
|
||||
/* There is no harm in calling this even if Cy_SMIF_MemInit() did
|
||||
* not succeed since anyway we own the QSPI object.
|
||||
*/
|
||||
Cy_SMIF_MemDeInit(qspi_obj.base);
|
||||
}
|
||||
|
||||
cyhal_qspi_free(&qspi_obj);
|
||||
#endif /* !defined(CY_DEVICE_CYW20829) */
|
||||
CLEAR_FLAG(FLAG_QSPI_HAL_INIT_DONE);
|
||||
|
||||
#ifndef DMA_UNSUPPORTED
|
||||
if (IS_FLAG_SET(FLAG_DMA_INIT_DONE))
|
||||
{
|
||||
result = _deinit_dma();
|
||||
CY_ASSERT(CY_RSLT_SUCCESS == result);
|
||||
|
||||
CLEAR_FLAG(FLAG_DMA_INIT_DONE);
|
||||
#endif /* #ifndef DMA_UNSUPPORTED */
|
||||
|
||||
#if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE)
|
||||
result = cy_rtos_deinit_mutex(&serial_flash_mutex);
|
||||
CY_ASSERT(CY_RSLT_SUCCESS == result);
|
||||
#endif /* #if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE) */
|
||||
|
||||
#ifndef DMA_UNSUPPORTED
|
||||
}
|
||||
#endif /* #ifndef DMA_UNSUPPORTED */
|
||||
}
|
||||
|
||||
CY_UNUSED_PARAMETER(result); /* To avoid compiler warning in Release mode. */
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_get_size
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t cy_serial_flash_qspi_get_size(void)
|
||||
{
|
||||
return (size_t)qspi_block_config.memConfig[MEM_SLOT]->deviceCfg->memSize;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_get_erase_size
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t cy_serial_flash_qspi_get_erase_size(uint32_t addr)
|
||||
{
|
||||
size_t erase_sector_size;
|
||||
cy_stc_smif_hybrid_region_info_t* hybrid_info = NULL;
|
||||
|
||||
cy_en_smif_status_t smif_status =
|
||||
Cy_SMIF_MemLocateHybridRegion(qspi_block_config.memConfig[MEM_SLOT], &hybrid_info, addr);
|
||||
|
||||
if (CY_SMIF_SUCCESS != smif_status)
|
||||
{
|
||||
erase_sector_size = (size_t)qspi_block_config.memConfig[MEM_SLOT]->deviceCfg->eraseSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
erase_sector_size = (size_t)hybrid_info->eraseSize;
|
||||
}
|
||||
|
||||
return erase_sector_size;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_get_prog_size
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t cy_serial_flash_qspi_get_prog_size(uint32_t addr)
|
||||
{
|
||||
CY_UNUSED_PARAMETER(addr);
|
||||
return (size_t)qspi_block_config.memConfig[MEM_SLOT]->deviceCfg->programSize;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_read
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cy_rslt_t cy_serial_flash_qspi_read(uint32_t addr, size_t length, uint8_t* buf)
|
||||
{
|
||||
cy_rslt_t result_mutex_rel = CY_RSLT_SUCCESS;
|
||||
|
||||
cy_rslt_t result = _mutex_acquire();
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
// Cy_SMIF_MemRead() returns error if (addr + length) > total flash size.
|
||||
result = (cy_rslt_t)Cy_SMIF_MemRead(qspi_obj.base, qspi_block_config.memConfig[MEM_SLOT],
|
||||
addr,
|
||||
buf, length, &qspi_obj.context);
|
||||
result_mutex_rel = _mutex_release();
|
||||
}
|
||||
|
||||
/* Give priority to the status of SMIF operation when both SMIF operation
|
||||
* and mutex release fail.
|
||||
*/
|
||||
return ((CY_RSLT_SUCCESS == result) ? result_mutex_rel : result);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_abort_read
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cy_rslt_t cy_serial_flash_qspi_abort_read(void)
|
||||
{
|
||||
#ifndef DMA_UNSUPPORTED
|
||||
cy_rslt_t result;
|
||||
|
||||
/* Wait until SMIF finishes any pending transfer. */
|
||||
for (uint32_t loop = 0; loop < SMIF_BUSY_CHECK_LOOP_COUNT; loop++)
|
||||
{
|
||||
if (!Cy_SMIF_BusyCheck(qspi_obj.base))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
cyhal_system_delay_ms(SMIF_BUSY_CHECK_TIMEOUT_MS);
|
||||
}
|
||||
|
||||
if (Cy_SMIF_BusyCheck(qspi_obj.base))
|
||||
{
|
||||
SET_FLAG(FLAG_READ_IN_PROGRESS);
|
||||
result = CY_RSLT_SERIAL_FLASH_ERR_QSPI_BUSY;
|
||||
}
|
||||
else
|
||||
{
|
||||
Cy_DMA_Channel_Disable(RX_DMA_INSTANCE, RX_DMA_CHANNEL_NUM);
|
||||
result = CY_RSLT_SUCCESS;
|
||||
CLEAR_FLAG(FLAG_READ_IN_PROGRESS);
|
||||
}
|
||||
|
||||
return result;
|
||||
#else // ifndef DMA_UNSUPPORTED
|
||||
return CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED;
|
||||
#endif /* #ifndef DMA_UNSUPPORTED */
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_read_async
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cy_rslt_t cy_serial_flash_qspi_read_async(uint32_t addr, size_t length, uint8_t* buf,
|
||||
cy_serial_flash_qspi_read_complete_callback_t callback,
|
||||
void* callback_arg)
|
||||
{
|
||||
#ifndef DMA_UNSUPPORTED
|
||||
cy_rslt_t result = CY_RSLT_SERIAL_FLASH_ERR_BAD_PARAM;
|
||||
cy_rslt_t result_mutex_rel = CY_RSLT_SUCCESS;
|
||||
|
||||
CY_ASSERT(NULL != buf);
|
||||
|
||||
if (IS_FLAG_SET(FLAG_READ_IN_PROGRESS))
|
||||
{
|
||||
result = CY_RSLT_SERIAL_FLASH_ERR_READ_BUSY; /* Previous read request is not yet complete.
|
||||
*/
|
||||
}
|
||||
else if ((addr + length) <= cy_serial_flash_qspi_get_size())
|
||||
{
|
||||
result = _mutex_acquire();
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
read_txfr_info.addr = addr;
|
||||
read_txfr_info.length = length;
|
||||
read_txfr_info.buf = buf;
|
||||
read_txfr_info.callback = callback;
|
||||
read_txfr_info.callback_arg = callback_arg;
|
||||
|
||||
/* Enable the DMA channel */
|
||||
Cy_DMA_Channel_Enable(RX_DMA_INSTANCE, RX_DMA_CHANNEL_NUM);
|
||||
|
||||
SET_FLAG(FLAG_READ_IN_PROGRESS);
|
||||
result = (cy_rslt_t)_read_next_chunk(); /* Start the read transfer */
|
||||
|
||||
if (CY_RSLT_SUCCESS != result)
|
||||
{
|
||||
CLEAR_FLAG(FLAG_READ_IN_PROGRESS);
|
||||
}
|
||||
|
||||
result_mutex_rel = _mutex_release();
|
||||
}
|
||||
}
|
||||
|
||||
/* Give priority to the status of SMIF operation when both SMIF operation
|
||||
* and mutex release fail.
|
||||
*/
|
||||
return ((CY_RSLT_SUCCESS == result) ? result_mutex_rel : result);
|
||||
#else // ifndef DMA_UNSUPPORTED
|
||||
CY_UNUSED_PARAMETER(addr);
|
||||
CY_UNUSED_PARAMETER(length);
|
||||
CY_UNUSED_PARAMETER(buf);
|
||||
CY_UNUSED_PARAMETER(callback);
|
||||
CY_UNUSED_PARAMETER(callback_arg);
|
||||
|
||||
return CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED;
|
||||
#endif /* #ifndef DMA_UNSUPPORTED */
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_write
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cy_rslt_t cy_serial_flash_qspi_write(uint32_t addr, size_t length, const uint8_t* buf)
|
||||
{
|
||||
cy_rslt_t result_mutex_rel = CY_RSLT_SUCCESS;
|
||||
|
||||
cy_rslt_t result = _mutex_acquire();
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
// Cy_SMIF_MemWrite() returns error if (addr + length) > total flash size.
|
||||
result = (cy_rslt_t)Cy_SMIF_MemWrite(qspi_obj.base, qspi_block_config.memConfig[MEM_SLOT],
|
||||
addr,
|
||||
(uint8_t*)buf, length, &qspi_obj.context);
|
||||
result_mutex_rel = _mutex_release();
|
||||
}
|
||||
|
||||
/* Give priority to the status of SMIF operation when both SMIF operation
|
||||
* and mutex release fail.
|
||||
*/
|
||||
return ((CY_RSLT_SUCCESS == result) ? result_mutex_rel : result);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_erase
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cy_rslt_t cy_serial_flash_qspi_erase(uint32_t addr, size_t length)
|
||||
{
|
||||
cy_rslt_t result_mutex_rel = CY_RSLT_SUCCESS;
|
||||
|
||||
cy_rslt_t result = _mutex_acquire();
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
// If the erase is for the entire chip, use chip erase command
|
||||
if ((addr == 0u) && (length == cy_serial_flash_qspi_get_size()))
|
||||
{
|
||||
result =
|
||||
(cy_rslt_t)Cy_SMIF_MemEraseChip(qspi_obj.base,
|
||||
qspi_block_config.memConfig[MEM_SLOT],
|
||||
&qspi_obj.context);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cy_SMIF_MemEraseSector() returns error if (addr + length) > total flash size or if
|
||||
// addr is not aligned to erase sector size or if (addr + length) is not aligned to
|
||||
// erase sector size.
|
||||
result =
|
||||
(cy_rslt_t)Cy_SMIF_MemEraseSector(qspi_obj.base,
|
||||
qspi_block_config.memConfig[MEM_SLOT],
|
||||
addr, length, &qspi_obj.context);
|
||||
}
|
||||
|
||||
result_mutex_rel = _mutex_release();
|
||||
}
|
||||
|
||||
/* Give priority to the status of SMIF operation when both SMIF operation
|
||||
* and mutex release fail.
|
||||
*/
|
||||
return ((CY_RSLT_SUCCESS == result) ? result_mutex_rel : result);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_enable_xip
|
||||
//
|
||||
// This function enables or disables XIP on the MCU, does not send any command
|
||||
// to the serial flash. XIP register configuration is already done as part of
|
||||
// cy_serial_flash_qspi_init() if MMIO mode is enabled in the QSPI
|
||||
// Configurator.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cy_rslt_t cy_serial_flash_qspi_enable_xip(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
Cy_SMIF_SetMode(qspi_obj.base, CY_SMIF_MEMORY);
|
||||
}
|
||||
else
|
||||
{
|
||||
Cy_SMIF_SetMode(qspi_obj.base, CY_SMIF_NORMAL);
|
||||
}
|
||||
|
||||
return CY_RSLT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_set_interrupt_priority
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void cy_serial_flash_qspi_set_interrupt_priority(uint8_t priority)
|
||||
{
|
||||
#if defined(CY_DEVICE_CYW20829)
|
||||
NVIC_SetPriority(smif_interrupt_normal_IRQn, priority);
|
||||
#else /* defined(CY_DEVICE_CYW20829) */
|
||||
NVIC_SetPriority(smif_interrupt_IRQn, priority);
|
||||
#endif /* defined(CY_DEVICE_CYW20829) */
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// cy_serial_flash_qspi_set_interrupt_priority
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void cy_serial_flash_qspi_set_dma_interrupt_priority(uint8_t priority)
|
||||
{
|
||||
#ifndef DMA_UNSUPPORTED
|
||||
NVIC_SetPriority((IRQn_Type)(RX_DMA_CH0_IRQn + RX_DMA_CHANNEL_NUM), priority);
|
||||
#else
|
||||
CY_UNUSED_PARAMETER(priority);
|
||||
#endif /* #ifndef DMA_UNSUPPORTED */
|
||||
}
|
||||
|
||||
|
||||
#ifndef DMA_UNSUPPORTED
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// _read_next_chunk
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static cy_en_smif_status_t _read_next_chunk(void)
|
||||
{
|
||||
cy_en_smif_status_t smif_status = CY_SMIF_SUCCESS;
|
||||
uint32_t chunk;
|
||||
#if !defined(CY_DEVICE_CYW20829)
|
||||
uint8_t addr_array[CY_SMIF_FOUR_BYTES_ADDR] = { 0U };
|
||||
#endif /* !defined(CY_DEVICE_CYW20829) */
|
||||
|
||||
if (read_txfr_info.length > 0UL)
|
||||
{
|
||||
/* SMIF can read only up to 65536 bytes in one go. Split the larger read into multiple
|
||||
chunks */
|
||||
chunk =
|
||||
(read_txfr_info.length >
|
||||
SMIF_MAX_RX_COUNT) ? (SMIF_MAX_RX_COUNT) : read_txfr_info.length;
|
||||
|
||||
/* In 2D transfer, (X_count x Y_count) should be a multiple of CY_DMA_LOOP_COUNT_MAX (256).
|
||||
*/
|
||||
if (chunk > CY_DMA_LOOP_COUNT_MAX)
|
||||
{
|
||||
/* Make chunk divisible by CY_DMA_LOOP_COUNT_MAX (256) by masking out the LS bits */
|
||||
chunk &= ~(CY_DMA_LOOP_COUNT_MAX - 1);
|
||||
|
||||
dma_descr_config.yCount = chunk/CY_DMA_LOOP_COUNT_MAX;
|
||||
dma_descr_config.xCount = CY_DMA_LOOP_COUNT_MAX;
|
||||
}
|
||||
else
|
||||
{
|
||||
dma_descr_config.yCount = DMA_YCOUNT_ONE_LOOP;
|
||||
dma_descr_config.xCount = chunk;
|
||||
}
|
||||
|
||||
dma_descr_config.dstAddress = (void*)read_txfr_info.buf;
|
||||
#if defined(CY_DEVICE_CYW20829)
|
||||
dma_descr_config.dataSize = CY_DMA_BYTE;
|
||||
dma_descr_config.srcTransferSize = CY_DMA_TRANSFER_SIZE_DATA,
|
||||
dma_descr_config.srcXincrement = 1;
|
||||
dma_descr_config.srcAddress =
|
||||
(void*)(qspi_block_config.memConfig[MEM_SLOT]->baseAddress + read_txfr_info.addr);
|
||||
#endif /* defined(CY_DEVICE_CYW20829) */
|
||||
Cy_DMA_Descriptor_Init(&dma_descr, &dma_descr_config);
|
||||
|
||||
#if defined(CY_DEVICE_CYW20829)
|
||||
Cy_TrigMux_SwTrigger(TRIG_OUT_MUX_0_PDMA0_TR_IN0, CY_TRIGGER_TWO_CYCLES);
|
||||
#else /* defined(CY_DEVICE_CYW20829) */
|
||||
/* Pass NULL for buffer (and callback) so that the function does not
|
||||
* set up FIFO interrupt. We don't need FIFO interrupt to be setup
|
||||
* since we will be using DMA.
|
||||
*/
|
||||
_value_to_byte_array(read_txfr_info.addr, &addr_array[0], 0UL,
|
||||
qspi_block_config.memConfig[MEM_SLOT]->deviceCfg->numOfAddrBytes);
|
||||
smif_status = Cy_SMIF_MemCmdRead(qspi_obj.base, qspi_block_config.memConfig[MEM_SLOT],
|
||||
addr_array, NULL, chunk, NULL, &qspi_obj.context);
|
||||
|
||||
if (CY_SMIF_SUCCESS == smif_status)
|
||||
#endif /* defined(CY_DEVICE_CYW20829) */
|
||||
{
|
||||
/* Recalculate the next rxBuffer offset */
|
||||
read_txfr_info.length -= chunk;
|
||||
read_txfr_info.addr += chunk;
|
||||
read_txfr_info.buf += chunk;
|
||||
}
|
||||
}
|
||||
|
||||
return smif_status;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// _init_dma
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static cy_rslt_t _init_dma(void)
|
||||
{
|
||||
cy_rslt_t result;
|
||||
|
||||
/* Set the source address of the descriptor */
|
||||
dma_descr_config.srcAddress = (void*)&SMIF_RX_DATA_FIFO_RD1(qspi_obj.base);
|
||||
|
||||
/* Configure the RX DMA */
|
||||
result =
|
||||
(cy_rslt_t)Cy_DMA_Channel_Init(RX_DMA_INSTANCE, RX_DMA_CHANNEL_NUM, &dma_channel_config);
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
Cy_DMA_Channel_SetInterruptMask(RX_DMA_INSTANCE, RX_DMA_CHANNEL_NUM, CY_DMA_INTR_MASK);
|
||||
Cy_DMA_Enable(RX_DMA_INSTANCE);
|
||||
|
||||
/* Configure interrupt for RX DMA */
|
||||
cy_stc_sysint_t dma_intr_config =
|
||||
{ .intrSrc = (IRQn_Type)(RX_DMA_CH0_IRQn + RX_DMA_CHANNEL_NUM),
|
||||
.intrPriority = DMA_INTR_PRIORITY };
|
||||
|
||||
result = (cy_rslt_t)Cy_SysInt_Init(&dma_intr_config, _rx_dma_irq_handler);
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
NVIC_EnableIRQ(dma_intr_config.intrSrc);
|
||||
|
||||
/* Configure the trigger mux */
|
||||
#if defined(DEVICE_GROUP_1TO1_TRIGGER)
|
||||
result = (cy_rslt_t)Cy_TrigMux_Select(TRIG_OUT_1TO1_3_SMIF_RX_TO_PDMA1_TR_IN23, false,
|
||||
TRIGGER_TYPE_LEVEL);
|
||||
#else //defined(DEVICE_GROUP_1TO1_TRIGGER)
|
||||
#if !defined(CY_DEVICE_CYW20829)
|
||||
|
||||
result = (cy_rslt_t)Cy_TrigMux_Connect(TRIG13_IN_SMIF_TR_RX_REQ,
|
||||
TRIG13_OUT_TR_GROUP0_INPUT42, false,
|
||||
TRIGGER_TYPE_LEVEL);
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
result = (cy_rslt_t)Cy_TrigMux_Connect(TRIG1_IN_TR_GROUP13_OUTPUT15,
|
||||
TRIG1_OUT_CPUSS_DW1_TR_IN15, false,
|
||||
TRIGGER_TYPE_LEVEL);
|
||||
}
|
||||
#endif /*defined(CY_DEVICE_CYW20829)*/
|
||||
#endif /* #if defined(DEVICE_GROUP_1TO1_TRIGGER) */
|
||||
}
|
||||
}
|
||||
|
||||
if (CY_RSLT_SUCCESS == result)
|
||||
{
|
||||
/* Reserve the DW instance so that HAL will not be able to use it later. */
|
||||
result = cyhal_hwmgr_reserve(&DW_obj);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// _deinit_dma
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static cy_rslt_t _deinit_dma(void)
|
||||
{
|
||||
cy_rslt_t result = CY_RSLT_SUCCESS;
|
||||
|
||||
NVIC_DisableIRQ((IRQn_Type)(RX_DMA_CH0_IRQn + RX_DMA_CHANNEL_NUM));
|
||||
|
||||
/* Disable only the channel, not the DW instance as it may be used by other
|
||||
* part of the application.
|
||||
*/
|
||||
Cy_DMA_Channel_Disable(RX_DMA_INSTANCE, RX_DMA_CHANNEL_NUM);
|
||||
|
||||
/* Free the DMA resource so that HAL can use it now */
|
||||
cyhal_hwmgr_free(&DW_obj);
|
||||
|
||||
#if defined(DEVICE_GROUP_1TO1_TRIGGER)
|
||||
result = (cy_rslt_t)Cy_TrigMux_Deselect(TRIG_OUT_1TO1_3_SMIF_RX_TO_PDMA1_TR_IN23);
|
||||
#else
|
||||
/* No PDL function is available for handling deinit for non-1to1 trigger muxes. */
|
||||
#endif /* #if defined(DEVICE_GROUP_1TO1_TRIGGER) */
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// _rx_dma_irq_handler
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void _rx_dma_irq_handler(void)
|
||||
{
|
||||
cy_en_smif_status_t smif_status = CY_SMIF_SUCCESS;
|
||||
bool terminate_read_txfr = true;
|
||||
cy_en_dma_intr_cause_t cause = Cy_DMA_Channel_GetStatus(RX_DMA_INSTANCE, RX_DMA_CHANNEL_NUM);
|
||||
|
||||
Cy_DMA_Channel_ClearInterrupt(RX_DMA_INSTANCE, RX_DMA_CHANNEL_NUM);
|
||||
|
||||
if (CY_DMA_INTR_CAUSE_COMPLETION == cause)
|
||||
{
|
||||
if (read_txfr_info.length > 0UL)
|
||||
{
|
||||
smif_status = _read_next_chunk();
|
||||
|
||||
if (CY_SMIF_SUCCESS == smif_status)
|
||||
{
|
||||
terminate_read_txfr = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
smif_status = (cy_en_smif_status_t)CY_RSLT_SERIAL_FLASH_ERR_DMA;
|
||||
}
|
||||
|
||||
if (terminate_read_txfr)
|
||||
{
|
||||
Cy_DMA_Channel_Disable(RX_DMA_INSTANCE, RX_DMA_CHANNEL_NUM);
|
||||
CLEAR_FLAG(FLAG_READ_IN_PROGRESS);
|
||||
|
||||
/* Execute the callback */
|
||||
if (NULL != read_txfr_info.callback)
|
||||
{
|
||||
read_txfr_info.callback((cy_rslt_t)smif_status, read_txfr_info.callback_arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if !defined(CY_DEVICE_CYW20829)
|
||||
/*******************************************************************************
|
||||
* Function Name: _value_to_byte_array
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Unpacks the specified number of bytes from a 32-bit value into the given byte
|
||||
* array.
|
||||
*
|
||||
* \param value
|
||||
* The 32-bit (4-byte) value to unpack.
|
||||
*
|
||||
* \param byte_array
|
||||
* The byte array to fill.
|
||||
*
|
||||
* \param start_pos
|
||||
* The start position of the byte array to begin filling from.
|
||||
*
|
||||
* \param size
|
||||
* The number of bytes to unpack.
|
||||
*
|
||||
*******************************************************************************/
|
||||
static void _value_to_byte_array(uint32_t value, uint8_t* byte_array, uint32_t start_pos,
|
||||
uint32_t size)
|
||||
{
|
||||
CY_ASSERT((0lu < size) && (CY_SMIF_FOUR_BYTES_ADDR >= size));
|
||||
CY_ASSERT(NULL != byte_array);
|
||||
|
||||
do
|
||||
{
|
||||
size--;
|
||||
byte_array[size + start_pos] = (uint8_t)(value & LSB_MASK);
|
||||
value >>= MSB_SHIFT_EIGHT; /* Shift to get the next byte */
|
||||
} while (size > 0U);
|
||||
}
|
||||
|
||||
|
||||
#endif /* #if !defined(CY_DEVICE_CYW20829)*/
|
||||
|
||||
#endif /* #ifndef DMA_UNSUPPORTED */
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// _mutex_acquire
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static inline cy_rslt_t _mutex_acquire(void)
|
||||
{
|
||||
#if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE)
|
||||
return cy_rtos_get_mutex(&serial_flash_mutex, CY_RTOS_NEVER_TIMEOUT);
|
||||
#else
|
||||
return CY_RSLT_SUCCESS;
|
||||
#endif /* #if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE) */
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// _mutex_release
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static inline cy_rslt_t _mutex_release(void)
|
||||
{
|
||||
#if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE)
|
||||
return cy_rtos_set_mutex(&serial_flash_mutex);
|
||||
#else
|
||||
return CY_RSLT_SUCCESS;
|
||||
#endif /* #if defined(CY_SERIAL_FLASH_QSPI_THREAD_SAFE) */
|
||||
}
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CY_IP_MXSMIF
|
|
@ -0,0 +1,272 @@
|
|||
/***********************************************************************************************//**
|
||||
* \file cy_serial_flash_qspi.h
|
||||
*
|
||||
* \brief
|
||||
* Provides APIs for interacting with an external flash connected to the SPI or
|
||||
* QSPI interface. Read is implemented as both blocking and non-blocking whereas
|
||||
* write, and erase are implemented as blocking functions.
|
||||
*
|
||||
***************************************************************************************************
|
||||
* \copyright
|
||||
* Copyright 2018-2022 Cypress Semiconductor Corporation (an Infineon company) or
|
||||
* an affiliate of Cypress Semiconductor Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed 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.
|
||||
**************************************************************************************************/
|
||||
|
||||
/**
|
||||
* \addtogroup group_board_libs Serial Flash
|
||||
* \ingroup group_lib
|
||||
* \{
|
||||
*
|
||||
* \section section_resource_usage DMA Resource Usage
|
||||
* This library uses fixed DMA (Datawire or DW) resources and supports DMA only
|
||||
* for the following devices. DMA is not supported for other devices and the
|
||||
* functions \ref cy_serial_flash_qspi_read_async() and
|
||||
* \ref cy_serial_flash_qspi_abort_read() will return
|
||||
* \ref CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED error and
|
||||
* \ref cy_serial_flash_qspi_set_dma_interrupt_priority() will simply return
|
||||
* doing nothing.
|
||||
* * CY8C6xx4, CY8C6xx5, CY8C6xx8, CY8C6xxA, CYB06xx5, CYB06xxA, CYS06xxA: <b>DW1, Channel 23</b>
|
||||
* * CY8C6xx6, CY8C6xx7, CYB06xx7: <b>DW1, Channel 15</b>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include "cy_result.h"
|
||||
#include "cy_pdl.h"
|
||||
#include "cyhal.h"
|
||||
|
||||
#ifdef CY_IP_MXSMIF
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** The function or operation is not supported on the target or the memory */
|
||||
#define CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED \
|
||||
(CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 1))
|
||||
|
||||
/** Parameters passed to a function are invalid */
|
||||
#define CY_RSLT_SERIAL_FLASH_ERR_BAD_PARAM \
|
||||
(CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 2))
|
||||
|
||||
/** A previously initiated read operation is not yet complete */
|
||||
#define CY_RSLT_SERIAL_FLASH_ERR_READ_BUSY \
|
||||
(CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 3))
|
||||
|
||||
/** A DMA error occurred during read transfer */
|
||||
#define CY_RSLT_SERIAL_FLASH_ERR_DMA \
|
||||
(CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 4))
|
||||
|
||||
/** Read abort failed. QSPI block is busy. */
|
||||
#define CY_RSLT_SERIAL_FLASH_ERR_QSPI_BUSY \
|
||||
(CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 5))
|
||||
|
||||
#ifdef DOXYGEN
|
||||
/** Enables thread-safety for use with multi-threaded RTOS environment. */
|
||||
#define CY_SERIAL_FLASH_QSPI_THREAD_SAFE
|
||||
#endif /* #ifdef DOXYGEN */
|
||||
|
||||
/**
|
||||
* Callback pointer to use with \ref cy_serial_flash_qspi_read_async().
|
||||
* \param operation_status Status of the read operation
|
||||
* \param callback_arg Pointer to be passed back to the callback function
|
||||
*/
|
||||
typedef void (* cy_serial_flash_qspi_read_complete_callback_t)(cy_rslt_t operation_status,
|
||||
void* callback_arg);
|
||||
|
||||
/**
|
||||
* \brief Initializes the serial flash memory. This function accepts up to 8
|
||||
* I/Os. Number of I/Os depend on the type of memory interface. Pass NC when an
|
||||
* I/O is unused.
|
||||
* Single SPI - (io0, io1) or (io2, io3) or (io4, io5) or (io6, io7)
|
||||
* Dual SPI - (io0, io1) or (io2, io3) or (io4, io5) or (io6, io7)
|
||||
* Quad SPI - (io0, io1, io2, io3) or (io4, io5, io6, io7)
|
||||
* Octal SPI - All 8 I/Os are used.
|
||||
* \param mem_config Memory configuration to be used for initializing
|
||||
* \param io0 Data/IO pin 0 connected to the memory, Pass NC when unused.
|
||||
* \param io1 Data/IO pin 1 connected to the memory, Pass NC when unused.
|
||||
* \param io2 Data/IO pin 2 connected to the memory, Pass NC when unused.
|
||||
* \param io3 Data/IO pin 3 connected to the memory, Pass NC when unused.
|
||||
* \param io4 Data/IO pin 4 connected to the memory, Pass NC when unused.
|
||||
* \param io5 Data/IO pin 5 connected to the memory, Pass NC when unused.
|
||||
* \param io6 Data/IO pin 6 connected to the memory, Pass NC when unused.
|
||||
* \param io7 Data/IO pin 7 connected to the memory, Pass NC when unused.
|
||||
* \param sclk Clock pin connected to the memory
|
||||
* \param ssel Slave select pin connected to the memory
|
||||
* \param hz Clock frequency to be used with the memory.
|
||||
* \returns CY_RSLT_SUCCESS if the initialization was successful, an error code
|
||||
* otherwise.
|
||||
*/
|
||||
cy_rslt_t cy_serial_flash_qspi_init(
|
||||
const cy_stc_smif_mem_config_t* mem_config,
|
||||
cyhal_gpio_t io0,
|
||||
cyhal_gpio_t io1,
|
||||
cyhal_gpio_t io2,
|
||||
cyhal_gpio_t io3,
|
||||
cyhal_gpio_t io4,
|
||||
cyhal_gpio_t io5,
|
||||
cyhal_gpio_t io6,
|
||||
cyhal_gpio_t io7,
|
||||
cyhal_gpio_t sclk,
|
||||
cyhal_gpio_t ssel,
|
||||
uint32_t hz);
|
||||
|
||||
/**
|
||||
* \brief De-initializes the serial flash memory.
|
||||
* Before calling this function, ensure that an ongoing asynchronous read
|
||||
* operation is either completed or successfully aborted.
|
||||
* Async read is started by calling \ref cy_serial_flash_qspi_read_async() and
|
||||
* aborted by calling \ref cy_serial_flash_qspi_abort_read().
|
||||
*/
|
||||
void cy_serial_flash_qspi_deinit(void);
|
||||
|
||||
/**
|
||||
* \brief Returns the size of the serial flash memory in bytes.
|
||||
* \returns Memory size in bytes.
|
||||
*/
|
||||
size_t cy_serial_flash_qspi_get_size(void);
|
||||
|
||||
/**
|
||||
* \brief Returns the size of the erase sector to which the given address
|
||||
* belongs. Address is used only for a memory with hybrid sector size.
|
||||
* \param addr Address that belongs to the sector for which size is returned.
|
||||
* \returns Erase sector size in bytes.
|
||||
*/
|
||||
size_t cy_serial_flash_qspi_get_erase_size(uint32_t addr);
|
||||
|
||||
/**
|
||||
* \brief Returns the page size for programming of the sector to which the given
|
||||
* address belongs. Address is used only for a memory with hybrid sector size.
|
||||
* \param addr Address that belongs to the sector for which size is returned.
|
||||
* \returns Page size in bytes.
|
||||
*/
|
||||
size_t cy_serial_flash_qspi_get_prog_size(uint32_t addr);
|
||||
|
||||
/**
|
||||
* \brief Utility function to calculate the starting address of an erase sector
|
||||
* to which the given address belongs.
|
||||
* \param addr Address in the sector for which the starting address is returned.
|
||||
* \returns Starting address of the sector
|
||||
*/
|
||||
__STATIC_INLINE uint32_t cy_serial_flash_get_sector_start_address(uint32_t addr)
|
||||
{
|
||||
return (addr & ~(cy_serial_flash_qspi_get_erase_size(addr) - 1));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Reads data from the serial flash memory. This is a blocking
|
||||
* function. Returns error if (addr + length) exceeds the flash size.
|
||||
* \param addr Starting address to read from
|
||||
* \param length Number of data bytes to read
|
||||
* \param buf Pointer to the buffer to store the data read from the memory
|
||||
* \returns CY_RSLT_SUCCESS if the read was successful, an error code otherwise.
|
||||
*/
|
||||
cy_rslt_t cy_serial_flash_qspi_read(uint32_t addr, size_t length, uint8_t* buf);
|
||||
|
||||
/**
|
||||
* \brief Reads data from the serial flash memory. This is a non-blocking
|
||||
* function. Returns error if (addr + length) exceeds the flash size.
|
||||
* Uses fixed DMA (DW) instance and channel for transferring the data from
|
||||
* QSPI RX FIFO to the user-provided buffer.
|
||||
* \param addr Starting address to read from
|
||||
* \param length Number of data bytes to read
|
||||
* \param buf Pointer to the buffer to store the data read from the memory
|
||||
* \param callback Pointer to the callback function to be called after the read
|
||||
* operation is complete. Callback is invoked from the DMA ISR.
|
||||
* \param callback_arg Pointer to the argument to be passed to the callback
|
||||
* function
|
||||
* \returns CY_RSLT_SUCCESS if the read was successful, an error code otherwise.
|
||||
*/
|
||||
cy_rslt_t cy_serial_flash_qspi_read_async(uint32_t addr, size_t length, uint8_t* buf,
|
||||
cy_serial_flash_qspi_read_complete_callback_t callback,
|
||||
void* callback_arg);
|
||||
|
||||
/**
|
||||
* \brief Aborts an ongoing asynchronous read initiated by calling
|
||||
* \ref cy_serial_flash_qspi_read_async().
|
||||
*
|
||||
* \returns CY_RSLT_SUCCESS if the abort was successful, an error code
|
||||
* if the QSPI block is still busy after a timeout.
|
||||
*/
|
||||
cy_rslt_t cy_serial_flash_qspi_abort_read(void);
|
||||
|
||||
/**
|
||||
* \brief Writes the data to the serial flash memory. The program area
|
||||
* must have been erased prior to calling this API using
|
||||
* \ref cy_serial_flash_qspi_erase() This is a blocking function. Returns error if
|
||||
* (addr + length) exceeds the flash size.
|
||||
* \param addr Starting address to write to
|
||||
* \param length Number of bytes to write
|
||||
* \param buf Pointer to the buffer storing the data to be written
|
||||
* \returns CY_RSLT_SUCCESS if the write was successful, an error code
|
||||
* otherwise.
|
||||
*/
|
||||
cy_rslt_t cy_serial_flash_qspi_write(uint32_t addr, size_t length, const uint8_t* buf);
|
||||
|
||||
/**
|
||||
* \brief Erases the serial flash memory, uses chip erase command when
|
||||
* addr = 0 and length = flash_size otherwise uses sector erase command. This is
|
||||
* a blocking function. Returns error if addr or (addr + length) is not aligned
|
||||
* to the sector size or if (addr + length) exceeds the flash size.
|
||||
* For memories with hybrid sectors, returns error if the end address
|
||||
* (=addr + length) is not aligned to the size of the sector in which the end
|
||||
* address is located.
|
||||
* Call \ref cy_serial_flash_qspi_get_size() to get the flash size and
|
||||
* call \ref cy_serial_flash_qspi_get_erase_size() to get the size of an erase
|
||||
* sector.
|
||||
*
|
||||
* \param addr Starting address to begin erasing
|
||||
* \param length Number of bytes to erase
|
||||
* \returns CY_RSLT_SUCCESS if the erase was successful, an error code
|
||||
* otherwise.
|
||||
*/
|
||||
cy_rslt_t cy_serial_flash_qspi_erase(uint32_t addr, size_t length);
|
||||
|
||||
/**
|
||||
* \brief Enables Execute-in-Place (memory mapped) mode on the MCU. This
|
||||
* function does not send any command to the serial flash. This may not be
|
||||
* supported on all the targets in which case
|
||||
* CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED is returned.
|
||||
* \param enable true: XIP mode is set, false: normal mode is set
|
||||
* \returns CY_RSLT_SUCCESS if the operation was successful.
|
||||
* CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED if the target does not
|
||||
* support XIP.
|
||||
*/
|
||||
cy_rslt_t cy_serial_flash_qspi_enable_xip(bool enable);
|
||||
|
||||
/**
|
||||
* \brief Changes QSPI interrupt priority
|
||||
* \param priority interrupt priority to be set
|
||||
*/
|
||||
void cy_serial_flash_qspi_set_interrupt_priority(uint8_t priority);
|
||||
|
||||
/**
|
||||
* \brief Changes the DMA interrupt priority
|
||||
* \param priority interrupt priority to be set
|
||||
*/
|
||||
void cy_serial_flash_qspi_set_dma_interrupt_priority(uint8_t priority);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CY_IP_MXSMIF
|
||||
|
||||
/** \} group_board_libs */
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Redirect to API Reference Manual main page after 0 seconds</title>
|
||||
<noscript>
|
||||
<meta http-equiv="refresh" content="0; URL=html/index.html">
|
||||
</noscript>
|
||||
<meta name="keywords" content="automatic redirection">
|
||||
</head>
|
||||
<body onLoad="window.location='html/index.html' " >
|
||||
<h2>
|
||||
If the automatic redirection is failing, click the following link to open <a href="html/index.html">API Reference Manual</a>.
|
||||
</h2>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 676 B |
After Width: | Height: | Size: 147 B |
After Width: | Height: | Size: 132 B |
After Width: | Height: | Size: 746 B |
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function toggleVisibility(linkObj)
|
||||
{
|
||||
var base = $(linkObj).attr('id');
|
||||
var summary = $('#'+base+'-summary');
|
||||
var content = $('#'+base+'-content');
|
||||
var trigger = $('#'+base+'-trigger');
|
||||
var src=$(trigger).attr('src');
|
||||
if (content.is(':visible')===true) {
|
||||
content.hide();
|
||||
summary.show();
|
||||
$(linkObj).addClass('closed').removeClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
content.show();
|
||||
summary.hide();
|
||||
$(linkObj).removeClass('closed').addClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateStripes()
|
||||
{
|
||||
$('table.directory tr').
|
||||
removeClass('even').filter(':visible:even').addClass('even');
|
||||
}
|
||||
|
||||
function toggleLevel(level)
|
||||
{
|
||||
$('table.directory tr').each(function() {
|
||||
var l = this.id.split('_').length-1;
|
||||
var i = $('#img'+this.id.substring(3));
|
||||
var a = $('#arr'+this.id.substring(3));
|
||||
if (l<level+1) {
|
||||
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
|
||||
a.html('▼');
|
||||
$(this).show();
|
||||
} else if (l==level+1) {
|
||||
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
|
||||
a.html('►');
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
function toggleFolder(id)
|
||||
{
|
||||
// the clicked row
|
||||
var currentRow = $('#row_'+id);
|
||||
|
||||
// all rows after the clicked row
|
||||
var rows = currentRow.nextAll("tr");
|
||||
|
||||
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
||||
|
||||
// only match elements AFTER this one (can't hide elements before)
|
||||
var childRows = rows.filter(function() { return this.id.match(re); });
|
||||
|
||||
// first row is visible we are HIDING
|
||||
if (childRows.filter(':first').is(':visible')===true) {
|
||||
// replace down arrow by right arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
currentRowSpans.filter(".arrow").html('►');
|
||||
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
|
||||
} else { // we are SHOWING
|
||||
// replace right arrow by down arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
|
||||
currentRowSpans.filter(".arrow").html('▼');
|
||||
// replace down arrows by right arrows for child rows
|
||||
var childRowsSpans = childRows.find("span");
|
||||
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
childRowsSpans.filter(".arrow").html('►');
|
||||
childRows.show(); //show all children
|
||||
}
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
|
||||
function toggleInherit(id)
|
||||
{
|
||||
var rows = $('tr.inherit.'+id);
|
||||
var img = $('tr.inherit_header.'+id+' img');
|
||||
var src = $(img).attr('src');
|
||||
if (rows.filter(':first').is(':visible')===true) {
|
||||
rows.css('display','none');
|
||||
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
rows.css('display','table-row'); // using show() causes jump in firefox
|
||||
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
}
|
||||
/* @license-end */
|
After Width: | Height: | Size: 616 B |
After Width: | Height: | Size: 597 B |
|
@ -0,0 +1,755 @@
|
|||
<!-- HTML header for doxygen 1.8.13-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Serial Flash (serial-flash)</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Serial Flash (serial-flash)</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('group__group__board__libs.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> |
|
||||
<a href="#typedef-members">Typedefs</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">Serial Flash</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
|
||||
<p >In addition to the APIs for reading and writting to memory at runtime, this library also provides support for informing programming tools about the external memory so it can be be written at the same time as internal flash. </p>
|
||||
<p >This support can be enabled by defining CY_ENABLE_XIP_PROGRAM while building the application. With this define in place, code will be generated in the .cy_sflash_user_data & .cy_toc_part2 sections. These sections must be provided by the linker script for the application. One the application has been built, these locations can be read by programming tools (eg: Cypress Programmer, OpenOCD, pyOCD) to know that there is a memory device attached and how to program it. </p><dl class="section note"><dt>Note</dt><dd>This support is not compatible with the PSoC™ 64 series of devices.</dd></dl>
|
||||
<h1><a class="anchor" id="section_resource_usage"></a>
|
||||
DMA Resource Usage</h1>
|
||||
<p >This library uses fixed DMA (Datawire or DW) resources and supports DMA only for the following devices. DMA is not supported for other devices and the functions <a class="el" href="group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82">cy_serial_flash_qspi_read_async()</a> and <a class="el" href="group__group__board__libs.html#ga49c497643b74f2e9071e27266836f45d">cy_serial_flash_qspi_abort_read()</a> will return <a class="el" href="group__group__board__libs.html#gabe7c8c3af5cdc0f9640b70402f543dd7">CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED</a> error and <a class="el" href="group__group__board__libs.html#ga181056affe774bccde023137e1e01f3a">cy_serial_flash_qspi_set_dma_interrupt_priority()</a> will simply return doing nothing.</p><ul>
|
||||
<li>CY8C6xx4, CY8C6xx5, CY8C6xx8, CY8C6xxA, CYB06xx5, CYB06xxA, CYS06xxA: <b>DW1, Channel 23</b></li>
|
||||
<li>CY8C6xx6, CY8C6xx7, CYB06xx7: <b>DW1, Channel 15</b> </li>
|
||||
</ul>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:gabe7c8c3af5cdc0f9640b70402f543dd7"><td class="memItemLeft" align="right" valign="top"><a id="gabe7c8c3af5cdc0f9640b70402f543dd7" name="gabe7c8c3af5cdc0f9640b70402f543dd7"></a>
|
||||
#define </td><td class="memItemRight" valign="bottom"><b>CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED</b>    (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 1))</td></tr>
|
||||
<tr class="memdesc:gabe7c8c3af5cdc0f9640b70402f543dd7"><td class="mdescLeft"> </td><td class="mdescRight">The function or operation is not supported on the target or the memory. <br /></td></tr>
|
||||
<tr class="separator:gabe7c8c3af5cdc0f9640b70402f543dd7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga21e3c8199504eb76df66c793488e01e8"><td class="memItemLeft" align="right" valign="top"><a id="ga21e3c8199504eb76df66c793488e01e8" name="ga21e3c8199504eb76df66c793488e01e8"></a>
|
||||
#define </td><td class="memItemRight" valign="bottom"><b>CY_RSLT_SERIAL_FLASH_ERR_BAD_PARAM</b>    (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 2))</td></tr>
|
||||
<tr class="memdesc:ga21e3c8199504eb76df66c793488e01e8"><td class="mdescLeft"> </td><td class="mdescRight">Parameters passed to a function are invalid. <br /></td></tr>
|
||||
<tr class="separator:ga21e3c8199504eb76df66c793488e01e8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga41875c99fa454d69ec187e772234ce44"><td class="memItemLeft" align="right" valign="top"><a id="ga41875c99fa454d69ec187e772234ce44" name="ga41875c99fa454d69ec187e772234ce44"></a>
|
||||
#define </td><td class="memItemRight" valign="bottom"><b>CY_RSLT_SERIAL_FLASH_ERR_READ_BUSY</b>    (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 3))</td></tr>
|
||||
<tr class="memdesc:ga41875c99fa454d69ec187e772234ce44"><td class="mdescLeft"> </td><td class="mdescRight">A previously initiated read operation is not yet complete. <br /></td></tr>
|
||||
<tr class="separator:ga41875c99fa454d69ec187e772234ce44"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga63374cfb508c830f53f25682c183b610"><td class="memItemLeft" align="right" valign="top"><a id="ga63374cfb508c830f53f25682c183b610" name="ga63374cfb508c830f53f25682c183b610"></a>
|
||||
#define </td><td class="memItemRight" valign="bottom"><b>CY_RSLT_SERIAL_FLASH_ERR_DMA</b>    (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 4))</td></tr>
|
||||
<tr class="memdesc:ga63374cfb508c830f53f25682c183b610"><td class="mdescLeft"> </td><td class="mdescRight">A DMA error occurred during read transfer. <br /></td></tr>
|
||||
<tr class="separator:ga63374cfb508c830f53f25682c183b610"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga959a08da14d528096cf8ebbfb48c5da4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga959a08da14d528096cf8ebbfb48c5da4">CY_RSLT_SERIAL_FLASH_ERR_QSPI_BUSY</a>    (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 5))</td></tr>
|
||||
<tr class="memdesc:ga959a08da14d528096cf8ebbfb48c5da4"><td class="mdescLeft"> </td><td class="mdescRight">Read abort failed. <a href="group__group__board__libs.html#ga959a08da14d528096cf8ebbfb48c5da4">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga959a08da14d528096cf8ebbfb48c5da4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga93bd4d9c9082ff732c56c1a6657abc32"><td class="memItemLeft" align="right" valign="top"><a id="ga93bd4d9c9082ff732c56c1a6657abc32" name="ga93bd4d9c9082ff732c56c1a6657abc32"></a>
|
||||
#define </td><td class="memItemRight" valign="bottom"><b>CY_SERIAL_FLASH_QSPI_THREAD_SAFE</b></td></tr>
|
||||
<tr class="memdesc:ga93bd4d9c9082ff732c56c1a6657abc32"><td class="mdescLeft"> </td><td class="mdescRight">Enables thread-safety for use with multi-threaded RTOS environment. <br /></td></tr>
|
||||
<tr class="separator:ga93bd4d9c9082ff732c56c1a6657abc32"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr class="memitem:gaa528d15ff15325aaec05e5a548856a19"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#gaa528d15ff15325aaec05e5a548856a19">cy_serial_flash_qspi_read_complete_callback_t</a>) (cy_rslt_t operation_status, void *callback_arg)</td></tr>
|
||||
<tr class="memdesc:gaa528d15ff15325aaec05e5a548856a19"><td class="mdescLeft"> </td><td class="mdescRight">Callback pointer to use with <a class="el" href="group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82">cy_serial_flash_qspi_read_async()</a>. <a href="group__group__board__libs.html#gaa528d15ff15325aaec05e5a548856a19">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa528d15ff15325aaec05e5a548856a19"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:gaa9c587684b8b629a0fde56e786400d82"><td class="memItemLeft" align="right" valign="top">cy_rslt_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#gaa9c587684b8b629a0fde56e786400d82">cy_serial_flash_qspi_init</a> (const cy_stc_smif_mem_config_t *mem_config, cyhal_gpio_t io0, cyhal_gpio_t io1, cyhal_gpio_t io2, cyhal_gpio_t io3, cyhal_gpio_t io4, cyhal_gpio_t io5, cyhal_gpio_t io6, cyhal_gpio_t io7, cyhal_gpio_t sclk, cyhal_gpio_t ssel, uint32_t hz)</td></tr>
|
||||
<tr class="memdesc:gaa9c587684b8b629a0fde56e786400d82"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the serial flash memory. <a href="group__group__board__libs.html#gaa9c587684b8b629a0fde56e786400d82">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa9c587684b8b629a0fde56e786400d82"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac4914a8bff25287d43c661d6cd68fbfd"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#gac4914a8bff25287d43c661d6cd68fbfd">cy_serial_flash_qspi_deinit</a> (void)</td></tr>
|
||||
<tr class="memdesc:gac4914a8bff25287d43c661d6cd68fbfd"><td class="mdescLeft"> </td><td class="mdescRight">De-initializes the serial flash memory. <a href="group__group__board__libs.html#gac4914a8bff25287d43c661d6cd68fbfd">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac4914a8bff25287d43c661d6cd68fbfd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7b9bff94b0c4ba30b11de9f64a0e4980"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga7b9bff94b0c4ba30b11de9f64a0e4980">cy_serial_flash_qspi_get_size</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga7b9bff94b0c4ba30b11de9f64a0e4980"><td class="mdescLeft"> </td><td class="mdescRight">Returns the size of the serial flash memory in bytes. <a href="group__group__board__libs.html#ga7b9bff94b0c4ba30b11de9f64a0e4980">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga7b9bff94b0c4ba30b11de9f64a0e4980"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gacaad29bc13d3a4cd243830980b21c274"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#gacaad29bc13d3a4cd243830980b21c274">cy_serial_flash_qspi_get_erase_size</a> (uint32_t addr)</td></tr>
|
||||
<tr class="memdesc:gacaad29bc13d3a4cd243830980b21c274"><td class="mdescLeft"> </td><td class="mdescRight">Returns the size of the erase sector to which the given address belongs. <a href="group__group__board__libs.html#gacaad29bc13d3a4cd243830980b21c274">More...</a><br /></td></tr>
|
||||
<tr class="separator:gacaad29bc13d3a4cd243830980b21c274"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3b4219e6b1182c0c75704581b6cacc37"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga3b4219e6b1182c0c75704581b6cacc37">cy_serial_flash_qspi_get_prog_size</a> (uint32_t addr)</td></tr>
|
||||
<tr class="memdesc:ga3b4219e6b1182c0c75704581b6cacc37"><td class="mdescLeft"> </td><td class="mdescRight">Returns the page size for programming of the sector to which the given address belongs. <a href="group__group__board__libs.html#ga3b4219e6b1182c0c75704581b6cacc37">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3b4219e6b1182c0c75704581b6cacc37"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1aec27b28a9ce3205ce16e12c4d576b0"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga1aec27b28a9ce3205ce16e12c4d576b0">cy_serial_flash_get_sector_start_address</a> (uint32_t addr)</td></tr>
|
||||
<tr class="memdesc:ga1aec27b28a9ce3205ce16e12c4d576b0"><td class="mdescLeft"> </td><td class="mdescRight">Utility function to calculate the starting address of an erase sector to which the given address belongs. <a href="group__group__board__libs.html#ga1aec27b28a9ce3205ce16e12c4d576b0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1aec27b28a9ce3205ce16e12c4d576b0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8b700333be27d3f22dbf2b7a273e7f1e"><td class="memItemLeft" align="right" valign="top">cy_rslt_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga8b700333be27d3f22dbf2b7a273e7f1e">cy_serial_flash_qspi_read</a> (uint32_t addr, size_t length, uint8_t *buf)</td></tr>
|
||||
<tr class="memdesc:ga8b700333be27d3f22dbf2b7a273e7f1e"><td class="mdescLeft"> </td><td class="mdescRight">Reads data from the serial flash memory. <a href="group__group__board__libs.html#ga8b700333be27d3f22dbf2b7a273e7f1e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga8b700333be27d3f22dbf2b7a273e7f1e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga869d6c8e2b93215608161fb889675b82"><td class="memItemLeft" align="right" valign="top">cy_rslt_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82">cy_serial_flash_qspi_read_async</a> (uint32_t addr, size_t length, uint8_t *buf, <a class="el" href="group__group__board__libs.html#gaa528d15ff15325aaec05e5a548856a19">cy_serial_flash_qspi_read_complete_callback_t</a> callback, void *callback_arg)</td></tr>
|
||||
<tr class="memdesc:ga869d6c8e2b93215608161fb889675b82"><td class="mdescLeft"> </td><td class="mdescRight">Reads data from the serial flash memory. <a href="group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga869d6c8e2b93215608161fb889675b82"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga49c497643b74f2e9071e27266836f45d"><td class="memItemLeft" align="right" valign="top">cy_rslt_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga49c497643b74f2e9071e27266836f45d">cy_serial_flash_qspi_abort_read</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga49c497643b74f2e9071e27266836f45d"><td class="mdescLeft"> </td><td class="mdescRight">Aborts an ongoing asynchronous read initiated by calling <a class="el" href="group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82">cy_serial_flash_qspi_read_async()</a>. <a href="group__group__board__libs.html#ga49c497643b74f2e9071e27266836f45d">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga49c497643b74f2e9071e27266836f45d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab7e5444e256507f0bc5d112d6741621a"><td class="memItemLeft" align="right" valign="top">cy_rslt_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#gab7e5444e256507f0bc5d112d6741621a">cy_serial_flash_qspi_write</a> (uint32_t addr, size_t length, const uint8_t *buf)</td></tr>
|
||||
<tr class="memdesc:gab7e5444e256507f0bc5d112d6741621a"><td class="mdescLeft"> </td><td class="mdescRight">Writes the data to the serial flash memory. <a href="group__group__board__libs.html#gab7e5444e256507f0bc5d112d6741621a">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab7e5444e256507f0bc5d112d6741621a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga41c8380588bc01b6a8320b23bc172649"><td class="memItemLeft" align="right" valign="top">cy_rslt_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga41c8380588bc01b6a8320b23bc172649">cy_serial_flash_qspi_erase</a> (uint32_t addr, size_t length)</td></tr>
|
||||
<tr class="memdesc:ga41c8380588bc01b6a8320b23bc172649"><td class="mdescLeft"> </td><td class="mdescRight">Erases the serial flash memory, uses chip erase command when addr = 0 and length = flash_size otherwise uses sector erase command. <a href="group__group__board__libs.html#ga41c8380588bc01b6a8320b23bc172649">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga41c8380588bc01b6a8320b23bc172649"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga56772d2543b7b7f2c17ed9ddb9db941e"><td class="memItemLeft" align="right" valign="top">cy_rslt_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga56772d2543b7b7f2c17ed9ddb9db941e">cy_serial_flash_qspi_enable_xip</a> (bool enable)</td></tr>
|
||||
<tr class="memdesc:ga56772d2543b7b7f2c17ed9ddb9db941e"><td class="mdescLeft"> </td><td class="mdescRight">Enables Execute-in-Place (memory mapped) mode on the MCU. <a href="group__group__board__libs.html#ga56772d2543b7b7f2c17ed9ddb9db941e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga56772d2543b7b7f2c17ed9ddb9db941e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga818e617f0abbff49f43ee1254d7bc35c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga818e617f0abbff49f43ee1254d7bc35c">cy_serial_flash_qspi_set_interrupt_priority</a> (uint8_t priority)</td></tr>
|
||||
<tr class="memdesc:ga818e617f0abbff49f43ee1254d7bc35c"><td class="mdescLeft"> </td><td class="mdescRight">Changes QSPI interrupt priority. <a href="group__group__board__libs.html#ga818e617f0abbff49f43ee1254d7bc35c">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga818e617f0abbff49f43ee1254d7bc35c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga181056affe774bccde023137e1e01f3a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__board__libs.html#ga181056affe774bccde023137e1e01f3a">cy_serial_flash_qspi_set_dma_interrupt_priority</a> (uint8_t priority)</td></tr>
|
||||
<tr class="memdesc:ga181056affe774bccde023137e1e01f3a"><td class="mdescLeft"> </td><td class="mdescRight">Changes the DMA interrupt priority. <a href="group__group__board__libs.html#ga181056affe774bccde023137e1e01f3a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga181056affe774bccde023137e1e01f3a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="ga959a08da14d528096cf8ebbfb48c5da4" name="ga959a08da14d528096cf8ebbfb48c5da4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga959a08da14d528096cf8ebbfb48c5da4">◆ </a></span>CY_RSLT_SERIAL_FLASH_ERR_QSPI_BUSY</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define CY_RSLT_SERIAL_FLASH_ERR_QSPI_BUSY    (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CY_RSLT_MODULE_BOARD_LIB_SERIAL_FLASH, 5))</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Read abort failed. </p>
|
||||
<p >QSPI block is busy. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Typedef Documentation</h2>
|
||||
<a id="gaa528d15ff15325aaec05e5a548856a19" name="gaa528d15ff15325aaec05e5a548856a19"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaa528d15ff15325aaec05e5a548856a19">◆ </a></span>cy_serial_flash_qspi_read_complete_callback_t</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">typedef void(* cy_serial_flash_qspi_read_complete_callback_t) (cy_rslt_t operation_status, void *callback_arg)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Callback pointer to use with <a class="el" href="group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82">cy_serial_flash_qspi_read_async()</a>. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">operation_status</td><td>Status of the read operation </td></tr>
|
||||
<tr><td class="paramname">callback_arg</td><td>Pointer to be passed back to the callback function </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="gaa9c587684b8b629a0fde56e786400d82" name="gaa9c587684b8b629a0fde56e786400d82"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaa9c587684b8b629a0fde56e786400d82">◆ </a></span>cy_serial_flash_qspi_init()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">cy_rslt_t cy_serial_flash_qspi_init </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const cy_stc_smif_mem_config_t * </td>
|
||||
<td class="paramname"><em>mem_config</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>io0</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>io1</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>io2</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>io3</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>io4</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>io5</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>io6</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>io7</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>sclk</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">cyhal_gpio_t </td>
|
||||
<td class="paramname"><em>ssel</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint32_t </td>
|
||||
<td class="paramname"><em>hz</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Initializes the serial flash memory. </p>
|
||||
<p >This function accepts up to 8 I/Os. Number of I/Os depend on the type of memory interface. Pass NC when an I/O is unused. Single SPI - (io0, io1) or (io2, io3) or (io4, io5) or (io6, io7) Dual SPI - (io0, io1) or (io2, io3) or (io4, io5) or (io6, io7) Quad SPI - (io0, io1, io2, io3) or (io4, io5, io6, io7) Octal SPI - All 8 I/Os are used. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">mem_config</td><td>Memory configuration to be used for initializing </td></tr>
|
||||
<tr><td class="paramname">io0</td><td>Data/IO pin 0 connected to the memory, Pass NC when unused. </td></tr>
|
||||
<tr><td class="paramname">io1</td><td>Data/IO pin 1 connected to the memory, Pass NC when unused. </td></tr>
|
||||
<tr><td class="paramname">io2</td><td>Data/IO pin 2 connected to the memory, Pass NC when unused. </td></tr>
|
||||
<tr><td class="paramname">io3</td><td>Data/IO pin 3 connected to the memory, Pass NC when unused. </td></tr>
|
||||
<tr><td class="paramname">io4</td><td>Data/IO pin 4 connected to the memory, Pass NC when unused. </td></tr>
|
||||
<tr><td class="paramname">io5</td><td>Data/IO pin 5 connected to the memory, Pass NC when unused. </td></tr>
|
||||
<tr><td class="paramname">io6</td><td>Data/IO pin 6 connected to the memory, Pass NC when unused. </td></tr>
|
||||
<tr><td class="paramname">io7</td><td>Data/IO pin 7 connected to the memory, Pass NC when unused. </td></tr>
|
||||
<tr><td class="paramname">sclk</td><td>Clock pin connected to the memory </td></tr>
|
||||
<tr><td class="paramname">ssel</td><td>Slave select pin connected to the memory </td></tr>
|
||||
<tr><td class="paramname">hz</td><td>Clock frequency to be used with the memory. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>CY_RSLT_SUCCESS if the initialization was successful, an error code otherwise. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac4914a8bff25287d43c661d6cd68fbfd" name="gac4914a8bff25287d43c661d6cd68fbfd"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac4914a8bff25287d43c661d6cd68fbfd">◆ </a></span>cy_serial_flash_qspi_deinit()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void cy_serial_flash_qspi_deinit </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>De-initializes the serial flash memory. </p>
|
||||
<p >Before calling this function, ensure that an ongoing asynchronous read operation is either completed or successfully aborted. Async read is started by calling <a class="el" href="group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82">cy_serial_flash_qspi_read_async()</a> and aborted by calling <a class="el" href="group__group__board__libs.html#ga49c497643b74f2e9071e27266836f45d">cy_serial_flash_qspi_abort_read()</a>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga7b9bff94b0c4ba30b11de9f64a0e4980" name="ga7b9bff94b0c4ba30b11de9f64a0e4980"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga7b9bff94b0c4ba30b11de9f64a0e4980">◆ </a></span>cy_serial_flash_qspi_get_size()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">size_t cy_serial_flash_qspi_get_size </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the size of the serial flash memory in bytes. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Memory size in bytes. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gacaad29bc13d3a4cd243830980b21c274" name="gacaad29bc13d3a4cd243830980b21c274"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gacaad29bc13d3a4cd243830980b21c274">◆ </a></span>cy_serial_flash_qspi_get_erase_size()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">size_t cy_serial_flash_qspi_get_erase_size </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint32_t </td>
|
||||
<td class="paramname"><em>addr</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the size of the erase sector to which the given address belongs. </p>
|
||||
<p >Address is used only for a memory with hybrid sector size. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">addr</td><td>Address that belongs to the sector for which size is returned. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Erase sector size in bytes. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga3b4219e6b1182c0c75704581b6cacc37" name="ga3b4219e6b1182c0c75704581b6cacc37"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3b4219e6b1182c0c75704581b6cacc37">◆ </a></span>cy_serial_flash_qspi_get_prog_size()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">size_t cy_serial_flash_qspi_get_prog_size </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint32_t </td>
|
||||
<td class="paramname"><em>addr</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the page size for programming of the sector to which the given address belongs. </p>
|
||||
<p >Address is used only for a memory with hybrid sector size. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">addr</td><td>Address that belongs to the sector for which size is returned. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Page size in bytes. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1aec27b28a9ce3205ce16e12c4d576b0" name="ga1aec27b28a9ce3205ce16e12c4d576b0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1aec27b28a9ce3205ce16e12c4d576b0">◆ </a></span>cy_serial_flash_get_sector_start_address()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">__STATIC_INLINE uint32_t cy_serial_flash_get_sector_start_address </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint32_t </td>
|
||||
<td class="paramname"><em>addr</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Utility function to calculate the starting address of an erase sector to which the given address belongs. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">addr</td><td>Address in the sector for which the starting address is returned. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Starting address of the sector </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga8b700333be27d3f22dbf2b7a273e7f1e" name="ga8b700333be27d3f22dbf2b7a273e7f1e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8b700333be27d3f22dbf2b7a273e7f1e">◆ </a></span>cy_serial_flash_qspi_read()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">cy_rslt_t cy_serial_flash_qspi_read </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint32_t </td>
|
||||
<td class="paramname"><em>addr</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">size_t </td>
|
||||
<td class="paramname"><em>length</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t * </td>
|
||||
<td class="paramname"><em>buf</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Reads data from the serial flash memory. </p>
|
||||
<p >This is a blocking function. Returns error if (addr + length) exceeds the flash size. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">addr</td><td>Starting address to read from </td></tr>
|
||||
<tr><td class="paramname">length</td><td>Number of data bytes to read </td></tr>
|
||||
<tr><td class="paramname">buf</td><td>Pointer to the buffer to store the data read from the memory </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>CY_RSLT_SUCCESS if the read was successful, an error code otherwise. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga869d6c8e2b93215608161fb889675b82" name="ga869d6c8e2b93215608161fb889675b82"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga869d6c8e2b93215608161fb889675b82">◆ </a></span>cy_serial_flash_qspi_read_async()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">cy_rslt_t cy_serial_flash_qspi_read_async </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint32_t </td>
|
||||
<td class="paramname"><em>addr</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">size_t </td>
|
||||
<td class="paramname"><em>length</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint8_t * </td>
|
||||
<td class="paramname"><em>buf</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="group__group__board__libs.html#gaa528d15ff15325aaec05e5a548856a19">cy_serial_flash_qspi_read_complete_callback_t</a> </td>
|
||||
<td class="paramname"><em>callback</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">void * </td>
|
||||
<td class="paramname"><em>callback_arg</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Reads data from the serial flash memory. </p>
|
||||
<p >This is a non-blocking function. Returns error if (addr + length) exceeds the flash size. Uses fixed DMA (DW) instance and channel for transferring the data from QSPI RX FIFO to the user-provided buffer. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">addr</td><td>Starting address to read from </td></tr>
|
||||
<tr><td class="paramname">length</td><td>Number of data bytes to read </td></tr>
|
||||
<tr><td class="paramname">buf</td><td>Pointer to the buffer to store the data read from the memory </td></tr>
|
||||
<tr><td class="paramname">callback</td><td>Pointer to the callback function to be called after the read operation is complete. Callback is invoked from the DMA ISR. </td></tr>
|
||||
<tr><td class="paramname">callback_arg</td><td>Pointer to the argument to be passed to the callback function </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>CY_RSLT_SUCCESS if the read was successful, an error code otherwise. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga49c497643b74f2e9071e27266836f45d" name="ga49c497643b74f2e9071e27266836f45d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga49c497643b74f2e9071e27266836f45d">◆ </a></span>cy_serial_flash_qspi_abort_read()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">cy_rslt_t cy_serial_flash_qspi_abort_read </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Aborts an ongoing asynchronous read initiated by calling <a class="el" href="group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82">cy_serial_flash_qspi_read_async()</a>. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>CY_RSLT_SUCCESS if the abort was successful, an error code if the QSPI block is still busy after a timeout. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab7e5444e256507f0bc5d112d6741621a" name="gab7e5444e256507f0bc5d112d6741621a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab7e5444e256507f0bc5d112d6741621a">◆ </a></span>cy_serial_flash_qspi_write()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">cy_rslt_t cy_serial_flash_qspi_write </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint32_t </td>
|
||||
<td class="paramname"><em>addr</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">size_t </td>
|
||||
<td class="paramname"><em>length</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const uint8_t * </td>
|
||||
<td class="paramname"><em>buf</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Writes the data to the serial flash memory. </p>
|
||||
<p >The program area must have been erased prior to calling this API using <a class="el" href="group__group__board__libs.html#ga41c8380588bc01b6a8320b23bc172649">cy_serial_flash_qspi_erase()</a> This is a blocking function. Returns error if (addr + length) exceeds the flash size. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">addr</td><td>Starting address to write to </td></tr>
|
||||
<tr><td class="paramname">length</td><td>Number of bytes to write </td></tr>
|
||||
<tr><td class="paramname">buf</td><td>Pointer to the buffer storing the data to be written </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>CY_RSLT_SUCCESS if the write was successful, an error code otherwise. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga41c8380588bc01b6a8320b23bc172649" name="ga41c8380588bc01b6a8320b23bc172649"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga41c8380588bc01b6a8320b23bc172649">◆ </a></span>cy_serial_flash_qspi_erase()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">cy_rslt_t cy_serial_flash_qspi_erase </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint32_t </td>
|
||||
<td class="paramname"><em>addr</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">size_t </td>
|
||||
<td class="paramname"><em>length</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Erases the serial flash memory, uses chip erase command when addr = 0 and length = flash_size otherwise uses sector erase command. </p>
|
||||
<p >This is a blocking function. Returns error if addr or (addr + length) is not aligned to the sector size or if (addr + length) exceeds the flash size. For memories with hybrid sectors, returns error if the end address (=addr + length) is not aligned to the size of the sector in which the end address is located. Call <a class="el" href="group__group__board__libs.html#ga7b9bff94b0c4ba30b11de9f64a0e4980">cy_serial_flash_qspi_get_size()</a> to get the flash size and call <a class="el" href="group__group__board__libs.html#gacaad29bc13d3a4cd243830980b21c274">cy_serial_flash_qspi_get_erase_size()</a> to get the size of an erase sector.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">addr</td><td>Starting address to begin erasing </td></tr>
|
||||
<tr><td class="paramname">length</td><td>Number of bytes to erase </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>CY_RSLT_SUCCESS if the erase was successful, an error code otherwise. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga56772d2543b7b7f2c17ed9ddb9db941e" name="ga56772d2543b7b7f2c17ed9ddb9db941e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga56772d2543b7b7f2c17ed9ddb9db941e">◆ </a></span>cy_serial_flash_qspi_enable_xip()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">cy_rslt_t cy_serial_flash_qspi_enable_xip </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">bool </td>
|
||||
<td class="paramname"><em>enable</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Enables Execute-in-Place (memory mapped) mode on the MCU. </p>
|
||||
<p >This function does not send any command to the serial flash. This may not be supported on all the targets in which case CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED is returned. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">enable</td><td>true: XIP mode is set, false: normal mode is set </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>CY_RSLT_SUCCESS if the operation was successful. CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED if the target does not support XIP. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga818e617f0abbff49f43ee1254d7bc35c" name="ga818e617f0abbff49f43ee1254d7bc35c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga818e617f0abbff49f43ee1254d7bc35c">◆ </a></span>cy_serial_flash_qspi_set_interrupt_priority()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void cy_serial_flash_qspi_set_interrupt_priority </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>priority</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Changes QSPI interrupt priority. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">priority</td><td>interrupt priority to be set </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga181056affe774bccde023137e1e01f3a" name="ga181056affe774bccde023137e1e01f3a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga181056affe774bccde023137e1e01f3a">◆ </a></span>cy_serial_flash_qspi_set_dma_interrupt_priority()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void cy_serial_flash_qspi_set_dma_interrupt_priority </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint8_t </td>
|
||||
<td class="paramname"><em>priority</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Changes the DMA interrupt priority. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">priority</td><td>interrupt priority to be set </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="footer">
|
||||
Generated for <b>Serial Flash (serial-flash)</b> by <b>Cypress Semiconductor Corporation</b>.
|
||||
All rights reserved.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,144 @@
|
|||
<!-- HTML header for doxygen 1.8.13-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Serial Flash (serial-flash)</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Serial Flash (serial-flash)</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Serial Flash </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p ><a class="anchor" id="md_source_peripherals_serial_flash_README_doxygen"></a> </p>
|
||||
<h2><a class="anchor" id="autotoc_md1"></a>
|
||||
Overview</h2>
|
||||
<p >Provides functions for interacting with an external flash connected through its Single SPI/Dual SPI/Quad SPI/Octal SPI interface. The read operation can be performed in either blocking or non-blocking manner by calling the corresponding function while the write and erase operations are implemented as blocking functions. This library accepts the configuration generated using the QSPI Configurator tool but supports only one memory slot. Note that PSoC™ 6 supports up to 4 memory slots on the same QSPI block.</p>
|
||||
<h2><a class="anchor" id="autotoc_md2"></a>
|
||||
Features</h2>
|
||||
<ul>
|
||||
<li>Supports asynchronous (non-blocking) read operation</li>
|
||||
<li>Implements thread-safety for use with multi-threaded RTOS environment using the <a href="https://github.com/infineon/abstraction-rtos">abstraction-rtos</a> library</li>
|
||||
<li>Accepts the configuration generated by the QSPI Configurator tool</li>
|
||||
<li>Supports Execute-in-Place (XIP) mode of operation</li>
|
||||
<li>Provides information about the external memory to the programming tool for it to be able to program the memory, for example, when user wants to place the code into the external memory for XIP operation.</li>
|
||||
<li>Allows for programming external memory if CY_ENABLE_XIP_PROGRAM is defined when building the application. Note: This is not compatible with the PSoC™ 64 series of devices.</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" id="autotoc_md3"></a>
|
||||
Quick Start</h2>
|
||||
<ol type="1">
|
||||
<li>Add #include "cy_serial_flash_qspi.h"</li>
|
||||
<li>Add <code>DEFINES=CY_SERIAL_FLASH_QSPI_THREAD_SAFE</code> in the Makefile to enable thread-safety when used in a multi-threaded RTOS environment</li>
|
||||
<li>See the <a href="https://github.com/infineon/mtb-example-psoc6-qspi-readwrite">PSoC™ 6 MCU: QSPI Flash Read and Write</a> code example to learn using this library</li>
|
||||
</ol>
|
||||
<p ><b>NOTE:</b> If you delete the contents of the GeneratedSource directory inside the BSP, you must re-generate the memory configuration files <em>cycfg_qspi_memslot.c/.h</em>. To do this from inside the ModusToolbox™ IDE, open the QSPI Configurator tool from the Quick Panel and press <b>Ctrl+S</b> or click <b>File > Save</b>. If you open the tool outside the IDE, you need to first open the <em>design.cyqspi</em> file in the tool. To do this, click <b>File > Import</b> and then locate the file inside the BSP under <em>COMPONENT_BSP_DESIGN_MODUS</em> directory.</p>
|
||||
<p ><b>NOTE:</b> For devices with no internal flash (eg:CAT1B device CYW20829), user needs to disable 'config data in flash' option in QSPI Configurator.</p>
|
||||
<h2><a class="anchor" id="autotoc_md4"></a>
|
||||
Dependencies</h2>
|
||||
<ul>
|
||||
<li><a href="https://github.com/infineon/abstraction-rtos">abstraction-rtos</a> library if <code>DEFINES=CY_SERIAL_FLASH_QSPI_THREAD_SAFE</code> is added in the Makefile</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" id="autotoc_md5"></a>
|
||||
More information</h2>
|
||||
<ul>
|
||||
<li><a href="https://infineon.github.io/serial-flash/html/index.html">API Reference Guide</a></li>
|
||||
<li><a href="http://www.cypress.com">Cypress Semiconductor, an Infineon Technologies Company</a></li>
|
||||
<li><a href="https://github.com/infineon">Infineon GitHub</a></li>
|
||||
<li><a href="https://www.cypress.com/products/modustoolbox-software-environment">ModusToolbox™</a></li>
|
||||
<li><a href="https://github.com/infineon/Code-Examples-for-ModusToolbox-Software">PSoC™ 6 Code Examples using ModusToolbox™ IDE</a></li>
|
||||
<li><a href="https://github.com/Infineon/modustoolbox-software">ModusToolbox™ Software</a></li>
|
||||
<li><a href="https://community.cypress.com/docs/DOC-14644">PSoC™ 6 Resources - KBA223067</a></li>
|
||||
</ul>
|
||||
<hr />
|
||||
<p> © Cypress Semiconductor Corporation (an Infineon company) or an affiliate of Cypress Semiconductor Corporation, 2019-2021. </p>
|
||||
</div></div><!-- PageDoc -->
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="footer">
|
||||
Generated for <b>Serial Flash (serial-flash)</b> by <b>Cypress Semiconductor Corporation</b>.
|
||||
All rights reserved.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
35
bsp/cypress/libraries/IFX_PSOC6_HAL/mtb_shared/serial-flash/docs/html/jquery.js
vendored
Normal file
After Width: | Height: | Size: 19 KiB |
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
|
||||
function makeTree(data,relPath) {
|
||||
var result='';
|
||||
if ('children' in data) {
|
||||
result+='<ul>';
|
||||
for (var i in data.children) {
|
||||
result+='<li><a href="'+relPath+data.children[i].url+'">'+
|
||||
data.children[i].text+'</a>'+
|
||||
makeTree(data.children[i],relPath)+'</li>';
|
||||
}
|
||||
result+='</ul>';
|
||||
}
|
||||
return result;
|
||||
}
|
||||
var searchBox;
|
||||
if (searchEnabled) {
|
||||
if (serverSide) {
|
||||
searchBox='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<div class="left">'+
|
||||
'<form id="FSearchBox" action="'+relPath+searchPage+
|
||||
'" method="get"><img id="MSearchSelect" src="'+
|
||||
relPath+'search/mag.svg" alt=""/>'+
|
||||
'<input type="text" id="MSearchField" name="query" value="'+search+
|
||||
'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)"'+
|
||||
' onblur="searchBox.OnSearchFieldFocus(false)">'+
|
||||
'</form>'+
|
||||
'</div>'+
|
||||
'<div class="right"></div>'+
|
||||
'</div>';
|
||||
} else {
|
||||
searchBox='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<span class="left">'+
|
||||
'<img id="MSearchSelect" src="'+relPath+
|
||||
'search/mag_sel.svg" onmouseover="return searchBox.OnSearchSelectShow()"'+
|
||||
' onmouseout="return searchBox.OnSearchSelectHide()" alt=""/>'+
|
||||
'<input type="text" id="MSearchField" value="'+search+
|
||||
'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" '+
|
||||
'onblur="searchBox.OnSearchFieldFocus(false)" '+
|
||||
'onkeyup="searchBox.OnSearchFieldChange(event)"/>'+
|
||||
'</span>'+
|
||||
'<span class="right"><a id="MSearchClose" '+
|
||||
'href="javascript:searchBox.CloseResultsWindow()">'+
|
||||
'<img id="MSearchCloseImg" border="0" src="'+relPath+
|
||||
'search/close.svg" alt=""/></a>'
|
||||
'</span>'
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$('#main-nav').before('<div class="sm sm-dox"><input id="main-menu-state" type="checkbox"/>'+
|
||||
'<label class="main-menu-btn" for="main-menu-state">'+
|
||||
'<span class="main-menu-btn-icon"></span> '+
|
||||
'Toggle main menu visibility</label>'+
|
||||
'<span id="searchBoxPos1" style="position:absolute;right:8px;top:8px;height:36px;"></span>'+
|
||||
'</div>');
|
||||
$('#main-nav').append(makeTree(menudata,relPath));
|
||||
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
|
||||
if (searchBox) {
|
||||
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
|
||||
}
|
||||
var $mainMenuState = $('#main-menu-state');
|
||||
var prevWidth = 0;
|
||||
if ($mainMenuState.length) {
|
||||
function initResizableIfExists() {
|
||||
if (typeof initResizable==='function') initResizable();
|
||||
}
|
||||
// animate mobile menu
|
||||
$mainMenuState.change(function(e) {
|
||||
var $menu = $('#main-menu');
|
||||
var options = { duration: 250, step: initResizableIfExists };
|
||||
if (this.checked) {
|
||||
options['complete'] = function() { $menu.css('display', 'block') };
|
||||
$menu.hide().slideDown(options);
|
||||
} else {
|
||||
options['complete'] = function() { $menu.css('display', 'none') };
|
||||
$menu.show().slideUp(options);
|
||||
}
|
||||
});
|
||||
// set default menu visibility
|
||||
function resetState() {
|
||||
var $menu = $('#main-menu');
|
||||
var $mainMenuState = $('#main-menu-state');
|
||||
var newWidth = $(window).outerWidth();
|
||||
if (newWidth!=prevWidth) {
|
||||
if ($(window).outerWidth()<768) {
|
||||
$mainMenuState.prop('checked',false); $menu.hide();
|
||||
$('#searchBoxPos1').html(searchBox);
|
||||
$('#searchBoxPos2').hide();
|
||||
} else {
|
||||
$menu.show();
|
||||
$('#searchBoxPos1').empty();
|
||||
$('#searchBoxPos2').html(searchBox);
|
||||
$('#searchBoxPos2').show();
|
||||
}
|
||||
prevWidth = newWidth;
|
||||
}
|
||||
}
|
||||
$(window).ready(function() { resetState(); initResizableIfExists(); });
|
||||
$(window).resize(resetState);
|
||||
}
|
||||
$('#main-menu').smartmenus();
|
||||
}
|
||||
/* @license-end */
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var menudata={children:[
|
||||
{text:"Home",url:"index.html"},
|
||||
{text:"API Reference",url:"group__group__board__libs.html"}]}
|
After Width: | Height: | Size: 153 B |
After Width: | Height: | Size: 95 B |
After Width: | Height: | Size: 98 B |
|
@ -0,0 +1,147 @@
|
|||
#nav-tree .children_ul {
|
||||
margin:0;
|
||||
padding:4px;
|
||||
}
|
||||
|
||||
#nav-tree ul {
|
||||
list-style:none outside none;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree li {
|
||||
white-space:nowrap;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree .plus {
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
#nav-tree .selected {
|
||||
background-image: url('tab_a.png');
|
||||
background-repeat:repeat-x;
|
||||
color: #fff;
|
||||
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
}
|
||||
|
||||
#nav-tree img {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
border:0px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#nav-tree a {
|
||||
text-decoration:none;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
#nav-tree .label {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
|
||||
}
|
||||
|
||||
#nav-tree .label a {
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
#nav-tree .selected a {
|
||||
text-decoration:none;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
#nav-tree .children_ul {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree .item {
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
#nav-tree {
|
||||
padding: 0px 0px;
|
||||
background-color: #FAFAFF;
|
||||
font-size:14px;
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
#doc-content {
|
||||
overflow:auto;
|
||||
display:block;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
-webkit-overflow-scrolling : touch; /* iOS 5+ */
|
||||
}
|
||||
|
||||
#side-nav {
|
||||
padding:0 6px 0 0;
|
||||
margin: 0px;
|
||||
display:block;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
width: 250px;
|
||||
overflow : hidden;
|
||||
}
|
||||
|
||||
.ui-resizable .ui-resizable-handle {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.ui-resizable-e {
|
||||
background-image:url("splitbar.png");
|
||||
background-size:100%;
|
||||
background-repeat:repeat-y;
|
||||
background-attachment: scroll;
|
||||
cursor:ew-resize;
|
||||
height:100%;
|
||||
right:0;
|
||||
top:0;
|
||||
width:6px;
|
||||
}
|
||||
|
||||
.ui-resizable-handle {
|
||||
display:none;
|
||||
font-size:0.1px;
|
||||
position:absolute;
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
#nav-tree-contents {
|
||||
margin: 6px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#nav-tree {
|
||||
background-image:url('nav_h.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: #F9FAFC;
|
||||
-webkit-overflow-scrolling : touch; /* iOS 5+ */
|
||||
}
|
||||
|
||||
#nav-sync {
|
||||
position:absolute;
|
||||
top:5px;
|
||||
right:24px;
|
||||
z-index:0;
|
||||
}
|
||||
|
||||
#nav-sync img {
|
||||
opacity:0.3;
|
||||
}
|
||||
|
||||
#nav-sync img:hover {
|
||||
opacity:0.9;
|
||||
}
|
||||
|
||||
@media print
|
||||
{
|
||||
#nav-tree { display: none; }
|
||||
div.ui-resizable-handle { display: none; position: relative; }
|
||||
}
|
||||
|
|
@ -0,0 +1,549 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var navTreeSubIndices = new Array();
|
||||
var arrowDown = '▼';
|
||||
var arrowRight = '►';
|
||||
|
||||
function getData(varName)
|
||||
{
|
||||
var i = varName.lastIndexOf('/');
|
||||
var n = i>=0 ? varName.substring(i+1) : varName;
|
||||
return eval(n.replace(/\-/g,'_'));
|
||||
}
|
||||
|
||||
function stripPath(uri)
|
||||
{
|
||||
return uri.substring(uri.lastIndexOf('/')+1);
|
||||
}
|
||||
|
||||
function stripPath2(uri)
|
||||
{
|
||||
var i = uri.lastIndexOf('/');
|
||||
var s = uri.substring(i+1);
|
||||
var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/);
|
||||
return m ? uri.substring(i-6) : s;
|
||||
}
|
||||
|
||||
function hashValue()
|
||||
{
|
||||
return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,'');
|
||||
}
|
||||
|
||||
function hashUrl()
|
||||
{
|
||||
return '#'+hashValue();
|
||||
}
|
||||
|
||||
function pathName()
|
||||
{
|
||||
return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, '');
|
||||
}
|
||||
|
||||
function localStorageSupported()
|
||||
{
|
||||
try {
|
||||
return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem;
|
||||
}
|
||||
catch(e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function storeLink(link)
|
||||
{
|
||||
if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) {
|
||||
window.localStorage.setItem('navpath',link);
|
||||
}
|
||||
}
|
||||
|
||||
function deleteLink()
|
||||
{
|
||||
if (localStorageSupported()) {
|
||||
window.localStorage.setItem('navpath','');
|
||||
}
|
||||
}
|
||||
|
||||
function cachedLink()
|
||||
{
|
||||
if (localStorageSupported()) {
|
||||
return window.localStorage.getItem('navpath');
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function getScript(scriptName,func,show)
|
||||
{
|
||||
var head = document.getElementsByTagName("head")[0];
|
||||
var script = document.createElement('script');
|
||||
script.id = scriptName;
|
||||
script.type = 'text/javascript';
|
||||
script.onload = func;
|
||||
script.src = scriptName+'.js';
|
||||
head.appendChild(script);
|
||||
}
|
||||
|
||||
function createIndent(o,domNode,node,level)
|
||||
{
|
||||
var level=-1;
|
||||
var n = node;
|
||||
while (n.parentNode) { level++; n=n.parentNode; }
|
||||
if (node.childrenData) {
|
||||
var imgNode = document.createElement("span");
|
||||
imgNode.className = 'arrow';
|
||||
imgNode.style.paddingLeft=(16*level).toString()+'px';
|
||||
imgNode.innerHTML=arrowRight;
|
||||
node.plus_img = imgNode;
|
||||
node.expandToggle = document.createElement("a");
|
||||
node.expandToggle.href = "javascript:void(0)";
|
||||
node.expandToggle.onclick = function() {
|
||||
if (node.expanded) {
|
||||
$(node.getChildrenUL()).slideUp("fast");
|
||||
node.plus_img.innerHTML=arrowRight;
|
||||
node.expanded = false;
|
||||
} else {
|
||||
expandNode(o, node, false, false);
|
||||
}
|
||||
}
|
||||
node.expandToggle.appendChild(imgNode);
|
||||
domNode.appendChild(node.expandToggle);
|
||||
} else {
|
||||
var span = document.createElement("span");
|
||||
span.className = 'arrow';
|
||||
span.style.width = 16*(level+1)+'px';
|
||||
span.innerHTML = ' ';
|
||||
domNode.appendChild(span);
|
||||
}
|
||||
}
|
||||
|
||||
var animationInProgress = false;
|
||||
|
||||
function gotoAnchor(anchor,aname,updateLocation)
|
||||
{
|
||||
var pos, docContent = $('#doc-content');
|
||||
var ancParent = $(anchor.parent());
|
||||
if (ancParent.hasClass('memItemLeft') ||
|
||||
ancParent.hasClass('memtitle') ||
|
||||
ancParent.hasClass('fieldname') ||
|
||||
ancParent.hasClass('fieldtype') ||
|
||||
ancParent.is(':header'))
|
||||
{
|
||||
pos = ancParent.position().top;
|
||||
} else if (anchor.position()) {
|
||||
pos = anchor.position().top;
|
||||
}
|
||||
if (pos) {
|
||||
var dist = Math.abs(Math.min(
|
||||
pos-docContent.offset().top,
|
||||
docContent[0].scrollHeight-
|
||||
docContent.height()-docContent.scrollTop()));
|
||||
animationInProgress=true;
|
||||
docContent.animate({
|
||||
scrollTop: pos + docContent.scrollTop() - docContent.offset().top
|
||||
},Math.max(50,Math.min(500,dist)),function(){
|
||||
if (updateLocation) window.location.href=aname;
|
||||
animationInProgress=false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function newNode(o, po, text, link, childrenData, lastNode)
|
||||
{
|
||||
var node = new Object();
|
||||
node.children = Array();
|
||||
node.childrenData = childrenData;
|
||||
node.depth = po.depth + 1;
|
||||
node.relpath = po.relpath;
|
||||
node.isLast = lastNode;
|
||||
|
||||
node.li = document.createElement("li");
|
||||
po.getChildrenUL().appendChild(node.li);
|
||||
node.parentNode = po;
|
||||
|
||||
node.itemDiv = document.createElement("div");
|
||||
node.itemDiv.className = "item";
|
||||
|
||||
node.labelSpan = document.createElement("span");
|
||||
node.labelSpan.className = "label";
|
||||
|
||||
createIndent(o,node.itemDiv,node,0);
|
||||
node.itemDiv.appendChild(node.labelSpan);
|
||||
node.li.appendChild(node.itemDiv);
|
||||
|
||||
var a = document.createElement("a");
|
||||
node.labelSpan.appendChild(a);
|
||||
node.label = document.createTextNode(text);
|
||||
node.expanded = false;
|
||||
a.appendChild(node.label);
|
||||
if (link) {
|
||||
var url;
|
||||
if (link.substring(0,1)=='^') {
|
||||
url = link.substring(1);
|
||||
link = url;
|
||||
} else {
|
||||
url = node.relpath+link;
|
||||
}
|
||||
a.className = stripPath(link.replace('#',':'));
|
||||
if (link.indexOf('#')!=-1) {
|
||||
var aname = '#'+link.split('#')[1];
|
||||
var srcPage = stripPath(pathName());
|
||||
var targetPage = stripPath(link.split('#')[0]);
|
||||
a.href = srcPage!=targetPage ? url : "javascript:void(0)";
|
||||
a.onclick = function(){
|
||||
storeLink(link);
|
||||
if (!$(a).parent().parent().hasClass('selected'))
|
||||
{
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
$(a).parent().parent().addClass('selected');
|
||||
$(a).parent().parent().attr('id','selected');
|
||||
}
|
||||
var anchor = $(aname);
|
||||
gotoAnchor(anchor,aname,true);
|
||||
};
|
||||
} else {
|
||||
a.href = url;
|
||||
a.onclick = function() { storeLink(link); }
|
||||
}
|
||||
} else {
|
||||
if (childrenData != null)
|
||||
{
|
||||
a.className = "nolink";
|
||||
a.href = "javascript:void(0)";
|
||||
a.onclick = node.expandToggle.onclick;
|
||||
}
|
||||
}
|
||||
|
||||
node.childrenUL = null;
|
||||
node.getChildrenUL = function() {
|
||||
if (!node.childrenUL) {
|
||||
node.childrenUL = document.createElement("ul");
|
||||
node.childrenUL.className = "children_ul";
|
||||
node.childrenUL.style.display = "none";
|
||||
node.li.appendChild(node.childrenUL);
|
||||
}
|
||||
return node.childrenUL;
|
||||
};
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function showRoot()
|
||||
{
|
||||
var headerHeight = $("#top").height();
|
||||
var footerHeight = $("#nav-path").height();
|
||||
var windowHeight = $(window).height() - headerHeight - footerHeight;
|
||||
(function (){ // retry until we can scroll to the selected item
|
||||
try {
|
||||
var navtree=$('#nav-tree');
|
||||
navtree.scrollTo('#selected',100,{offset:-windowHeight/2});
|
||||
} catch (err) {
|
||||
setTimeout(arguments.callee, 0);
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
function expandNode(o, node, imm, showRoot)
|
||||
{
|
||||
if (node.childrenData && !node.expanded) {
|
||||
if (typeof(node.childrenData)==='string') {
|
||||
var varName = node.childrenData;
|
||||
getScript(node.relpath+varName,function(){
|
||||
node.childrenData = getData(varName);
|
||||
expandNode(o, node, imm, showRoot);
|
||||
}, showRoot);
|
||||
} else {
|
||||
if (!node.childrenVisited) {
|
||||
getNode(o, node);
|
||||
}
|
||||
$(node.getChildrenUL()).slideDown("fast");
|
||||
node.plus_img.innerHTML = arrowDown;
|
||||
node.expanded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function glowEffect(n,duration)
|
||||
{
|
||||
n.addClass('glow').delay(duration).queue(function(next){
|
||||
$(this).removeClass('glow');next();
|
||||
});
|
||||
}
|
||||
|
||||
function highlightAnchor()
|
||||
{
|
||||
var aname = hashUrl();
|
||||
var anchor = $(aname);
|
||||
if (anchor.parent().attr('class')=='memItemLeft'){
|
||||
var rows = $('.memberdecls tr[class$="'+hashValue()+'"]');
|
||||
glowEffect(rows.children(),300); // member without details
|
||||
} else if (anchor.parent().attr('class')=='fieldname'){
|
||||
glowEffect(anchor.parent().parent(),1000); // enum value
|
||||
} else if (anchor.parent().attr('class')=='fieldtype'){
|
||||
glowEffect(anchor.parent().parent(),1000); // struct field
|
||||
} else if (anchor.parent().is(":header")) {
|
||||
glowEffect(anchor.parent(),1000); // section header
|
||||
} else {
|
||||
glowEffect(anchor.next(),1000); // normal member
|
||||
}
|
||||
}
|
||||
|
||||
function selectAndHighlight(hash,n)
|
||||
{
|
||||
var a;
|
||||
if (hash) {
|
||||
var link=stripPath(pathName())+':'+hash.substring(1);
|
||||
a=$('.item a[class$="'+link+'"]');
|
||||
}
|
||||
if (a && a.length) {
|
||||
a.parent().parent().addClass('selected');
|
||||
a.parent().parent().attr('id','selected');
|
||||
highlightAnchor();
|
||||
} else if (n) {
|
||||
$(n.itemDiv).addClass('selected');
|
||||
$(n.itemDiv).attr('id','selected');
|
||||
}
|
||||
var topOffset=5;
|
||||
if (typeof page_layout!=='undefined' && page_layout==1) {
|
||||
topOffset+=$('#top').outerHeight();
|
||||
}
|
||||
if ($('#nav-tree-contents .item:first').hasClass('selected')) {
|
||||
topOffset+=25;
|
||||
}
|
||||
$('#nav-sync').css('top',topOffset+'px');
|
||||
showRoot();
|
||||
}
|
||||
|
||||
function showNode(o, node, index, hash)
|
||||
{
|
||||
if (node && node.childrenData) {
|
||||
if (typeof(node.childrenData)==='string') {
|
||||
var varName = node.childrenData;
|
||||
getScript(node.relpath+varName,function(){
|
||||
node.childrenData = getData(varName);
|
||||
showNode(o,node,index,hash);
|
||||
},true);
|
||||
} else {
|
||||
if (!node.childrenVisited) {
|
||||
getNode(o, node);
|
||||
}
|
||||
$(node.getChildrenUL()).css({'display':'block'});
|
||||
node.plus_img.innerHTML = arrowDown;
|
||||
node.expanded = true;
|
||||
var n = node.children[o.breadcrumbs[index]];
|
||||
if (index+1<o.breadcrumbs.length) {
|
||||
showNode(o,n,index+1,hash);
|
||||
} else {
|
||||
if (typeof(n.childrenData)==='string') {
|
||||
var varName = n.childrenData;
|
||||
getScript(n.relpath+varName,function(){
|
||||
n.childrenData = getData(varName);
|
||||
node.expanded=false;
|
||||
showNode(o,node,index,hash); // retry with child node expanded
|
||||
},true);
|
||||
} else {
|
||||
var rootBase = stripPath(o.toroot.replace(/\..+$/, ''));
|
||||
if (rootBase=="index" || rootBase=="pages" || rootBase=="search") {
|
||||
expandNode(o, n, true, true);
|
||||
}
|
||||
selectAndHighlight(hash,n);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selectAndHighlight(hash);
|
||||
}
|
||||
}
|
||||
|
||||
function removeToInsertLater(element) {
|
||||
var parentNode = element.parentNode;
|
||||
var nextSibling = element.nextSibling;
|
||||
parentNode.removeChild(element);
|
||||
return function() {
|
||||
if (nextSibling) {
|
||||
parentNode.insertBefore(element, nextSibling);
|
||||
} else {
|
||||
parentNode.appendChild(element);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function getNode(o, po)
|
||||
{
|
||||
var insertFunction = removeToInsertLater(po.li);
|
||||
po.childrenVisited = true;
|
||||
var l = po.childrenData.length-1;
|
||||
for (var i in po.childrenData) {
|
||||
var nodeData = po.childrenData[i];
|
||||
po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
|
||||
i==l);
|
||||
}
|
||||
insertFunction();
|
||||
}
|
||||
|
||||
function gotoNode(o,subIndex,root,hash,relpath)
|
||||
{
|
||||
var nti = navTreeSubIndices[subIndex][root+hash];
|
||||
o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
|
||||
if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
|
||||
navTo(o,NAVTREE[0][1],"",relpath);
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
}
|
||||
if (o.breadcrumbs) {
|
||||
o.breadcrumbs.unshift(0); // add 0 for root node
|
||||
showNode(o, o.node, 0, hash);
|
||||
}
|
||||
}
|
||||
|
||||
function navTo(o,root,hash,relpath)
|
||||
{
|
||||
var link = cachedLink();
|
||||
if (link) {
|
||||
var parts = link.split('#');
|
||||
root = parts[0];
|
||||
if (parts.length>1) hash = '#'+parts[1].replace(/[^\w\-]/g,'');
|
||||
else hash='';
|
||||
}
|
||||
if (hash.match(/^#l\d+$/)) {
|
||||
var anchor=$('a[name='+hash.substring(1)+']');
|
||||
glowEffect(anchor.parent(),1000); // line number
|
||||
hash=''; // strip line number anchors
|
||||
}
|
||||
var url=root+hash;
|
||||
var i=-1;
|
||||
while (NAVTREEINDEX[i+1]<=url) i++;
|
||||
if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index
|
||||
if (navTreeSubIndices[i]) {
|
||||
gotoNode(o,i,root,hash,relpath)
|
||||
} else {
|
||||
getScript(relpath+'navtreeindex'+i,function(){
|
||||
navTreeSubIndices[i] = eval('NAVTREEINDEX'+i);
|
||||
if (navTreeSubIndices[i]) {
|
||||
gotoNode(o,i,root,hash,relpath);
|
||||
}
|
||||
},true);
|
||||
}
|
||||
}
|
||||
|
||||
function showSyncOff(n,relpath)
|
||||
{
|
||||
n.html('<img src="'+relpath+'sync_off.png" title="'+SYNCOFFMSG+'"/>');
|
||||
}
|
||||
|
||||
function showSyncOn(n,relpath)
|
||||
{
|
||||
n.html('<img src="'+relpath+'sync_on.png" title="'+SYNCONMSG+'"/>');
|
||||
}
|
||||
|
||||
function toggleSyncButton(relpath)
|
||||
{
|
||||
var navSync = $('#nav-sync');
|
||||
if (navSync.hasClass('sync')) {
|
||||
navSync.removeClass('sync');
|
||||
showSyncOff(navSync,relpath);
|
||||
storeLink(stripPath2(pathName())+hashUrl());
|
||||
} else {
|
||||
navSync.addClass('sync');
|
||||
showSyncOn(navSync,relpath);
|
||||
deleteLink();
|
||||
}
|
||||
}
|
||||
|
||||
var loadTriggered = false;
|
||||
var readyTriggered = false;
|
||||
var loadObject,loadToRoot,loadUrl,loadRelPath;
|
||||
|
||||
$(window).on('load',function(){
|
||||
if (readyTriggered) { // ready first
|
||||
navTo(loadObject,loadToRoot,loadUrl,loadRelPath);
|
||||
showRoot();
|
||||
}
|
||||
loadTriggered=true;
|
||||
});
|
||||
|
||||
function initNavTree(toroot,relpath)
|
||||
{
|
||||
var o = new Object();
|
||||
o.toroot = toroot;
|
||||
o.node = new Object();
|
||||
o.node.li = document.getElementById("nav-tree-contents");
|
||||
o.node.childrenData = NAVTREE;
|
||||
o.node.children = new Array();
|
||||
o.node.childrenUL = document.createElement("ul");
|
||||
o.node.getChildrenUL = function() { return o.node.childrenUL; };
|
||||
o.node.li.appendChild(o.node.childrenUL);
|
||||
o.node.depth = 0;
|
||||
o.node.relpath = relpath;
|
||||
o.node.expanded = false;
|
||||
o.node.isLast = true;
|
||||
o.node.plus_img = document.createElement("span");
|
||||
o.node.plus_img.className = 'arrow';
|
||||
o.node.plus_img.innerHTML = arrowRight;
|
||||
|
||||
if (localStorageSupported()) {
|
||||
var navSync = $('#nav-sync');
|
||||
if (cachedLink()) {
|
||||
showSyncOff(navSync,relpath);
|
||||
navSync.removeClass('sync');
|
||||
} else {
|
||||
showSyncOn(navSync,relpath);
|
||||
}
|
||||
navSync.click(function(){ toggleSyncButton(relpath); });
|
||||
}
|
||||
|
||||
if (loadTriggered) { // load before ready
|
||||
navTo(o,toroot,hashUrl(),relpath);
|
||||
showRoot();
|
||||
} else { // ready before load
|
||||
loadObject = o;
|
||||
loadToRoot = toroot;
|
||||
loadUrl = hashUrl();
|
||||
loadRelPath = relpath;
|
||||
readyTriggered=true;
|
||||
}
|
||||
|
||||
$(window).bind('hashchange', function(){
|
||||
if (window.location.hash && window.location.hash.length>1){
|
||||
var a;
|
||||
if ($(location).attr('hash')){
|
||||
var clslink=stripPath(pathName())+':'+hashValue();
|
||||
a=$('.item a[class$="'+clslink.replace(/</g,'\\3c ')+'"]');
|
||||
}
|
||||
if (a==null || !$(a).parent().parent().hasClass('selected')){
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
}
|
||||
var link=stripPath2(pathName());
|
||||
navTo(o,link,hashUrl(),relpath);
|
||||
} else if (!animationInProgress) {
|
||||
$('#doc-content').scrollTop(0);
|
||||
$('.item').removeClass('selected');
|
||||
$('.item').removeAttr('id');
|
||||
navTo(o,toroot,hashUrl(),relpath);
|
||||
}
|
||||
})
|
||||
}
|
||||
/* @license-end */
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var NAVTREE =
|
||||
[
|
||||
[ "Serial Flash (serial-flash)", "index.html", [
|
||||
[ "Serial Flash", "index.html", null ],
|
||||
[ "API Reference", "group__group__board__libs.html", null ]
|
||||
] ]
|
||||
];
|
||||
|
||||
var NAVTREEINDEX =
|
||||
[
|
||||
"group__group__board__libs.html"
|
||||
];
|
||||
|
||||
var SYNCONMSG = 'click to disable panel synchronisation';
|
||||
var SYNCOFFMSG = 'click to enable panel synchronisation';
|
|
@ -0,0 +1,7 @@
|
|||
var NAVTREEINDEX0 =
|
||||
{
|
||||
"group__group__board__libs.html":[1],
|
||||
"index.html":[],
|
||||
"index.html":[0],
|
||||
"pages.html":[]
|
||||
};
|
After Width: | Height: | Size: 123 B |
|
@ -0,0 +1,150 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function initResizable()
|
||||
{
|
||||
var cookie_namespace = 'doxygen';
|
||||
var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight;
|
||||
|
||||
function readCookie(cookie)
|
||||
{
|
||||
var myCookie = cookie_namespace+"_"+cookie+"=";
|
||||
if (document.cookie) {
|
||||
var index = document.cookie.indexOf(myCookie);
|
||||
if (index != -1) {
|
||||
var valStart = index + myCookie.length;
|
||||
var valEnd = document.cookie.indexOf(";", valStart);
|
||||
if (valEnd == -1) {
|
||||
valEnd = document.cookie.length;
|
||||
}
|
||||
var val = document.cookie.substring(valStart, valEnd);
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function writeCookie(cookie, val, expiration)
|
||||
{
|
||||
if (val==undefined) return;
|
||||
if (expiration == null) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
|
||||
expiration = date.toGMTString();
|
||||
}
|
||||
document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; SameSite=Lax; expires=" + expiration+"; path=/";
|
||||
}
|
||||
|
||||
function resizeWidth()
|
||||
{
|
||||
var windowWidth = $(window).width() + "px";
|
||||
var sidenavWidth = $(sidenav).outerWidth();
|
||||
content.css({marginLeft:parseInt(sidenavWidth)+"px"});
|
||||
writeCookie('width',sidenavWidth-barWidth, null);
|
||||
}
|
||||
|
||||
function restoreWidth(navWidth)
|
||||
{
|
||||
var windowWidth = $(window).width() + "px";
|
||||
content.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
|
||||
sidenav.css({width:navWidth + "px"});
|
||||
}
|
||||
|
||||
function resizeHeight()
|
||||
{
|
||||
var headerHeight = header.outerHeight();
|
||||
var footerHeight = footer.outerHeight();
|
||||
var windowHeight = $(window).height();
|
||||
var contentHeight,navtreeHeight,sideNavHeight;
|
||||
if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */
|
||||
contentHeight = windowHeight - headerHeight - footerHeight;
|
||||
navtreeHeight = contentHeight;
|
||||
sideNavHeight = contentHeight;
|
||||
} else if (page_layout==1) { /* DISABLE_INDEX=YES */
|
||||
contentHeight = windowHeight - footerHeight;
|
||||
navtreeHeight = windowHeight - headerHeight;
|
||||
sideNavHeight = windowHeight;
|
||||
}
|
||||
content.css({height:contentHeight + "px"});
|
||||
navtree.css({height:navtreeHeight + "px"});
|
||||
sidenav.css({height:sideNavHeight + "px"});
|
||||
var width=$(window).width();
|
||||
if (width!=collapsedWidth) {
|
||||
if (width<desktop_vp && collapsedWidth>=desktop_vp) {
|
||||
if (!collapsed) {
|
||||
collapseExpand();
|
||||
}
|
||||
} else if (width>desktop_vp && collapsedWidth<desktop_vp) {
|
||||
if (collapsed) {
|
||||
collapseExpand();
|
||||
}
|
||||
}
|
||||
collapsedWidth=width;
|
||||
}
|
||||
if (location.hash.slice(1)) {
|
||||
(document.getElementById(location.hash.slice(1))||document.body).scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
function collapseExpand()
|
||||
{
|
||||
if (sidenav.width()>0) {
|
||||
restoreWidth(0);
|
||||
collapsed=true;
|
||||
}
|
||||
else {
|
||||
var width = readCookie('width');
|
||||
if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); }
|
||||
collapsed=false;
|
||||
}
|
||||
}
|
||||
|
||||
header = $("#top");
|
||||
sidenav = $("#side-nav");
|
||||
content = $("#doc-content");
|
||||
navtree = $("#nav-tree");
|
||||
footer = $("#nav-path");
|
||||
$(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });
|
||||
$(sidenav).resizable({ minWidth: 0 });
|
||||
$(window).resize(function() { resizeHeight(); });
|
||||
var device = navigator.userAgent.toLowerCase();
|
||||
var touch_device = device.match(/(iphone|ipod|ipad|android)/);
|
||||
if (touch_device) { /* wider split bar for touch only devices */
|
||||
$(sidenav).css({ paddingRight:'20px' });
|
||||
$('.ui-resizable-e').css({ width:'20px' });
|
||||
$('#nav-sync').css({ right:'34px' });
|
||||
barWidth=20;
|
||||
}
|
||||
var width = readCookie('width');
|
||||
if (width) { restoreWidth(width); } else { resizeWidth(); }
|
||||
resizeHeight();
|
||||
var url = location.href;
|
||||
var i=url.indexOf("#");
|
||||
if (i>=0) window.location.hash=url.substr(i);
|
||||
var _preventDefault = function(evt) { evt.preventDefault(); };
|
||||
$("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
|
||||
$(".ui-resizable-handle").dblclick(collapseExpand);
|
||||
$(window).on('load',resizeHeight);
|
||||
}
|
||||
/* @license-end */
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="all_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
var searchData=
|
||||
[
|
||||
['cy_5frslt_5fserial_5fflash_5ferr_5fbad_5fparam_0',['CY_RSLT_SERIAL_FLASH_ERR_BAD_PARAM',['../group__group__board__libs.html#ga21e3c8199504eb76df66c793488e01e8',1,'cy_serial_flash_qspi.h']]],
|
||||
['cy_5frslt_5fserial_5fflash_5ferr_5fdma_1',['CY_RSLT_SERIAL_FLASH_ERR_DMA',['../group__group__board__libs.html#ga63374cfb508c830f53f25682c183b610',1,'cy_serial_flash_qspi.h']]],
|
||||
['cy_5frslt_5fserial_5fflash_5ferr_5fqspi_5fbusy_2',['CY_RSLT_SERIAL_FLASH_ERR_QSPI_BUSY',['../group__group__board__libs.html#ga959a08da14d528096cf8ebbfb48c5da4',1,'cy_serial_flash_qspi.h']]],
|
||||
['cy_5frslt_5fserial_5fflash_5ferr_5fread_5fbusy_3',['CY_RSLT_SERIAL_FLASH_ERR_READ_BUSY',['../group__group__board__libs.html#ga41875c99fa454d69ec187e772234ce44',1,'cy_serial_flash_qspi.h']]],
|
||||
['cy_5frslt_5fserial_5fflash_5ferr_5funsupported_4',['CY_RSLT_SERIAL_FLASH_ERR_UNSUPPORTED',['../group__group__board__libs.html#gabe7c8c3af5cdc0f9640b70402f543dd7',1,'cy_serial_flash_qspi.h']]],
|
||||
['cy_5fserial_5fflash_5fget_5fsector_5fstart_5faddress_5',['cy_serial_flash_get_sector_start_address',['../group__group__board__libs.html#ga1aec27b28a9ce3205ce16e12c4d576b0',1,'cy_serial_flash_qspi.h']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fabort_5fread_6',['cy_serial_flash_qspi_abort_read',['../group__group__board__libs.html#ga49c497643b74f2e9071e27266836f45d',1,'cy_serial_flash_qspi_abort_read(void): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga49c497643b74f2e9071e27266836f45d',1,'cy_serial_flash_qspi_abort_read(void): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fdeinit_7',['cy_serial_flash_qspi_deinit',['../group__group__board__libs.html#gac4914a8bff25287d43c661d6cd68fbfd',1,'cy_serial_flash_qspi_deinit(void): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#gac4914a8bff25287d43c661d6cd68fbfd',1,'cy_serial_flash_qspi_deinit(void): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fenable_5fxip_8',['cy_serial_flash_qspi_enable_xip',['../group__group__board__libs.html#ga56772d2543b7b7f2c17ed9ddb9db941e',1,'cy_serial_flash_qspi_enable_xip(bool enable): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga56772d2543b7b7f2c17ed9ddb9db941e',1,'cy_serial_flash_qspi_enable_xip(bool enable): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5ferase_9',['cy_serial_flash_qspi_erase',['../group__group__board__libs.html#ga41c8380588bc01b6a8320b23bc172649',1,'cy_serial_flash_qspi_erase(uint32_t addr, size_t length): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga41c8380588bc01b6a8320b23bc172649',1,'cy_serial_flash_qspi_erase(uint32_t addr, size_t length): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fget_5ferase_5fsize_10',['cy_serial_flash_qspi_get_erase_size',['../group__group__board__libs.html#gacaad29bc13d3a4cd243830980b21c274',1,'cy_serial_flash_qspi_get_erase_size(uint32_t addr): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#gacaad29bc13d3a4cd243830980b21c274',1,'cy_serial_flash_qspi_get_erase_size(uint32_t addr): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fget_5fprog_5fsize_11',['cy_serial_flash_qspi_get_prog_size',['../group__group__board__libs.html#ga3b4219e6b1182c0c75704581b6cacc37',1,'cy_serial_flash_qspi_get_prog_size(uint32_t addr): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga3b4219e6b1182c0c75704581b6cacc37',1,'cy_serial_flash_qspi_get_prog_size(uint32_t addr): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fget_5fsize_12',['cy_serial_flash_qspi_get_size',['../group__group__board__libs.html#ga7b9bff94b0c4ba30b11de9f64a0e4980',1,'cy_serial_flash_qspi_get_size(void): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga7b9bff94b0c4ba30b11de9f64a0e4980',1,'cy_serial_flash_qspi_get_size(void): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5finit_13',['cy_serial_flash_qspi_init',['../group__group__board__libs.html#gaa9c587684b8b629a0fde56e786400d82',1,'cy_serial_flash_qspi_init(const cy_stc_smif_mem_config_t *mem_config, cyhal_gpio_t io0, cyhal_gpio_t io1, cyhal_gpio_t io2, cyhal_gpio_t io3, cyhal_gpio_t io4, cyhal_gpio_t io5, cyhal_gpio_t io6, cyhal_gpio_t io7, cyhal_gpio_t sclk, cyhal_gpio_t ssel, uint32_t hz): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#gaa9c587684b8b629a0fde56e786400d82',1,'cy_serial_flash_qspi_init(const cy_stc_smif_mem_config_t *mem_config, cyhal_gpio_t io0, cyhal_gpio_t io1, cyhal_gpio_t io2, cyhal_gpio_t io3, cyhal_gpio_t io4, cyhal_gpio_t io5, cyhal_gpio_t io6, cyhal_gpio_t io7, cyhal_gpio_t sclk, cyhal_gpio_t ssel, uint32_t hz): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fread_14',['cy_serial_flash_qspi_read',['../group__group__board__libs.html#ga8b700333be27d3f22dbf2b7a273e7f1e',1,'cy_serial_flash_qspi_read(uint32_t addr, size_t length, uint8_t *buf): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga8b700333be27d3f22dbf2b7a273e7f1e',1,'cy_serial_flash_qspi_read(uint32_t addr, size_t length, uint8_t *buf): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fread_5fasync_15',['cy_serial_flash_qspi_read_async',['../group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82',1,'cy_serial_flash_qspi_read_async(uint32_t addr, size_t length, uint8_t *buf, cy_serial_flash_qspi_read_complete_callback_t callback, void *callback_arg): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82',1,'cy_serial_flash_qspi_read_async(uint32_t addr, size_t length, uint8_t *buf, cy_serial_flash_qspi_read_complete_callback_t callback, void *callback_arg): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fread_5fcomplete_5fcallback_5ft_16',['cy_serial_flash_qspi_read_complete_callback_t',['../group__group__board__libs.html#gaa528d15ff15325aaec05e5a548856a19',1,'cy_serial_flash_qspi.h']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fset_5fdma_5finterrupt_5fpriority_17',['cy_serial_flash_qspi_set_dma_interrupt_priority',['../group__group__board__libs.html#ga181056affe774bccde023137e1e01f3a',1,'cy_serial_flash_qspi_set_dma_interrupt_priority(uint8_t priority): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga181056affe774bccde023137e1e01f3a',1,'cy_serial_flash_qspi_set_dma_interrupt_priority(uint8_t priority): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fset_5finterrupt_5fpriority_18',['cy_serial_flash_qspi_set_interrupt_priority',['../group__group__board__libs.html#ga818e617f0abbff49f43ee1254d7bc35c',1,'cy_serial_flash_qspi_set_interrupt_priority(uint8_t priority): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga818e617f0abbff49f43ee1254d7bc35c',1,'cy_serial_flash_qspi_set_interrupt_priority(uint8_t priority): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fthread_5fsafe_19',['CY_SERIAL_FLASH_QSPI_THREAD_SAFE',['../group__group__board__libs.html#ga93bd4d9c9082ff732c56c1a6657abc32',1,'cy_serial_flash_qspi.h']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fwrite_20',['cy_serial_flash_qspi_write',['../group__group__board__libs.html#gab7e5444e256507f0bc5d112d6741621a',1,'cy_serial_flash_qspi_write(uint32_t addr, size_t length, const uint8_t *buf): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#gab7e5444e256507f0bc5d112d6741621a',1,'cy_serial_flash_qspi_write(uint32_t addr, size_t length, const uint8_t *buf): cy_serial_flash_qspi.c']]]
|
||||
];
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="all_1.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['serial_20flash_0',['Serial Flash',['../group__group__board__libs.html',1,'(Global Namespace)'],['../index.html',1,'(Global Namespace)']]]
|
||||
];
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 11 11"
|
||||
height="11"
|
||||
width="11"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<metadata
|
||||
id="metadata8">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<path
|
||||
id="path12"
|
||||
d="M 5.5 0.5 A 5 5 0 0 0 0.5 5.5 A 5 5 0 0 0 5.5 10.5 A 5 5 0 0 0 10.5 5.5 A 5 5 0 0 0 5.5 0.5 z M 3.5820312 3 A 0.58291923 0.58291923 0 0 1 4 3.1757812 L 5.5 4.6757812 L 7 3.1757812 A 0.58291923 0.58291923 0 0 1 7.4003906 3 A 0.58291923 0.58291923 0 0 1 7.8242188 4 L 6.3242188 5.5 L 7.8242188 7 A 0.58291923 0.58291923 0 1 1 7 7.8242188 L 5.5 6.3242188 L 4 7.8242188 A 0.58291923 0.58291923 0 1 1 3.1757812 7 L 4.6757812 5.5 L 3.1757812 4 A 0.58291923 0.58291923 0 0 1 3.5820312 3 z "
|
||||
style="stroke-width:1.09870648;fill:#bababa;fill-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="functions_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
var searchData=
|
||||
[
|
||||
['cy_5fserial_5fflash_5fget_5fsector_5fstart_5faddress_0',['cy_serial_flash_get_sector_start_address',['../group__group__board__libs.html#ga1aec27b28a9ce3205ce16e12c4d576b0',1,'cy_serial_flash_qspi.h']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fabort_5fread_1',['cy_serial_flash_qspi_abort_read',['../group__group__board__libs.html#ga49c497643b74f2e9071e27266836f45d',1,'cy_serial_flash_qspi_abort_read(void): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga49c497643b74f2e9071e27266836f45d',1,'cy_serial_flash_qspi_abort_read(void): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fdeinit_2',['cy_serial_flash_qspi_deinit',['../group__group__board__libs.html#gac4914a8bff25287d43c661d6cd68fbfd',1,'cy_serial_flash_qspi_deinit(void): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#gac4914a8bff25287d43c661d6cd68fbfd',1,'cy_serial_flash_qspi_deinit(void): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fenable_5fxip_3',['cy_serial_flash_qspi_enable_xip',['../group__group__board__libs.html#ga56772d2543b7b7f2c17ed9ddb9db941e',1,'cy_serial_flash_qspi_enable_xip(bool enable): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga56772d2543b7b7f2c17ed9ddb9db941e',1,'cy_serial_flash_qspi_enable_xip(bool enable): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5ferase_4',['cy_serial_flash_qspi_erase',['../group__group__board__libs.html#ga41c8380588bc01b6a8320b23bc172649',1,'cy_serial_flash_qspi_erase(uint32_t addr, size_t length): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga41c8380588bc01b6a8320b23bc172649',1,'cy_serial_flash_qspi_erase(uint32_t addr, size_t length): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fget_5ferase_5fsize_5',['cy_serial_flash_qspi_get_erase_size',['../group__group__board__libs.html#gacaad29bc13d3a4cd243830980b21c274',1,'cy_serial_flash_qspi_get_erase_size(uint32_t addr): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#gacaad29bc13d3a4cd243830980b21c274',1,'cy_serial_flash_qspi_get_erase_size(uint32_t addr): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fget_5fprog_5fsize_6',['cy_serial_flash_qspi_get_prog_size',['../group__group__board__libs.html#ga3b4219e6b1182c0c75704581b6cacc37',1,'cy_serial_flash_qspi_get_prog_size(uint32_t addr): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga3b4219e6b1182c0c75704581b6cacc37',1,'cy_serial_flash_qspi_get_prog_size(uint32_t addr): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fget_5fsize_7',['cy_serial_flash_qspi_get_size',['../group__group__board__libs.html#ga7b9bff94b0c4ba30b11de9f64a0e4980',1,'cy_serial_flash_qspi_get_size(void): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga7b9bff94b0c4ba30b11de9f64a0e4980',1,'cy_serial_flash_qspi_get_size(void): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5finit_8',['cy_serial_flash_qspi_init',['../group__group__board__libs.html#gaa9c587684b8b629a0fde56e786400d82',1,'cy_serial_flash_qspi_init(const cy_stc_smif_mem_config_t *mem_config, cyhal_gpio_t io0, cyhal_gpio_t io1, cyhal_gpio_t io2, cyhal_gpio_t io3, cyhal_gpio_t io4, cyhal_gpio_t io5, cyhal_gpio_t io6, cyhal_gpio_t io7, cyhal_gpio_t sclk, cyhal_gpio_t ssel, uint32_t hz): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#gaa9c587684b8b629a0fde56e786400d82',1,'cy_serial_flash_qspi_init(const cy_stc_smif_mem_config_t *mem_config, cyhal_gpio_t io0, cyhal_gpio_t io1, cyhal_gpio_t io2, cyhal_gpio_t io3, cyhal_gpio_t io4, cyhal_gpio_t io5, cyhal_gpio_t io6, cyhal_gpio_t io7, cyhal_gpio_t sclk, cyhal_gpio_t ssel, uint32_t hz): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fread_9',['cy_serial_flash_qspi_read',['../group__group__board__libs.html#ga8b700333be27d3f22dbf2b7a273e7f1e',1,'cy_serial_flash_qspi_read(uint32_t addr, size_t length, uint8_t *buf): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga8b700333be27d3f22dbf2b7a273e7f1e',1,'cy_serial_flash_qspi_read(uint32_t addr, size_t length, uint8_t *buf): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fread_5fasync_10',['cy_serial_flash_qspi_read_async',['../group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82',1,'cy_serial_flash_qspi_read_async(uint32_t addr, size_t length, uint8_t *buf, cy_serial_flash_qspi_read_complete_callback_t callback, void *callback_arg): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga869d6c8e2b93215608161fb889675b82',1,'cy_serial_flash_qspi_read_async(uint32_t addr, size_t length, uint8_t *buf, cy_serial_flash_qspi_read_complete_callback_t callback, void *callback_arg): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fset_5fdma_5finterrupt_5fpriority_11',['cy_serial_flash_qspi_set_dma_interrupt_priority',['../group__group__board__libs.html#ga181056affe774bccde023137e1e01f3a',1,'cy_serial_flash_qspi_set_dma_interrupt_priority(uint8_t priority): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga181056affe774bccde023137e1e01f3a',1,'cy_serial_flash_qspi_set_dma_interrupt_priority(uint8_t priority): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fset_5finterrupt_5fpriority_12',['cy_serial_flash_qspi_set_interrupt_priority',['../group__group__board__libs.html#ga818e617f0abbff49f43ee1254d7bc35c',1,'cy_serial_flash_qspi_set_interrupt_priority(uint8_t priority): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#ga818e617f0abbff49f43ee1254d7bc35c',1,'cy_serial_flash_qspi_set_interrupt_priority(uint8_t priority): cy_serial_flash_qspi.c']]],
|
||||
['cy_5fserial_5fflash_5fqspi_5fwrite_13',['cy_serial_flash_qspi_write',['../group__group__board__libs.html#gab7e5444e256507f0bc5d112d6741621a',1,'cy_serial_flash_qspi_write(uint32_t addr, size_t length, const uint8_t *buf): cy_serial_flash_qspi.c'],['../group__group__board__libs.html#gab7e5444e256507f0bc5d112d6741621a',1,'cy_serial_flash_qspi_write(uint32_t addr, size_t length, const uint8_t *buf): cy_serial_flash_qspi.c']]]
|
||||
];
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="groups_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['serial_20flash_0',['Serial Flash',['../group__group__board__libs.html',1,'']]]
|
||||
];
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
width="20"
|
||||
height="19"
|
||||
viewBox="0 0 20 19"
|
||||
sodipodi:docname="mag_sel.svg"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
|
||||
<metadata
|
||||
id="metadata8">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="2096"
|
||||
id="namedview4"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="32"
|
||||
inkscape:cx="5.9792688"
|
||||
inkscape:cy="1.1436277"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2" />
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="path4611"
|
||||
cx="5.5"
|
||||
cy="8.5"
|
||||
r="3.5" />
|
||||
<path
|
||||
style="fill:#656565;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,7 13.5,10 16,7 Z"
|
||||
id="path4609"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
id="path4630"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="pages_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['serial_20flash_0',['Serial Flash',['../index.html',1,'']]]
|
||||
];
|
|
@ -0,0 +1,263 @@
|
|||
/*---------------- Search Box */
|
||||
|
||||
#MSearchBox {
|
||||
white-space : nowrap;
|
||||
background: white;
|
||||
border-radius: 0.65em;
|
||||
box-shadow: inset 0.5px 0.5px 3px 0px #555;
|
||||
z-index: 102;
|
||||
}
|
||||
|
||||
#MSearchBox .left {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 1.4em;
|
||||
}
|
||||
|
||||
#MSearchSelect {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 19px;
|
||||
padding: 0 0 0 0.3em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#MSearchField {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 7.5em;
|
||||
height: 19px;
|
||||
margin: 0 0.15em;
|
||||
padding: 0;
|
||||
line-height: 1em;
|
||||
border:none;
|
||||
color: #909090;
|
||||
outline: none;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
@media(hover: none) {
|
||||
/* to avoid zooming on iOS */
|
||||
#MSearchField {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
#MSearchBox .right {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 1.4em;
|
||||
height: 1.4em;
|
||||
}
|
||||
|
||||
#MSearchClose {
|
||||
display: none;
|
||||
font-size: inherit;
|
||||
background : none;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
|
||||
}
|
||||
|
||||
#MSearchCloseImg {
|
||||
height: 1.4em;
|
||||
padding: 0.3em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.MSearchBoxActive #MSearchField {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#main-menu > li:last-child {
|
||||
/* This <li> object is the parent of the search bar */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 36px;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
/*---------------- Search filter selection */
|
||||
|
||||
#MSearchSelectWindow {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
border: 1px solid #90A5CE;
|
||||
background-color: #F9FAFC;
|
||||
z-index: 10001;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-webkit-border-bottom-left-radius: 4px;
|
||||
-webkit-border-bottom-right-radius: 4px;
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.SelectItem {
|
||||
font: 8pt Arial, Verdana, sans-serif;
|
||||
padding-left: 2px;
|
||||
padding-right: 12px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
span.SelectionMark {
|
||||
margin-right: 4px;
|
||||
font-family: monospace;
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.SelectItem {
|
||||
display: block;
|
||||
outline-style: none;
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
padding-left: 6px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
a.SelectItem:focus,
|
||||
a.SelectItem:active {
|
||||
color: #000000;
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.SelectItem:hover {
|
||||
color: #FFFFFF;
|
||||
background-color: #3D578C;
|
||||
outline-style: none;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*---------------- Search results window */
|
||||
|
||||
iframe#MSearchResults {
|
||||
/*width: 60ex;*/
|
||||
height: 15em;
|
||||
}
|
||||
|
||||
#MSearchResultsWindow {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
border: 1px solid #000;
|
||||
background-color: #EEF1F7;
|
||||
z-index:10000;
|
||||
}
|
||||
|
||||
/* ----------------------------------- */
|
||||
|
||||
|
||||
#SRIndex {
|
||||
clear:both;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.SREntry {
|
||||
font-size: 10pt;
|
||||
padding-left: 1ex;
|
||||
}
|
||||
|
||||
.SRPage .SREntry {
|
||||
font-size: 8pt;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
|
||||
body.SRPage {
|
||||
margin: 5px 2px;
|
||||
}
|
||||
|
||||
.SRChildren {
|
||||
padding-left: 3ex; padding-bottom: .5em
|
||||
}
|
||||
|
||||
.SRPage .SRChildren {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.SRSymbol {
|
||||
font-weight: bold;
|
||||
color: #425E97;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a.SRScope {
|
||||
display: block;
|
||||
color: #425E97;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
a.SRSymbol:focus, a.SRSymbol:active,
|
||||
a.SRScope:focus, a.SRScope:active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
span.SRScope {
|
||||
padding-left: 4px;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
.SRPage .SRStatus {
|
||||
padding: 2px 5px;
|
||||
font-size: 8pt;
|
||||
font-style: italic;
|
||||
font-family: Arial, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
.SRResult {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.searchresults {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/*---------------- External search page results */
|
||||
|
||||
.searchresult {
|
||||
background-color: #F0F3F8;
|
||||
}
|
||||
|
||||
.pages b {
|
||||
color: white;
|
||||
padding: 5px 5px 3px 5px;
|
||||
background-image: url("../tab_a.png");
|
||||
background-repeat: repeat-x;
|
||||
text-shadow: 0 1px 1px #000000;
|
||||
}
|
||||
|
||||
.pages {
|
||||
line-height: 17px;
|
||||
margin-left: 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.hl {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#searchresults {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.searchpages {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
|
@ -0,0 +1,794 @@
|
|||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function convertToId(search)
|
||||
{
|
||||
var result = '';
|
||||
for (i=0;i<search.length;i++)
|
||||
{
|
||||
var c = search.charAt(i);
|
||||
var cn = c.charCodeAt(0);
|
||||
if (c.match(/[a-z0-9\u0080-\uFFFF]/))
|
||||
{
|
||||
result+=c;
|
||||
}
|
||||
else if (cn<16)
|
||||
{
|
||||
result+="_0"+cn.toString(16);
|
||||
}
|
||||
else
|
||||
{
|
||||
result+="_"+cn.toString(16);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function getXPos(item)
|
||||
{
|
||||
var x = 0;
|
||||
if (item.offsetWidth)
|
||||
{
|
||||
while (item && item!=document.body)
|
||||
{
|
||||
x += item.offsetLeft;
|
||||
item = item.offsetParent;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
function getYPos(item)
|
||||
{
|
||||
var y = 0;
|
||||
if (item.offsetWidth)
|
||||
{
|
||||
while (item && item!=document.body)
|
||||
{
|
||||
y += item.offsetTop;
|
||||
item = item.offsetParent;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
/* A class handling everything associated with the search panel.
|
||||
|
||||
Parameters:
|
||||
name - The name of the global variable that will be
|
||||
storing this instance. Is needed to be able to set timeouts.
|
||||
resultPath - path to use for external files
|
||||
*/
|
||||
function SearchBox(name, resultsPath, label, extension)
|
||||
{
|
||||
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
|
||||
if (!extension || extension == "") { extension = ".html"; }
|
||||
|
||||
// ---------- Instance variables
|
||||
this.name = name;
|
||||
this.resultsPath = resultsPath;
|
||||
this.keyTimeout = 0;
|
||||
this.keyTimeoutLength = 500;
|
||||
this.closeSelectionTimeout = 300;
|
||||
this.lastSearchValue = "";
|
||||
this.lastResultsPage = "";
|
||||
this.hideTimeout = 0;
|
||||
this.searchIndex = 0;
|
||||
this.searchActive = false;
|
||||
this.searchLabel = label;
|
||||
this.extension = extension;
|
||||
|
||||
// ----------- DOM Elements
|
||||
|
||||
this.DOMSearchField = function()
|
||||
{ return document.getElementById("MSearchField"); }
|
||||
|
||||
this.DOMSearchSelect = function()
|
||||
{ return document.getElementById("MSearchSelect"); }
|
||||
|
||||
this.DOMSearchSelectWindow = function()
|
||||
{ return document.getElementById("MSearchSelectWindow"); }
|
||||
|
||||
this.DOMPopupSearchResults = function()
|
||||
{ return document.getElementById("MSearchResults"); }
|
||||
|
||||
this.DOMPopupSearchResultsWindow = function()
|
||||
{ return document.getElementById("MSearchResultsWindow"); }
|
||||
|
||||
this.DOMSearchClose = function()
|
||||
{ return document.getElementById("MSearchClose"); }
|
||||
|
||||
this.DOMSearchBox = function()
|
||||
{ return document.getElementById("MSearchBox"); }
|
||||
|
||||
// ------------ Event Handlers
|
||||
|
||||
// Called when focus is added or removed from the search field.
|
||||
this.OnSearchFieldFocus = function(isActive)
|
||||
{
|
||||
this.Activate(isActive);
|
||||
}
|
||||
|
||||
this.OnSearchSelectShow = function()
|
||||
{
|
||||
var searchSelectWindow = this.DOMSearchSelectWindow();
|
||||
var searchField = this.DOMSearchSelect();
|
||||
|
||||
var left = getXPos(searchField);
|
||||
var top = getYPos(searchField);
|
||||
top += searchField.offsetHeight;
|
||||
|
||||
// show search selection popup
|
||||
searchSelectWindow.style.display='block';
|
||||
searchSelectWindow.style.left = left + 'px';
|
||||
searchSelectWindow.style.top = top + 'px';
|
||||
|
||||
// stop selection hide timer
|
||||
if (this.hideTimeout)
|
||||
{
|
||||
clearTimeout(this.hideTimeout);
|
||||
this.hideTimeout=0;
|
||||
}
|
||||
return false; // to avoid "image drag" default event
|
||||
}
|
||||
|
||||
this.OnSearchSelectHide = function()
|
||||
{
|
||||
this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
|
||||
this.closeSelectionTimeout);
|
||||
}
|
||||
|
||||
// Called when the content of the search field is changed.
|
||||
this.OnSearchFieldChange = function(evt)
|
||||
{
|
||||
if (this.keyTimeout) // kill running timer
|
||||
{
|
||||
clearTimeout(this.keyTimeout);
|
||||
this.keyTimeout = 0;
|
||||
}
|
||||
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==40 || e.keyCode==13)
|
||||
{
|
||||
if (e.shiftKey==1)
|
||||
{
|
||||
this.OnSearchSelectShow();
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
child.focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
window.frames.MSearchResults.postMessage("take_focus", "*");
|
||||
}
|
||||
}
|
||||
else if (e.keyCode==27) // Escape out of the search field
|
||||
{
|
||||
this.DOMSearchField().blur();
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.lastSearchValue = '';
|
||||
this.Activate(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// strip whitespaces
|
||||
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||
|
||||
if (searchValue != this.lastSearchValue) // search value has changed
|
||||
{
|
||||
if (searchValue != "") // non-empty search
|
||||
{
|
||||
// set timer for search update
|
||||
this.keyTimeout = setTimeout(this.name + '.Search()',
|
||||
this.keyTimeoutLength);
|
||||
}
|
||||
else // empty search field
|
||||
{
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.lastSearchValue = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.SelectItemCount = function(id)
|
||||
{
|
||||
var count=0;
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
this.SelectItemSet = function(id)
|
||||
{
|
||||
var i,j=0;
|
||||
var win=this.DOMSearchSelectWindow();
|
||||
for (i=0;i<win.childNodes.length;i++)
|
||||
{
|
||||
var child = win.childNodes[i]; // get span within a
|
||||
if (child.className=='SelectItem')
|
||||
{
|
||||
var node = child.firstChild;
|
||||
if (j==id)
|
||||
{
|
||||
node.innerHTML='•';
|
||||
}
|
||||
else
|
||||
{
|
||||
node.innerHTML=' ';
|
||||
}
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called when an search filter selection is made.
|
||||
// set item with index id as the active item
|
||||
this.OnSelectItem = function(id)
|
||||
{
|
||||
this.searchIndex = id;
|
||||
this.SelectItemSet(id);
|
||||
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||
if (searchValue!="" && this.searchActive) // something was found -> do a search
|
||||
{
|
||||
this.Search();
|
||||
}
|
||||
}
|
||||
|
||||
this.OnSearchSelectKey = function(evt)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
|
||||
{
|
||||
this.searchIndex++;
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
}
|
||||
else if (e.keyCode==38 && this.searchIndex>0) // Up
|
||||
{
|
||||
this.searchIndex--;
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
}
|
||||
else if (e.keyCode==13 || e.keyCode==27)
|
||||
{
|
||||
this.OnSelectItem(this.searchIndex);
|
||||
this.CloseSelectionWindow();
|
||||
this.DOMSearchField().focus();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// --------- Actions
|
||||
|
||||
// Closes the results window.
|
||||
this.CloseResultsWindow = function()
|
||||
{
|
||||
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||
this.DOMSearchClose().style.display = 'none';
|
||||
this.Activate(false);
|
||||
}
|
||||
|
||||
this.CloseSelectionWindow = function()
|
||||
{
|
||||
this.DOMSearchSelectWindow().style.display = 'none';
|
||||
}
|
||||
|
||||
// Performs a search.
|
||||
this.Search = function()
|
||||
{
|
||||
this.keyTimeout = 0;
|
||||
|
||||
// strip leading whitespace
|
||||
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
|
||||
|
||||
var code = searchValue.toLowerCase().charCodeAt(0);
|
||||
var idxChar = searchValue.substr(0, 1).toLowerCase();
|
||||
if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
|
||||
{
|
||||
idxChar = searchValue.substr(0, 2);
|
||||
}
|
||||
|
||||
var resultsPage;
|
||||
var resultsPageWithSearch;
|
||||
var hasResultsPage;
|
||||
|
||||
var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
|
||||
if (idx!=-1)
|
||||
{
|
||||
var hexCode=idx.toString(16);
|
||||
resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension;
|
||||
resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
|
||||
hasResultsPage = true;
|
||||
}
|
||||
else // nothing available for this search term
|
||||
{
|
||||
resultsPage = this.resultsPath + '/nomatches' + this.extension;
|
||||
resultsPageWithSearch = resultsPage;
|
||||
hasResultsPage = false;
|
||||
}
|
||||
|
||||
window.frames.MSearchResults.location = resultsPageWithSearch;
|
||||
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
|
||||
|
||||
if (domPopupSearchResultsWindow.style.display!='block')
|
||||
{
|
||||
var domSearchBox = this.DOMSearchBox();
|
||||
this.DOMSearchClose().style.display = 'inline-block';
|
||||
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||
var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
|
||||
var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1;
|
||||
domPopupSearchResultsWindow.style.display = 'block';
|
||||
left -= domPopupSearchResults.offsetWidth;
|
||||
var maxWidth = document.body.clientWidth;
|
||||
var width = 400;
|
||||
if (left<10) left=10;
|
||||
if (width+left+8>maxWidth) width=maxWidth-left-8;
|
||||
domPopupSearchResultsWindow.style.top = top + 'px';
|
||||
domPopupSearchResultsWindow.style.left = left + 'px';
|
||||
domPopupSearchResultsWindow.style.width = width + 'px';
|
||||
}
|
||||
|
||||
this.lastSearchValue = searchValue;
|
||||
this.lastResultsPage = resultsPage;
|
||||
}
|
||||
|
||||
// -------- Activation Functions
|
||||
|
||||
// Activates or deactivates the search panel, resetting things to
|
||||
// their default values if necessary.
|
||||
this.Activate = function(isActive)
|
||||
{
|
||||
if (isActive || // open it
|
||||
this.DOMPopupSearchResultsWindow().style.display == 'block'
|
||||
)
|
||||
{
|
||||
this.DOMSearchBox().className = 'MSearchBoxActive';
|
||||
|
||||
var searchField = this.DOMSearchField();
|
||||
|
||||
if (searchField.value == this.searchLabel) // clear "Search" term upon entry
|
||||
{
|
||||
searchField.value = '';
|
||||
this.searchActive = true;
|
||||
}
|
||||
}
|
||||
else if (!isActive) // directly remove the panel
|
||||
{
|
||||
this.DOMSearchBox().className = 'MSearchBoxInactive';
|
||||
this.DOMSearchField().value = this.searchLabel;
|
||||
this.searchActive = false;
|
||||
this.lastSearchValue = ''
|
||||
this.lastResultsPage = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
// The class that handles everything on the search results page.
|
||||
function SearchResults(name)
|
||||
{
|
||||
// The number of matches from the last run of <Search()>.
|
||||
this.lastMatchCount = 0;
|
||||
this.lastKey = 0;
|
||||
this.repeatOn = false;
|
||||
|
||||
// Toggles the visibility of the passed element ID.
|
||||
this.FindChildElement = function(id)
|
||||
{
|
||||
var parentElement = document.getElementById(id);
|
||||
var element = parentElement.firstChild;
|
||||
|
||||
while (element && element!=parentElement)
|
||||
{
|
||||
if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren')
|
||||
{
|
||||
return element;
|
||||
}
|
||||
|
||||
if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes())
|
||||
{
|
||||
element = element.firstChild;
|
||||
}
|
||||
else if (element.nextSibling)
|
||||
{
|
||||
element = element.nextSibling;
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
element = element.parentNode;
|
||||
}
|
||||
while (element && element!=parentElement && !element.nextSibling);
|
||||
|
||||
if (element && element!=parentElement)
|
||||
{
|
||||
element = element.nextSibling;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.Toggle = function(id)
|
||||
{
|
||||
var element = this.FindChildElement(id);
|
||||
if (element)
|
||||
{
|
||||
if (element.style.display == 'block')
|
||||
{
|
||||
element.style.display = 'none';
|
||||
}
|
||||
else
|
||||
{
|
||||
element.style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Searches for the passed string. If there is no parameter,
|
||||
// it takes it from the URL query.
|
||||
//
|
||||
// Always returns true, since other documents may try to call it
|
||||
// and that may or may not be possible.
|
||||
this.Search = function(search)
|
||||
{
|
||||
if (!search) // get search word from URL
|
||||
{
|
||||
search = window.location.search;
|
||||
search = search.substring(1); // Remove the leading '?'
|
||||
search = unescape(search);
|
||||
}
|
||||
|
||||
search = search.replace(/^ +/, ""); // strip leading spaces
|
||||
search = search.replace(/ +$/, ""); // strip trailing spaces
|
||||
search = search.toLowerCase();
|
||||
search = convertToId(search);
|
||||
|
||||
var resultRows = document.getElementsByTagName("div");
|
||||
var matches = 0;
|
||||
|
||||
var i = 0;
|
||||
while (i < resultRows.length)
|
||||
{
|
||||
var row = resultRows.item(i);
|
||||
if (row.className == "SRResult")
|
||||
{
|
||||
var rowMatchName = row.id.toLowerCase();
|
||||
rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
|
||||
|
||||
if (search.length<=rowMatchName.length &&
|
||||
rowMatchName.substr(0, search.length)==search)
|
||||
{
|
||||
row.style.display = 'block';
|
||||
matches++;
|
||||
}
|
||||
else
|
||||
{
|
||||
row.style.display = 'none';
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
document.getElementById("Searching").style.display='none';
|
||||
if (matches == 0) // no results
|
||||
{
|
||||
document.getElementById("NoMatches").style.display='block';
|
||||
}
|
||||
else // at least one result
|
||||
{
|
||||
document.getElementById("NoMatches").style.display='none';
|
||||
}
|
||||
this.lastMatchCount = matches;
|
||||
return true;
|
||||
}
|
||||
|
||||
// return the first item with index index or higher that is visible
|
||||
this.NavNext = function(index)
|
||||
{
|
||||
var focusItem;
|
||||
while (1)
|
||||
{
|
||||
var focusName = 'Item'+index;
|
||||
focusItem = document.getElementById(focusName);
|
||||
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (!focusItem) // last element
|
||||
{
|
||||
break;
|
||||
}
|
||||
focusItem=null;
|
||||
index++;
|
||||
}
|
||||
return focusItem;
|
||||
}
|
||||
|
||||
this.NavPrev = function(index)
|
||||
{
|
||||
var focusItem;
|
||||
while (1)
|
||||
{
|
||||
var focusName = 'Item'+index;
|
||||
focusItem = document.getElementById(focusName);
|
||||
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||
{
|
||||
break;
|
||||
}
|
||||
else if (!focusItem) // last element
|
||||
{
|
||||
break;
|
||||
}
|
||||
focusItem=null;
|
||||
index--;
|
||||
}
|
||||
return focusItem;
|
||||
}
|
||||
|
||||
this.ProcessKeys = function(e)
|
||||
{
|
||||
if (e.type == "keydown")
|
||||
{
|
||||
this.repeatOn = false;
|
||||
this.lastKey = e.keyCode;
|
||||
}
|
||||
else if (e.type == "keypress")
|
||||
{
|
||||
if (!this.repeatOn)
|
||||
{
|
||||
if (this.lastKey) this.repeatOn = true;
|
||||
return false; // ignore first keypress after keydown
|
||||
}
|
||||
}
|
||||
else if (e.type == "keyup")
|
||||
{
|
||||
this.lastKey = 0;
|
||||
this.repeatOn = false;
|
||||
}
|
||||
return this.lastKey!=0;
|
||||
}
|
||||
|
||||
this.Nav = function(evt,itemIndex)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==13) return true;
|
||||
if (!this.ProcessKeys(e)) return false;
|
||||
|
||||
if (this.lastKey==38) // Up
|
||||
{
|
||||
var newIndex = itemIndex-1;
|
||||
var focusItem = this.NavPrev(newIndex);
|
||||
if (focusItem)
|
||||
{
|
||||
var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
|
||||
if (child && child.style.display == 'block') // children visible
|
||||
{
|
||||
var n=0;
|
||||
var tmpElem;
|
||||
while (1) // search for last child
|
||||
{
|
||||
tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
|
||||
if (tmpElem)
|
||||
{
|
||||
focusItem = tmpElem;
|
||||
}
|
||||
else // found it!
|
||||
{
|
||||
break;
|
||||
}
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (focusItem)
|
||||
{
|
||||
focusItem.focus();
|
||||
}
|
||||
else // return focus to search field
|
||||
{
|
||||
parent.document.getElementById("MSearchField").focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==40) // Down
|
||||
{
|
||||
var newIndex = itemIndex+1;
|
||||
var focusItem;
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem && elem.style.display == 'block') // children visible
|
||||
{
|
||||
focusItem = document.getElementById('Item'+itemIndex+'_c0');
|
||||
}
|
||||
if (!focusItem) focusItem = this.NavNext(newIndex);
|
||||
if (focusItem) focusItem.focus();
|
||||
}
|
||||
else if (this.lastKey==39) // Right
|
||||
{
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem) elem.style.display = 'block';
|
||||
}
|
||||
else if (this.lastKey==37) // Left
|
||||
{
|
||||
var item = document.getElementById('Item'+itemIndex);
|
||||
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||
if (elem) elem.style.display = 'none';
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
parent.searchBox.CloseResultsWindow();
|
||||
parent.document.getElementById("MSearchField").focus();
|
||||
}
|
||||
else if (this.lastKey==13) // Enter
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
this.NavChild = function(evt,itemIndex,childIndex)
|
||||
{
|
||||
var e = (evt) ? evt : window.event; // for IE
|
||||
if (e.keyCode==13) return true;
|
||||
if (!this.ProcessKeys(e)) return false;
|
||||
|
||||
if (this.lastKey==38) // Up
|
||||
{
|
||||
if (childIndex>0)
|
||||
{
|
||||
var newIndex = childIndex-1;
|
||||
document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
|
||||
}
|
||||
else // already at first child, jump to parent
|
||||
{
|
||||
document.getElementById('Item'+itemIndex).focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==40) // Down
|
||||
{
|
||||
var newIndex = childIndex+1;
|
||||
var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
|
||||
if (!elem) // last child, jump to parent next parent
|
||||
{
|
||||
elem = this.NavNext(itemIndex+1);
|
||||
}
|
||||
if (elem)
|
||||
{
|
||||
elem.focus();
|
||||
}
|
||||
}
|
||||
else if (this.lastKey==27) // Escape
|
||||
{
|
||||
parent.searchBox.CloseResultsWindow();
|
||||
parent.document.getElementById("MSearchField").focus();
|
||||
}
|
||||
else if (this.lastKey==13) // Enter
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function setKeyActions(elem,action)
|
||||
{
|
||||
elem.setAttribute('onkeydown',action);
|
||||
elem.setAttribute('onkeypress',action);
|
||||
elem.setAttribute('onkeyup',action);
|
||||
}
|
||||
|
||||
function setClassAttr(elem,attr)
|
||||
{
|
||||
elem.setAttribute('class',attr);
|
||||
elem.setAttribute('className',attr);
|
||||
}
|
||||
|
||||
function createResults()
|
||||
{
|
||||
var results = document.getElementById("SRResults");
|
||||
for (var e=0; e<searchData.length; e++)
|
||||
{
|
||||
var id = searchData[e][0];
|
||||
var srResult = document.createElement('div');
|
||||
srResult.setAttribute('id','SR_'+id);
|
||||
setClassAttr(srResult,'SRResult');
|
||||
var srEntry = document.createElement('div');
|
||||
setClassAttr(srEntry,'SREntry');
|
||||
var srLink = document.createElement('a');
|
||||
srLink.setAttribute('id','Item'+e);
|
||||
setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
|
||||
setClassAttr(srLink,'SRSymbol');
|
||||
srLink.innerHTML = searchData[e][1][0];
|
||||
srEntry.appendChild(srLink);
|
||||
if (searchData[e][1].length==2) // single result
|
||||
{
|
||||
srLink.setAttribute('href',searchData[e][1][1][0]);
|
||||
srLink.setAttribute('onclick','parent.searchBox.CloseResultsWindow()');
|
||||
if (searchData[e][1][1][1])
|
||||
{
|
||||
srLink.setAttribute('target','_parent');
|
||||
}
|
||||
var srScope = document.createElement('span');
|
||||
setClassAttr(srScope,'SRScope');
|
||||
srScope.innerHTML = searchData[e][1][1][2];
|
||||
srEntry.appendChild(srScope);
|
||||
}
|
||||
else // multiple results
|
||||
{
|
||||
srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
|
||||
var srChildren = document.createElement('div');
|
||||
setClassAttr(srChildren,'SRChildren');
|
||||
for (var c=0; c<searchData[e][1].length-1; c++)
|
||||
{
|
||||
var srChild = document.createElement('a');
|
||||
srChild.setAttribute('id','Item'+e+'_c'+c);
|
||||
setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
|
||||
setClassAttr(srChild,'SRScope');
|
||||
srChild.setAttribute('href',searchData[e][1][c+1][0]);
|
||||
srChild.setAttribute('onclick','parent.searchBox.CloseResultsWindow()');
|
||||
if (searchData[e][1][c+1][1])
|
||||
{
|
||||
srChild.setAttribute('target','_parent');
|
||||
}
|
||||
srChild.innerHTML = searchData[e][1][c+1][2];
|
||||
srChildren.appendChild(srChild);
|
||||
}
|
||||
srEntry.appendChild(srChildren);
|
||||
}
|
||||
srResult.appendChild(srEntry);
|
||||
results.appendChild(srResult);
|
||||
}
|
||||
}
|
||||
|
||||
function init_search()
|
||||
{
|
||||
var results = document.getElementById("MSearchSelectWindow");
|
||||
for (var key in indexSectionLabels)
|
||||
{
|
||||
var link = document.createElement('a');
|
||||
link.setAttribute('class','SelectItem');
|
||||
link.setAttribute('onclick','searchBox.OnSelectItem('+key+')');
|
||||
link.href='javascript:void(0)';
|
||||
link.innerHTML='<span class="SelectionMark"> </span>'+indexSectionLabels[key];
|
||||
results.appendChild(link);
|
||||
}
|
||||
searchBox.OnSelectItem(0);
|
||||
}
|
||||
/* @license-end */
|
After Width: | Height: | Size: 567 B |
After Width: | Height: | Size: 158 B |
After Width: | Height: | Size: 553 B |
|
@ -0,0 +1,27 @@
|
|||
var indexSectionsWithContent =
|
||||
{
|
||||
0: "cs",
|
||||
1: "c",
|
||||
2: "c",
|
||||
3: "s",
|
||||
4: "s"
|
||||
};
|
||||
|
||||
var indexSectionNames =
|
||||
{
|
||||
0: "all",
|
||||
1: "functions",
|
||||
2: "typedefs",
|
||||
3: "groups",
|
||||
4: "pages"
|
||||
};
|
||||
|
||||
var indexSectionLabels =
|
||||
{
|
||||
0: "All",
|
||||
1: "Functions",
|
||||
2: "Typedefs",
|
||||
3: "Modules",
|
||||
4: "Pages"
|
||||
};
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><title></title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||
<script type="text/javascript" src="typedefs_0.js"></script>
|
||||
<script type="text/javascript" src="search.js"></script>
|
||||
</head>
|
||||
<body class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div id="SRResults"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
createResults();
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
document.getElementById("Loading").style.display="none";
|
||||
document.getElementById("NoMatches").style.display="none";
|
||||
var searchResults = new SearchResults("searchResults");
|
||||
searchResults.Search();
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data == "take_focus") {
|
||||
var elem = searchResults.NavNext(0);
|
||||
if (elem) elem.focus();
|
||||
}
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,4 @@
|
|||
var searchData=
|
||||
[
|
||||
['cy_5fserial_5fflash_5fqspi_5fread_5fcomplete_5fcallback_5ft_0',['cy_serial_flash_qspi_read_complete_callback_t',['../group__group__board__libs.html#gaa528d15ff15325aaec05e5a548856a19',1,'cy_serial_flash_qspi.h']]]
|
||||
];
|
After Width: | Height: | Size: 314 B |
After Width: | Height: | Size: 853 B |
After Width: | Height: | Size: 845 B |
After Width: | Height: | Size: 142 B |
After Width: | Height: | Size: 169 B |
After Width: | Height: | Size: 177 B |
After Width: | Height: | Size: 184 B |
|
@ -0,0 +1 @@
|
|||
<version>1.3.0.27308</version>
|
|
@ -80,7 +80,7 @@ CONFIG_RT_USING_DEVICE=y
|
|||
# CONFIG_RT_USING_INTERRUPT_INFO is not set
|
||||
CONFIG_RT_USING_CONSOLE=y
|
||||
CONFIG_RT_CONSOLEBUF_SIZE=128
|
||||
CONFIG_RT_CONSOLE_DEVICE_NAME="uart1"
|
||||
CONFIG_RT_CONSOLE_DEVICE_NAME="uart5"
|
||||
CONFIG_RT_VER_NUM=0x40101
|
||||
CONFIG_ARCH_ARM=y
|
||||
CONFIG_RT_USING_CPU_FFS=y
|
||||
|
@ -138,7 +138,10 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64
|
|||
# CONFIG_RT_USING_CAN is not set
|
||||
# CONFIG_RT_USING_HWTIMER is not set
|
||||
# CONFIG_RT_USING_CPUTIME is not set
|
||||
# CONFIG_RT_USING_I2C is not set
|
||||
CONFIG_RT_USING_I2C=y
|
||||
# CONFIG_RT_I2C_DEBUG is not set
|
||||
CONFIG_RT_USING_I2C_BITOPS=y
|
||||
CONFIG_RT_I2C_BITOPS_DEBUG=y
|
||||
# CONFIG_RT_USING_PHY is not set
|
||||
CONFIG_RT_USING_PIN=y
|
||||
# CONFIG_RT_USING_ADC is not set
|
||||
|
@ -152,7 +155,8 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_RT_USING_SPI is not set
|
||||
# CONFIG_RT_USING_WDT is not set
|
||||
# CONFIG_RT_USING_AUDIO is not set
|
||||
# CONFIG_RT_USING_SENSOR is not set
|
||||
CONFIG_RT_USING_SENSOR=y
|
||||
CONFIG_RT_USING_SENSOR_CMD=y
|
||||
# CONFIG_RT_USING_TOUCH is not set
|
||||
# CONFIG_RT_USING_HWCRYPTO is not set
|
||||
# CONFIG_RT_USING_PULSE_ENCODER is not set
|
||||
|
@ -174,7 +178,15 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
|
|||
#
|
||||
# POSIX (Portable Operating System Interface) layer
|
||||
#
|
||||
# CONFIG_RT_USING_POSIX_FS is not set
|
||||
CONFIG_RT_USING_POSIX_FS=y
|
||||
# CONFIG_RT_USING_POSIX_DEVIO is not set
|
||||
# CONFIG_RT_USING_POSIX_STDIO is not set
|
||||
# CONFIG_RT_USING_POSIX_POLL is not set
|
||||
# CONFIG_RT_USING_POSIX_SELECT is not set
|
||||
# CONFIG_RT_USING_POSIX_SOCKET is not set
|
||||
# CONFIG_RT_USING_POSIX_TERMIOS is not set
|
||||
# CONFIG_RT_USING_POSIX_AIO is not set
|
||||
# CONFIG_RT_USING_POSIX_MMAN is not set
|
||||
# CONFIG_RT_USING_POSIX_DELAY is not set
|
||||
# CONFIG_RT_USING_POSIX_CLOCK is not set
|
||||
# CONFIG_RT_USING_POSIX_TIMER is not set
|
||||
|
@ -333,6 +345,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
|
|||
# CONFIG_PKG_USING_RAPIDJSON is not set
|
||||
# CONFIG_PKG_USING_JSMN is not set
|
||||
# CONFIG_PKG_USING_AGILE_JSMN is not set
|
||||
# CONFIG_PKG_USING_PARSON is not set
|
||||
|
||||
#
|
||||
# XML: Extensible Markup Language
|
||||
|
@ -508,10 +521,72 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
|
|||
#
|
||||
# peripheral libraries and drivers
|
||||
#
|
||||
# CONFIG_PKG_USING_SENSORS_DRIVERS is not set
|
||||
CONFIG_PKG_USING_SENSORS_DRIVERS=y
|
||||
# CONFIG_PKG_USING_FINGERPRINT is not set
|
||||
# CONFIG_PKG_USING_LSM6DSM is not set
|
||||
# CONFIG_PKG_USING_LSM6DSL is not set
|
||||
# CONFIG_PKG_USING_LPS22HB is not set
|
||||
# CONFIG_PKG_USING_HTS221 is not set
|
||||
# CONFIG_PKG_USING_LSM303AGR is not set
|
||||
# CONFIG_PKG_USING_BME280 is not set
|
||||
# CONFIG_PKG_USING_BME680 is not set
|
||||
# CONFIG_PKG_USING_BMA400 is not set
|
||||
# CONFIG_PKG_USING_BMI160_BMX160 is not set
|
||||
# CONFIG_PKG_USING_SPL0601 is not set
|
||||
# CONFIG_PKG_USING_MS5805 is not set
|
||||
# CONFIG_PKG_USING_DA270 is not set
|
||||
# CONFIG_PKG_USING_DF220 is not set
|
||||
# CONFIG_PKG_USING_HSHCAL001 is not set
|
||||
# CONFIG_PKG_USING_BH1750 is not set
|
||||
CONFIG_PKG_USING_MPU6XXX=y
|
||||
CONFIG_PKG_MPU6XXX_PATH="/packages/peripherals/sensors/mpu6xxx"
|
||||
# CONFIG_PKG_USING_MPU6XXX_V001 is not set
|
||||
# CONFIG_PKG_USING_MPU6XXX_V100 is not set
|
||||
# CONFIG_PKG_USING_MPU6XXX_V110 is not set
|
||||
CONFIG_PKG_USING_MPU6XXX_LATEST_VERSION=y
|
||||
CONFIG_PKG_MPU6XXX_VER="latest"
|
||||
CONFIG_PKG_USING_MPU6XXX_ACCE=y
|
||||
CONFIG_PKG_USING_MPU6XXX_GYRO=y
|
||||
CONFIG_PKG_USING_MPU6XXX_MAG=y
|
||||
# CONFIG_PKG_USING_AHT10 is not set
|
||||
# CONFIG_PKG_USING_AP3216C is not set
|
||||
# CONFIG_PKG_USING_TSL4531 is not set
|
||||
# CONFIG_PKG_USING_DS18B20 is not set
|
||||
# CONFIG_PKG_USING_DHT11 is not set
|
||||
# CONFIG_PKG_USING_DHTXX is not set
|
||||
# CONFIG_PKG_USING_GY271 is not set
|
||||
# CONFIG_PKG_USING_GP2Y10 is not set
|
||||
# CONFIG_PKG_USING_SGP30 is not set
|
||||
# CONFIG_PKG_USING_HDC1000 is not set
|
||||
# CONFIG_PKG_USING_BMP180 is not set
|
||||
# CONFIG_PKG_USING_BMP280 is not set
|
||||
# CONFIG_PKG_USING_SHTC1 is not set
|
||||
# CONFIG_PKG_USING_BMI088 is not set
|
||||
# CONFIG_PKG_USING_HMC5883 is not set
|
||||
# CONFIG_PKG_USING_MAX6675 is not set
|
||||
# CONFIG_PKG_USING_TMP1075 is not set
|
||||
# CONFIG_PKG_USING_SR04 is not set
|
||||
# CONFIG_PKG_USING_CCS811 is not set
|
||||
# CONFIG_PKG_USING_PMSXX is not set
|
||||
# CONFIG_PKG_USING_RT3020 is not set
|
||||
# CONFIG_PKG_USING_MLX90632 is not set
|
||||
# CONFIG_PKG_USING_MLX90393 is not set
|
||||
# CONFIG_PKG_USING_MS5611 is not set
|
||||
# CONFIG_PKG_USING_MAX31865 is not set
|
||||
# CONFIG_PKG_USING_VL53L0X is not set
|
||||
# CONFIG_PKG_USING_INA260 is not set
|
||||
# CONFIG_PKG_USING_MAX30102 is not set
|
||||
# CONFIG_PKG_USING_INA226 is not set
|
||||
# CONFIG_PKG_USING_LIS2DH12 is not set
|
||||
# CONFIG_PKG_USING_HS300X is not set
|
||||
# CONFIG_PKG_USING_ZMOD4410 is not set
|
||||
# CONFIG_PKG_USING_ISL29035 is not set
|
||||
# CONFIG_PKG_USING_MMC3680KJ is not set
|
||||
# CONFIG_PKG_USING_QMP6989 is not set
|
||||
# CONFIG_PKG_USING_REALTEK_AMEBA is not set
|
||||
# CONFIG_PKG_USING_SHT2X is not set
|
||||
# CONFIG_PKG_USING_SHT3X is not set
|
||||
# CONFIG_PKG_USING_ADT74XX is not set
|
||||
# CONFIG_PKG_USING_AS7341 is not set
|
||||
# CONFIG_PKG_USING_STM32_SDIO is not set
|
||||
# CONFIG_PKG_USING_ICM20608 is not set
|
||||
|
@ -678,8 +753,19 @@ CONFIG_BSP_USING_USB_TO_USART=y
|
|||
#
|
||||
CONFIG_BSP_USING_GPIO=y
|
||||
CONFIG_BSP_USING_UART=y
|
||||
CONFIG_BSP_USING_UART1=y
|
||||
CONFIG_BSP_USING_UART5=y
|
||||
CONFIG_BSP_USING_UART2=y
|
||||
# CONFIG_BSP_USING_ADC is not set
|
||||
# CONFIG_BSP_USING_QSPI_FLASH is not set
|
||||
CONFIG_BSP_USING_HW_I2C=y
|
||||
CONFIG_BSP_USING_HW_I2C1=y
|
||||
|
||||
#
|
||||
# Notice: P6_0 --> 48; P6_1 --> 49
|
||||
#
|
||||
CONFIG_BSP_I2C1_SCL_PIN=48
|
||||
CONFIG_BSP_I2C1_SDA_PIN=49
|
||||
# CONFIG_BSP_USING_I2C is not set
|
||||
|
||||
#
|
||||
# Board extended module Drivers
|
||||
|
|
|
@ -21,9 +21,9 @@ int main(void)
|
|||
|
||||
for (;;)
|
||||
{
|
||||
rt_pin_write(CYBSP_USER_LED, PIN_HIGH);
|
||||
rt_thread_mdelay(1000);
|
||||
rt_pin_write(CYBSP_USER_LED, PIN_LOW);
|
||||
rt_thread_mdelay(1000);
|
||||
rt_pin_write(LED_PIN, PIN_HIGH);
|
||||
rt_thread_mdelay(500);
|
||||
rt_pin_write(LED_PIN, PIN_LOW);
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@ config SOC_IFX_PSOC6_43012
|
|||
menu "Onboard Peripheral Drivers"
|
||||
|
||||
config BSP_USING_USB_TO_USART
|
||||
bool "Enable USB TO USART (uart1)"
|
||||
bool "Enable USB TO USART (uart5)"
|
||||
select BSP_USING_UART
|
||||
select BSP_USING_UART1
|
||||
select BSP_USING_UART5
|
||||
default y
|
||||
|
||||
endmenu
|
||||
|
@ -29,9 +29,12 @@ menu "On-chip Peripheral Drivers"
|
|||
default y
|
||||
select RT_USING_SERIAL
|
||||
if BSP_USING_UART
|
||||
config BSP_USING_UART1
|
||||
bool "Enable UART1"
|
||||
config BSP_USING_UART5
|
||||
bool "Enable UART5"
|
||||
default y
|
||||
config BSP_USING_UART2
|
||||
bool "Enable UART2"
|
||||
default n
|
||||
endif
|
||||
|
||||
menuconfig BSP_USING_ADC
|
||||
|
@ -43,6 +46,58 @@ menu "On-chip Peripheral Drivers"
|
|||
bool "Enable ADC1"
|
||||
default n
|
||||
endif
|
||||
|
||||
config BSP_USING_QSPI_FLASH
|
||||
bool "Enable QSPI BUS"
|
||||
select RT_USING_QSPI
|
||||
select RT_USING_SFUD
|
||||
select RT_SFUD_USING_QSPI
|
||||
default n
|
||||
|
||||
menuconfig BSP_USING_HW_I2C
|
||||
bool "Enable Hardware I2C Bus"
|
||||
default n
|
||||
select RT_USING_I2C
|
||||
select RT_USING_PIN
|
||||
if BSP_USING_HW_I2C
|
||||
config BSP_USING_HW_I2C1
|
||||
bool "Enable I2C1 Bus (User I2C)"
|
||||
default n
|
||||
if BSP_USING_HW_I2C1
|
||||
comment "Notice: P6_0 --> 48; P6_1 --> 49"
|
||||
config BSP_I2C1_SCL_PIN
|
||||
int "i2c1 SCL pin number"
|
||||
range 1 113
|
||||
default 48
|
||||
config BSP_I2C1_SDA_PIN
|
||||
int "i2c1 SDA pin number"
|
||||
range 1 113
|
||||
default 49
|
||||
endif
|
||||
endif
|
||||
|
||||
menuconfig BSP_USING_I2C
|
||||
bool "Enable I2C Bus"
|
||||
default n
|
||||
select RT_USING_I2C
|
||||
select RT_USING_I2C_BITOPS
|
||||
select RT_USING_PIN
|
||||
if BSP_USING_I2C
|
||||
config BSP_USING_I2C1
|
||||
bool "Enable I2C1 Bus (User I2C)"
|
||||
default n
|
||||
if BSP_USING_I2C1
|
||||
comment "Notice: P13_1 --> 105; P13_2 --> 106"
|
||||
config BSP_I2C1_SCL_PIN
|
||||
int "i2c1 SCL pin number"
|
||||
range 1 113
|
||||
default 105
|
||||
config BSP_I2C1_SDA_PIN
|
||||
int "i2c1 SDA pin number"
|
||||
range 1 113
|
||||
default 106
|
||||
endif
|
||||
endif
|
||||
endmenu
|
||||
|
||||
menu "Board extended module Drivers"
|
||||
|
|
|
@ -19,7 +19,7 @@ if CROSS_TOOL == 'gcc':
|
|||
PLATFORM = 'gcc'
|
||||
EXEC_PATH = r'C:\Users\XXYYZZ'
|
||||
elif CROSS_TOOL == 'keil':
|
||||
PLATFORM = 'armcc'
|
||||
PLATFORM = 'armclang'
|
||||
EXEC_PATH = r'C:/Keil_v5'
|
||||
elif CROSS_TOOL == 'iar':
|
||||
PLATFORM = 'iar'
|
||||
|
|