本文整理汇总了C++中MicoGpioInitialize函数的典型用法代码示例。如果您正苦于以下问题:C++ MicoGpioInitialize函数的具体用法?C++ MicoGpioInitialize怎么用?C++ MicoGpioInitialize使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MicoGpioInitialize函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init_platform
void init_platform( void )
{
button_init_t init;
MicoGpioInitialize( (mico_gpio_t)MICO_SYS_LED, OUTPUT_PUSH_PULL );
MicoGpioOutputLow( (mico_gpio_t)MICO_SYS_LED );
MicoGpioInitialize( (mico_gpio_t)MICO_RF_LED, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioOutputHigh( (mico_gpio_t)MICO_RF_LED );
MicoGpioInitialize((mico_gpio_t)BOOT_SEL, INPUT_PULL_UP);
MicoGpioInitialize((mico_gpio_t)MFG_SEL, INPUT_PULL_UP);
init.gpio = EasyLink_BUTTON;
init.pressed_func = PlatformEasyLinkButtonClickedCallback;
init.long_pressed_func = PlatformEasyLinkButtonLongPressedCallback;
init.long_pressed_timeout = 5000;
button_init( IOBUTTON_EASYLINK, init );
#ifdef USE_MiCOKit_EXT
dc_motor_init( );
dc_motor_set( 0 );
rgb_led_init();
rgb_led_open(0, 0, 0);
#endif
}
示例2: init_platform
void init_platform( void )
{
MicoGpioInitialize( (mico_gpio_t)MICO_SYS_LED, OUTPUT_PUSH_PULL );
MicoGpioOutputLow( (mico_gpio_t)MICO_SYS_LED );
MicoGpioInitialize( (mico_gpio_t)MICO_RF_LED, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioOutputHigh( (mico_gpio_t)MICO_RF_LED );
// MicoGpioInitialize((mico_gpio_t)BOOT_SEL, INPUT_PULL_UP);
//MicoGpioInitialize((mico_gpio_t)MFG_SEL, INPUT_PULL_UP);
// Initialise EasyLink buttons
MicoGpioInitialize( (mico_gpio_t)EasyLink_BUTTON, INPUT_PULL_UP );
mico_init_timer(&_button_EL_timer, RestoreDefault_TimeOut, _button_EL_Timeout_handler, NULL);
MicoGpioEnableIRQ( (mico_gpio_t)EasyLink_BUTTON, IRQ_TRIGGER_BOTH_EDGES, _button_EL_irq_handler, NULL );
//MicoFlashInitialize( MICO_SPI_FLASH );
#ifdef USE_MiCOKit_EXT
dc_motor_init( );
dc_motor_set( 0 );
rgb_led_init();
rgb_led_open(0, 0, 0);
#endif
}
示例3: PinInitForUsart
static void PinInitForUsart(void)
{
MicoGpioInitialize(CONTROLLERBUS_PIN_MISO, INPUT_HIGH_IMPEDANCE);
MicoGpioInitialize(CONTROLLERBUS_PIN_MOSI, INPUT_HIGH_IMPEDANCE);
MicoGpioInitialize(CONTROLLERBUS_PIN_SCK, INPUT_HIGH_IMPEDANCE);
MicoGpioInitialize(CONTROLLERBUS_PIN_NSS, INPUT_HIGH_IMPEDANCE);
}
示例4: host_enable_oob_interrupt
OSStatus host_enable_oob_interrupt( void )
{
/* Set GPIO_B[1:0] to input. One of them will be re-purposed as OOB interrupt */
MicoGpioInitialize( (mico_gpio_t)WL_GPIO0, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioInitialize( (mico_gpio_t)WL_GPIO1, INPUT_HIGH_IMPEDANCE );
//MicoGpioEnableIRQ( (mico_gpio_t)WL_GPIO1, IRQ_TRIGGER_RISING_EDGE, sdio_oob_irq_handler, 0 );
return kNoErr;
}
示例5: init_platform_bootloader
void init_platform_bootloader( void )
{
MicoGpioInitialize( (mico_gpio_t)MICO_SYS_LED, OUTPUT_PUSH_PULL );
MicoGpioOutputHigh( (mico_gpio_t)MICO_SYS_LED );
MicoGpioInitialize( (mico_gpio_t)MICO_RF_LED, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioOutputHigh( (mico_gpio_t)MICO_RF_LED );
MicoGpioInitialize((mico_gpio_t)BOOT_SEL, INPUT_PULL_UP);
MicoGpioInitialize((mico_gpio_t)MFG_SEL, INPUT_HIGH_IMPEDANCE);
}
示例6: host_platform_deinit
OSStatus host_platform_deinit( void )
{
MicoGpioInitialize((mico_gpio_t)WL_RESET, OUTPUT_PUSH_PULL);
host_platform_reset_wifi( true ); /* Stop wifi chip in reset */
MicoGpioInitialize((mico_gpio_t)WL_REG, OUTPUT_PUSH_PULL);
host_platform_power_wifi( false ); /* Stop wifi chip with regulators off */
platform_reset_wlan_powersave_clock( );
return kNoErr;
}
示例7: rgb_led_init
void rgb_led_init(void)
{
#ifdef USE_RGB_LED_DRIVER_P9813
MicoGpioInitialize( (mico_gpio_t)P9813_CIN, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioInitialize( (mico_gpio_t)P9813_DIN, OUTPUT_OPEN_DRAIN_NO_PULL );
#elif USE_RGB_LED_DRIVER_PWM
rgb_led_log("Unimplemented");
#else
#error LED driver function is not defined in platform.h
#endif
}
示例8: init_platform_bootloader
void init_platform_bootloader( void )
{
OSStatus err = kNoErr;
MicoGpioInitialize( (mico_gpio_t)MICO_SYS_LED, OUTPUT_PUSH_PULL );
MicoGpioOutputLow( (mico_gpio_t)MICO_SYS_LED );
MicoGpioInitialize( (mico_gpio_t)MICO_RF_LED, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioOutputHigh( (mico_gpio_t)MICO_RF_LED );
MicoGpioInitialize((mico_gpio_t)BOOT_SEL, INPUT_PULL_UP);
MicoGpioInitialize((mico_gpio_t)MFG_SEL, INPUT_PULL_UP);
}
示例9: init_platform_bootloader
void init_platform_bootloader( void )
{
MicoGpioInitialize( MICO_SYS_LED, OUTPUT_PUSH_PULL );
MicoGpioOutputHigh( MICO_SYS_LED );
MicoGpioInitialize( MICO_RF_LED, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioOutputHigh( MICO_RF_LED );
MicoGpioInitialize(BOOT_SEL, INPUT_PULL_UP);
MicoGpioInitialize(MFG_SEL, INPUT_PULL_UP);
#if defined ( USE_MICO_SPI_FLASH )
MicoFlashInitialize( MICO_SPI_FLASH );
#endif
}
示例10: init_platform
void init_platform( void )
{
MicoGpioInitialize( (mico_gpio_t)MICO_SYS_LED, OUTPUT_PUSH_PULL );
MicoGpioOutputLow( (mico_gpio_t)MICO_SYS_LED );
MicoGpioInitialize( (mico_gpio_t)MICO_RF_LED, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioOutputHigh( (mico_gpio_t)MICO_RF_LED );
MicoGpioInitialize((mico_gpio_t)BOOT_SEL, INPUT_PULL_UP);
MicoGpioInitialize((mico_gpio_t)MFG_SEL, INPUT_PULL_UP);
// Initialise EasyLink buttons
MicoGpioInitialize( (mico_gpio_t)EasyLink_BUTTON, INPUT_PULL_UP );
mico_init_timer(&_button_EL_timer, RestoreDefault_TimeOut, _button_EL_Timeout_handler, NULL);
MicoGpioEnableIRQ( (mico_gpio_t)EasyLink_BUTTON, IRQ_TRIGGER_BOTH_EDGES, _button_EL_irq_handler, NULL );
}
示例11: init_platform
void init_platform( void )
{
MicoGpioInitialize( MICO_SYS_LED, OUTPUT_PUSH_PULL );
MicoGpioOutputHigh( MICO_SYS_LED );
MicoGpioInitialize( MICO_RF_LED, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioOutputHigh( MICO_RF_LED );
//
// Initialise EasyLink buttons
MicoGpioInitialize( EasyLink_BUTTON, INPUT_PULL_UP );
mico_init_timer(&_button_EL_timer, RestoreDefault_TimeOut, _button_EL_Timeout_handler, NULL);
MicoGpioEnableIRQ( EasyLink_BUTTON, IRQ_TRIGGER_FALLING_EDGE, _button_EL_irq_handler, NULL );
#if defined ( USE_MICO_SPI_FLASH )
MicoFlashInitialize( MICO_SPI_FLASH );
#endif
}
示例12: rgb_led_init
/*------------------------------- user interfaces ----------------------------*/
void rgb_led_init(void)
{
#ifndef RGB_LED_USE_I2C
MicoGpioInitialize( (mico_gpio_t)RGB_LED_CIN, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioInitialize( (mico_gpio_t)RGB_LED_DIN, OUTPUT_OPEN_DRAIN_NO_PULL );
#else
// just use i2c sck && sda to send data to control p9813
OSStatus err = kUnknownErr;
err = MicoI2cInitialize(&p9813_i2c_device);
//require_noerr_action( err, exit, bme280_log("ERROR: MicoI2cInitialize err = %d.", err) );
#endif
}
示例13: platform_reset_wlan_powersave_clock
static OSStatus platform_reset_wlan_powersave_clock( void )
{
/* Tie the pin to ground */
MicoGpioInitialize( (mico_gpio_t) MICO_GPIO_WLAN_POWERSAVE_CLOCK, OUTPUT_PUSH_PULL );
MicoGpioOutputLow( (mico_gpio_t) MICO_GPIO_WLAN_POWERSAVE_CLOCK );
return kNoErr;
}
示例14: init_platform_bootloader
void init_platform_bootloader( void )
{
MicoGpioInitialize( MICO_SYS_LED, OUTPUT_PUSH_PULL );
MicoGpioOutputHigh( MICO_SYS_LED );
MicoGpioInitialize( MICO_RF_LED, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioOutputHigh( MICO_RF_LED );
MicoGpioInitialize(BOOT_SEL, INPUT_PULL_UP);
MicoGpioInitialize(MFG_SEL, INPUT_PULL_UP);
#ifdef USE_MiCOKit_EXT
MicoGpioInitialize( Arduino_D9, OUTPUT_PUSH_PULL );
MicoGpioOutputLow( Arduino_D9 );
#endif
}
示例15: init_platform
void init_platform( void )
{
button_init_t init;
MicoGpioInitialize( MICO_SYS_LED, OUTPUT_PUSH_PULL );
MicoGpioOutputHigh( MICO_SYS_LED );
MicoGpioInitialize( MICO_RF_LED, OUTPUT_OPEN_DRAIN_NO_PULL );
MicoGpioOutputHigh( MICO_RF_LED );
//Initialise EasyLink buttons
init.gpio = EasyLink_BUTTON;
init.pressed_func = PlatformEasyLinkButtonClickedCallback;
init.long_pressed_func = PlatformEasyLinkButtonLongPressedCallback;
init.long_pressed_timeout = 5000;
button_init( IOBUTTON_EASYLINK, init );
}