单片机源程序如下:
/** file main.cpp ******************************************************
*
* Project: STM32F103C8T6+MAX30102
* Edited by Anning
* ------------------------------------------------------------------------- */
/*******************************************************************************
* Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
*
/*!mainpage Main Page
*
* section intro_sec Introduction
*
* This is the code documentation for the MAXREFDES117# subsystem reference design.
*
* The Files page contains the File List page and the Globals page.
*
* The Globals page contains the Functions, Variables, and Macros sub-pages.
*
* image html MAXREFDES117_Block_Diagram.png "MAXREFDES117# System Block Diagram"
*
* image html MAXREFDES117_firmware_Flowchart.png "MAXREFDES117# Firmware Flowchart"
*
*/
#include "stm32f103c8t6.h"
#include "mbed.h"
#include "algorithm.h"
#include "MAX30102.h"
#define MAX_BRIGHTNESS 255
uint32_t aun_ir_buffer[500]; //IR LED sensor data
int32_