当前位置: 首页>>代码示例>>C++>>正文


C++ MicoGpioOutputHigh函数代码示例

本文整理汇总了C++中MicoGpioOutputHigh函数的典型用法代码示例。如果您正苦于以下问题:C++ MicoGpioOutputHigh函数的具体用法?C++ MicoGpioOutputHigh怎么用?C++ MicoGpioOutputHigh使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了MicoGpioOutputHigh函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: MicoSysLed

void MicoSysLed(bool onoff)
{
  if (onoff) {
    MicoGpioOutputLow( (mico_gpio_t)MICO_SYS_LED );
  } else {
    MicoGpioOutputHigh( (mico_gpio_t)MICO_SYS_LED );
  }
}
开发者ID:OfficeKit,项目名称:OfficeKit_Embed_MiCO,代码行数:8,代码来源:platform.c

示例2: 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 );
}
开发者ID:robbie-cao,项目名称:MiCO,代码行数:17,代码来源:platform.c

示例3: setLightState_command

void setLightState_command(char *property, mico_Context_t * const inContext)
{
  if(0==strcmp(property, "light 0")){
    MicoGpioOutputLow( (mico_gpio_t)MICO_SYS_LED );
  }else if(0==strcmp(property, "light 1")){
    MicoGpioOutputHigh( (mico_gpio_t)MICO_SYS_LED );
  }
}
开发者ID:HargicStudio,项目名称:SmartCup_MiCOKit_v2.4.0.0,代码行数:8,代码来源:acaapp.c

示例4: init_platform

void init_platform( 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 );
  
  //  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 );
  
  //  Initialise Standby/wakeup switcher
  MicoGpioInitialize( (mico_gpio_t)Standby_SEL, INPUT_PULL_UP );
  MicoGpioEnableIRQ( (mico_gpio_t)Standby_SEL , IRQ_TRIGGER_FALLING_EDGE, _button_STANDBY_irq_handler, NULL);

  MicoFlashInitialize( MICO_SPI_FLASH );
}
开发者ID:ChinaAmada,项目名称:MICO,代码行数:18,代码来源:platform.c

示例5: ResetF411

void ResetF411(void)
{
    MicoGpioOutputLow(F411_RESET_PIN);
    mico_thread_msleep(100);
    MicoGpioOutputHigh(F411_RESET_PIN);
    mico_thread_msleep(100);

    AaSysLogPrint(LOGLEVEL_INF, "f411 rest done");
}
开发者ID:HargicStudio,项目名称:SmartCup_MiCOKit_v2.4.0.0,代码行数:9,代码来源:controllerBus.c

示例6: i2c_setup

//i2c.setup(id,pinSDA, pinSCL)
static int i2c_setup( lua_State* L )
{
  unsigned id =  luaL_checkinteger( L, 1 );
  unsigned sda = luaL_checkinteger( L, 2 );
  unsigned scl = luaL_checkinteger( L, 3 );
  if (id !=0) return luaL_error( L, "id should assigend 0" );
  MOD_CHECK_ID( gpio, sda );
  MOD_CHECK_ID( gpio, scl );
  pinSDA = wifimcu_gpio_map[sda];
  pinSCL = wifimcu_gpio_map[scl];
  
  MicoGpioFinalize((mico_gpio_t)pinSDA);
  MicoGpioInitialize((mico_gpio_t)pinSDA,(mico_gpio_config_t)OUTPUT_PUSH_PULL);  
  MicoGpioOutputHigh( (mico_gpio_t)pinSDA);
  MicoGpioFinalize((mico_gpio_t)pinSCL);
  MicoGpioInitialize((mico_gpio_t)pinSCL,(mico_gpio_config_t)OUTPUT_PUSH_PULL);  
  MicoGpioOutputHigh( (mico_gpio_t)pinSCL);
  return 0;
}
开发者ID:SmartArduino,项目名称:MICO-1,代码行数:20,代码来源:i2c.c

示例7: init_platform_bootloader

void init_platform_bootloader( 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_HIGH_IMPEDANCE);
}
开发者ID:JACK847070222,项目名称:MICO,代码行数:10,代码来源:platform.c

示例8: host_platform_reset_wifi

void host_platform_reset_wifi( bool reset_asserted )
{
  if ( reset_asserted == true )
  {
    MicoGpioOutputLow( (mico_gpio_t)WL_RESET );  
  }
  else
  {
    MicoGpioOutputHigh( (mico_gpio_t)WL_RESET ); 
  }
}
开发者ID:ChinaAmada,项目名称:MICO,代码行数:11,代码来源:platform.c

示例9: host_platform_power_wifi

void host_platform_power_wifi( bool power_enabled )
{
  if ( power_enabled == true )
  {
    MicoGpioOutputLow( (mico_gpio_t)WL_REG );
  }
  else
  {
    MicoGpioOutputHigh( (mico_gpio_t)WL_REG ); 
  }
}
开发者ID:ChinaAmada,项目名称:MICO,代码行数:11,代码来源:platform.c

示例10: 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);
}
开发者ID:hujg,项目名称:mico_v2.2.0,代码行数:12,代码来源:platform.c

示例11: 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 );
}
开发者ID:HargicStudio,项目名称:SmartCup_MiCOKit_v2.4.0.0,代码行数:15,代码来源:platform.c

示例12: 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 );

    //  Initialise EasyLink buttons
    MicoGpioInitialize( (mico_gpio_t)EasyLink_BUTTON, INPUT_HIGH_IMPEDANCE );
    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 );

#ifdef USE_MiCOKit_EXT
    dc_motor_init( );
    dc_motor_set( 0 );
#endif
}
开发者ID:EmuxEvans,项目名称:SDK_MiCOKit_v2.3.0.2,代码行数:17,代码来源:platform.c

示例13: init_platform_bootloader

void init_platform_bootloader( 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_HIGH_IMPEDANCE);

#ifdef USE_MiCOKit_EXT
    dc_motor_init( );
    dc_motor_set( 0 );

    rgb_led_init();
    rgb_led_open(0, 0, 0);
#endif
}
开发者ID:EmuxEvans,项目名称:SDK_MiCOKit_v2.3.0.2,代码行数:18,代码来源:platform.c

示例14: mico_system_delegate_config_will_stop

void mico_system_delegate_config_will_stop( void )
{
  config_delegate_log_trace();
#ifdef USE_MiCOKit_EXT
  char oled_show_line[OLED_DISPLAY_MAX_CHAR_PER_ROW+1] = {'\0'};
#endif

  mico_stop_timer(&_Led_EL_timer);
  mico_deinit_timer( &_Led_EL_timer );
  MicoGpioOutputHigh((mico_gpio_t)MICO_SYS_LED);
  
#ifdef USE_MiCOKit_EXT
  memset(oled_show_line, '\0', OLED_DISPLAY_MAX_CHAR_PER_ROW+1);
  snprintf(oled_show_line, OLED_DISPLAY_MAX_CHAR_PER_ROW+1, "%s", (uint8_t*)"Config          ");
  OLED_ShowString(OLED_DISPLAY_COLUMN_START, OLED_DISPLAY_ROW_2, (uint8_t*)oled_show_line);
  OLED_ShowString(OLED_DISPLAY_COLUMN_START, OLED_DISPLAY_ROW_3, (uint8_t*)"    Stop.       ");
  OLED_ShowString(OLED_DISPLAY_COLUMN_START, OLED_DISPLAY_ROW_4, (uint8_t*)"                ");
#endif
  
  return;
}
开发者ID:brucehelen,项目名称:MICO3288,代码行数:21,代码来源:MICOConfigDelegate.c

示例15: MicoSpiTransfer


//.........这里部分代码省略.........
    {
      spi_dma_config( spi, &segments[i] );
      result = spi_dma_transfer( spi );
      if ( result != kNoErr )
      {
        goto cleanup_transfer;
      }
    }
    else
    {
      /* in interrupt-less mode */
      if ( spi->bits == 8 )
      {
        const uint8_t* send_ptr = ( const uint8_t* )segments[i].tx_buffer;
        uint8_t*       rcv_ptr  = ( uint8_t* )segments[i].rx_buffer;
        count = segments[i].length;
        while ( count-- )
        {
          uint16_t data;
          if ( send_ptr != NULL )
          {
            data = *send_ptr;
            send_ptr++;
          }
          else
          {
            data = 0xFF;
          }
          
          /* Wait until the transmit buffer is empty */
          while ( SPI_I2S_GetFlagStatus( spi_mapping[spi->port].spi_regs, SPI_I2S_FLAG_TXE ) == RESET )
          {}
          
          /* Send the byte */
          SPI_I2S_SendData( spi_mapping[spi->port].spi_regs, data );
          
          /* Wait until a data is received */
          while ( SPI_I2S_GetFlagStatus( spi_mapping[spi->port].spi_regs, SPI_I2S_FLAG_RXNE ) == RESET )
          {}
          
          /* Get the received data */
          data = SPI_I2S_ReceiveData( spi_mapping[spi->port].spi_regs );
          
          if ( rcv_ptr != NULL )
          {
            *rcv_ptr++ = (uint8_t)data;
          }
        }
      }
      else if ( spi->bits == 16 )
      {
        const uint16_t* send_ptr = (const uint16_t *) segments[i].tx_buffer;
        uint16_t*       rcv_ptr  = (uint16_t *) segments[i].rx_buffer;
        
        /* Check that the message length is a multiple of 2 */
        if ( ( count % 2 ) == 0 )
        {
          result = kGeneralErr;
          goto cleanup_transfer;
        }
        
        while ( count != 0)
        {
          uint16_t data = 0xFFFF;
          count -= 2;
          
          if ( send_ptr != NULL )
          {
            data = *send_ptr++;
          }
          
          /* Wait until the transmit buffer is empty */
          while ( SPI_I2S_GetFlagStatus( spi_mapping[spi->port].spi_regs, SPI_I2S_FLAG_TXE ) == RESET )
          {}
          
          /* Send the byte */
          SPI_I2S_SendData( spi_mapping[spi->port].spi_regs, data );
          
          /* Wait until a data is received */
          while ( SPI_I2S_GetFlagStatus( spi_mapping[spi->port].spi_regs, SPI_I2S_FLAG_RXNE ) == RESET )
          {}
          
          /* Get the received data */
          data = SPI_I2S_ReceiveData( spi_mapping[spi->port].spi_regs );
          
          if ( rcv_ptr != NULL )
          {
            *rcv_ptr++ = data;
          }
        }
      }
    }
  }
cleanup_transfer:
  MicoGpioOutputHigh(spi->chip_select);
  
  MicoMcuPowerSaveConfig(true);
  
  return result;
}
开发者ID:agb861,项目名称:STM32F,代码行数:101,代码来源:MicoDriverSpi.c


注:本文中的MicoGpioOutputHigh函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。