Statistics: Posted by sasdf — Thu Aug 04, 2016 1:02 pm
Statistics: Posted by ESP_Rubin — Thu Aug 04, 2016 11:15 am
Code:
SDK ver: 2.0.0(656edbf) compiled @ Jul 19 2016 17:58:40
phy ver: 1055, pp ver: 10.2
Code:
#include "hw_timer.c"
#include "gpio.h"
uint8_t ledStatus;
void hw_test_timer_cb(void){
ledStatus = !ledStatus;
GPIO_OUTPUT_SET(2, ledStatus);
}
void ICACHE_FLASH_ATTR user_init(void)
{
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);
PIN_PULLUP_EN(PERIPHS_IO_MUX_GPIO2_U);
ledStatus = 0;
hw_timer_init(NMI_SOURCE, 1);
hw_timer_set_func(hw_test_timer_cb);
hw_timer_arm(2000000);
}
Statistics: Posted by sasdf — Thu Aug 04, 2016 3:31 am