Src\main.cpp:11:58: error: 'blink' was not declared in this scope

/* 中断程序 */
#include <Arduino.h>

const byte interruptPin = 2;
volatile byte state = LOW;

void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
pinMode(interruptPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(interruptPin), blink, CHANGE);
}

void loop()
{
digitalWrite(LED_BUILTIN, state);
}

void blink() //改变LED的状态,如果是LOW,则改为HIGH,反之亦然
{
state = !state;
}

http://docs.platformio.org/en/latest/faq.html#convert-arduino-file-to-c-manually