This repository has been archived on 2023-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
bl_mcu_sdk/bsp/bsp_common/psram/bsp_sf_psram.h

46 lines
1.5 KiB
C
Raw Normal View History

2021-06-04 17:43:05 +08:00
/**
* @file bsp_sf_psram.h
2021-06-20 12:25:46 +08:00
* @brief
*
2021-06-04 17:43:05 +08:00
* Copyright (c) 2021 Bouffalolab team
2021-06-20 12:25:46 +08:00
*
2021-06-04 17:43:05 +08:00
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
2021-06-20 12:25:46 +08:00
*
2021-06-04 17:43:05 +08:00
* http://www.apache.org/licenses/LICENSE-2.0
2021-06-20 12:25:46 +08:00
*
2021-06-04 17:43:05 +08:00
* 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.
2021-06-20 12:25:46 +08:00
*
2021-06-04 17:43:05 +08:00
*/
#ifndef __BSP_SF_PSRAM_H__
#define __BSP_SF_PSRAM_H__
#include "bl702.h"
2021-06-20 12:25:46 +08:00
#define BSP_PSRAM_BASE BL702_PSRAM_XIP_BASE
2021-06-04 17:43:05 +08:00
2021-06-20 12:25:46 +08:00
#define PSRAM_SIZE 2 * 1024 * 1024
2021-06-04 17:43:05 +08:00
2021-06-20 12:25:46 +08:00
#define BFLB_EXTFLASH_CS_GPIO GLB_GPIO_PIN_25
#define BFLB_EXTPSRAM_CLK_GPIO GLB_GPIO_PIN_27
#define BFLB_EXTPSRAM_CS_GPIO GLB_GPIO_PIN_17
#define BFLB_EXTPSRAM_DATA0_GPIO GLB_GPIO_PIN_28
#define BFLB_EXTPSRAM_DATA1_GPIO GLB_GPIO_PIN_24
#define BFLB_EXTPSRAM_DATA2_GPIO GLB_GPIO_PIN_23
#define BFLB_EXTPSRAM_DATA3_GPIO GLB_GPIO_PIN_26
2021-06-04 17:43:05 +08:00
void bsp_sf_psram_gpio_init(void);
void bsp_sf_psram_init(uint8_t sw_reset);
void bsp_sf_psram_read_id(uint8_t *data);
2021-06-20 12:25:46 +08:00
#endif /* __BSP_SF_PSRAM_H__ */