资源简介
包含STM32F103RBT6 8个基本例程(点灯 按键 TIM定时器 USART收发 读芯片ID SysTick(系统滴答定时器)ADC操作 ) 1个高级例程(基于STM32 USB 虚拟串口 采集ADC)
代码片段和文件信息
/**
******************************************************************************
* @file fatfs_drv.c
* @author MCD Application Team
* @version V1.2.0
* @date 11-April-2014
* @brief diskio interface
******************************************************************************
* @attention
*
* © COPYRIGHT 2014 STMicroelectronics
*
* Licensed under MCD-ST Liberty SW License Agreement V2 (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.st.com/software_license_agreement_liberty_v2
*
* 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.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include “ff.h“
#include “diskio.h“
#include “stm32_adafruit_spi_usd.h“
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
#define BLOCK_SIZE 512 /* Block Size in Bytes */
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
static volatile DSTATUS Stat = STA_NOINIT; /* Disk status */
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/**
* @brief Initializes a Disk
* @param pdrv: Physical drive number
* @retval DSTATUS: Operation status
*/
DSTATUS disk_initialize(BYTE pdrv)
{
Stat = STA_NOINIT;
if (pdrv == 0)
{
if (SD_ADAFRUIT_Init() == SD_RESPONSE_NO_ERROR)
{
Stat &= ~STA_NOINIT;
}
}
return Stat;
}
/**
* @brief Gets Disk Status
* @param pdrv: Physical drive number
* @retval DSTATUS: Operation status
*/
DSTATUS disk_status (BYTE pdrv)
{
if (pdrv == 0) /* Supports only single drive */
{
Stat = STA_NOINIT;
if(SD_GetStatus() == 0xFF)
{
Stat &= ~STA_NOINIT;
}
}
return Stat;
}
/**
* @brief Reads Sector
* @param pdrv: Physical drive number
* @param *buff: Data buffer to store read data
* @param sector: Sector address (LBA)
* @param count: Number of sectors to read
* @retval DRESULT: Operation result
*/
DRESULT disk_read (BYTE pdrv BYTE*buff DWORD sector UINT count)
{
if (pdrv == 0)
{
if(SD_GetStatus() != 0xFF)
{
return(RES_NOTRDY);
}
SD_ReadB
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 764996 2020-04-30 19:10 基本例程-按键(查询方式).zip
文件 795438 2020-04-30 19:10 基本例程-按键(中断方式).zip
文件 905140 2020-04-30 19:10 基本例程-TIM定时器操作.zip
文件 704884 2020-04-30 19:10 基本例程-USART收发.zip
文件 682717 2020-04-30 19:09 基本例程—SysTick(系统滴答定时器)操作.zip
文件 995076 2020-04-30 19:09 基本例程-ADC操作.zip
文件 631653 2020-04-30 19:09 基本例程-I0操作_LED流水灯.zip
文件 3997866 2020-04-30 19:09 高级例程-基于STM32 USB 虚拟串口 采集ADC.zip
文件 810501 2020-04-30 19:09 基本例程-读芯片ID.zip
文件 2066 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\Binary\readme.txt
文件 54411 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\Binary\STM32F103_Nucleo_Demo.hex
文件 1344 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\EWARM\stm32f103xx_flash.icf
文件 36889 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\EWARM\STM32F103_Nucleo_Demo.ewd
文件 30640 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\EWARM\STM32F103_Nucleo_Demo.ewp
文件 175 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\EWARM\STM32F103_Nucleo_Demo.eww
文件 5756 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\fatfs_drv.c
文件 7350 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\fatfs_storage.c
文件 2454 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\fatfs_storage.h
文件 8688 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\ffconf.h
文件 17960 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\main.c
文件 2014 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\main.h
文件 25977 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\MDK-ARM\STM32F103_Nucleo_Demo.uvopt
文件 23141 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\MDK-ARM\STM32F103_Nucleo_Demo.uvproj
文件 41026 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\Media\10_16.bmp
文件 41026 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\Media\12_16.bmp
文件 41026 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\Media\1_16.bmp
文件 41026 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\Media\2_16.bmp
文件 41026 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\Media\3_16.bmp
文件 41026 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\Media\4_16.bmp
文件 41026 2014-04-16 21:58 NUCLEO-F103RB\Demonstration\Media\5_16.bmp
............此处省略590个文件信息
评论
共有 条评论