• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ergodox_right_led_3_off函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: dance_flsh_each

void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
    if (!skip_leds) {
        ergodox_board_led_off();
        ergodox_right_led_1_off();
        ergodox_right_led_2_off();
        ergodox_right_led_3_off();
        skip_leds = true;
    }
    switch (state->count) {
        case 1:
            ergodox_right_led_1_on();
            break;
        case 2:
            ergodox_right_led_2_on();
            break;
        case 3:
            ergodox_right_led_3_on();
            break;
        case 4:
            ergodox_right_led_1_off();
            _delay_ms(50);
            ergodox_right_led_2_off();
            _delay_ms(50);
            ergodox_right_led_3_off();

    }
}
开发者ID:berfarah,项目名称:qmk_firmware,代码行数:27,代码来源:keymap.c


示例2: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {

    uint8_t layer = biton32(layer_state);

    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
    switch (layer) {
      // TODO: Make this relevant to the ErgoDox EZ.
        case 1:
            ergodox_right_led_3_on();
            break;
        case 2:
            ergodox_right_led_2_on();
            break;
        case 3:
            ergodox_right_led_2_on();
            ergodox_right_led_3_on();
            break;
        default:
            // none
            break;
    }

    if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
        // if capslk is on, set led 1 on
        ergodox_right_led_1_on();
    } else {
        ergodox_right_led_1_off();
    }

};
开发者ID:0tsuki,项目名称:qmk_firmware,代码行数:34,代码来源:keymap.c


示例3: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void)
{
    uint8_t layer = biton32(layer_state);

    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
    switch (layer) {
        case FMU:
            ergodox_right_led_1_on();
        break;
        case PMQ:
            ergodox_right_led_2_on();
        break;
        case PMN:
            ergodox_right_led_3_on();
        break;
        default:
            if(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) {
                ergodox_led_all_set(LED_BRIGHTNESS_HI);
                ergodox_right_led_1_on();
            }
            else {
                ergodox_board_led_off();
            }
        break;
    }

};
开发者ID:sriehl,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c


示例4: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
  uint8_t layer = biton32(layer_state);

  // Dim the LEDs as much as possible
  ergodox_led_all_set(0);

  // Show the active layer number as binary bits in the LEDs.
  // Note that LED1 is left-most, so bit1 -> LED3 and bit3 -> LED1
  if (layer & 0b001) {
    ergodox_right_led_3_on();
  } else {
    ergodox_right_led_3_off();
  }
  if (layer & 0b010) {
    ergodox_right_led_2_on();
  } else {
    ergodox_right_led_2_off();
  }

  // Show caps lock on the left most LED.
  // (Double-tap left shift to toggle caps lock)
  if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) {
    ergodox_right_led_1_on();
  } else {
    ergodox_right_led_1_off();
  }
}
开发者ID:wez,项目名称:qmk_firmware,代码行数:28,代码来源:keymap.c


示例5: matrix_scan_keymap

void matrix_scan_keymap(void) {  // runs frequently to update info
  uint8_t modifiers = get_mods();
  uint8_t led_usb_state = host_keyboard_leds();
  uint8_t one_shot = get_oneshot_mods();

  if (!skip_leds) {
    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();

    // Since we're not using the LEDs here for layer indication anymore,
    // then lets use them for modifier indicators.  Shame we don't have 4...
    // Also, no "else", since we want to know each, independently.
    if ( ( modifiers | one_shot ) & MOD_MASK_SHIFT || led_usb_state & (1<<USB_LED_CAPS_LOCK) ) {
      ergodox_right_led_2_on();
      ergodox_right_led_2_set( 50 );
    }
    if ( ( modifiers | one_shot ) & MOD_MASK_CTRL) {
      ergodox_right_led_1_on();
      ergodox_right_led_1_set( 10 );
    }
    if ( ( modifiers | one_shot ) & MOD_MASK_ALT) {
      ergodox_right_led_3_on();
      ergodox_right_led_3_set( 10 );
    }

  }

};
开发者ID:UnderSampled,项目名称:qmk_firmware,代码行数:30,代码来源:keymap.c


示例6: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {

    uint8_t layer = biton32(layer_state);

    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
    switch (layer) {
      // TODO: Make this relevant to the ErgoDox EZ.
        case DVORAK:
            ergodox_right_led_1_on();
            break;
        case COLEMAK:
            ergodox_right_led_2_on();
            break;
        case QWERTY:
            ergodox_right_led_3_on();
            break;
        case FN:
            ergodox_led_all_on();
            break;
        default:
            // none
            break;
    }

};
开发者ID:CastellaFactory,项目名称:qmk_firmware,代码行数:29,代码来源:keymap.c


示例7: flash_dance_reset

void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) {
  ergodox_right_led_1_off();
  wait_ms(50);
  ergodox_right_led_2_off();
  wait_ms(50);
  ergodox_right_led_3_off();
}
开发者ID:0tsuki,项目名称:qmk_firmware,代码行数:7,代码来源:keymap.c


示例8: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {

    uint8_t layer = biton32(layer_state);

    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
    switch (layer) {
        case 1:
            ergodox_right_led_3_on();
            break;
        case 2:
            ergodox_right_led_2_on();
            break;
        case 3:
            ergodox_right_led_1_on();
            ergodox_right_led_2_on();
            ergodox_right_led_3_on();
            break;
        default:
            // none
            break;
    }
    
    // Turn the caps lock led on
    if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
        ergodox_right_led_1_on();
    }

}
开发者ID:johgh,项目名称:keyboard,代码行数:32,代码来源:keymap.c


示例9: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();

    switch (td_led_override) {
    case 1:
        ergodox_right_led_1_on();
        break;
    case 2:
        ergodox_right_led_2_on();
        break;
    default:
        // Layer 1 and 2 are both overlay layers, so they could both be on. This
        // means we can't use the lazy check of checking for the first significant
        // bit.
        if (LAYER_ON(SYMB)) {
            ergodox_right_led_1_on();
        }
        if (LAYER_ON(NUMP)) {
            ergodox_right_led_2_on();
        }
    }
};
开发者ID:Talljoe,项目名称:qmk_firmware,代码行数:26,代码来源:keymap.c


示例10: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {

  uint8_t layer = biton32(layer_state);

  ergodox_board_led_off();
  ergodox_right_led_1_off();
  ergodox_right_led_2_off();
  ergodox_right_led_3_off();
  switch (layer) {
    case 1:
      ergodox_right_led_1_on();
      break;
    case 2:
      ergodox_right_led_2_on();
      break;
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
    case 3:
      ergodox_right_led_3_on();
      break;
#endif
    default:
      // none
      break;
  }

};
开发者ID:ScrelliCopter,项目名称:qmk_firmware,代码行数:27,代码来源:keymap.c


示例11: matrix_scan_user

// Runs constantly in the background, in a loop.
void * matrix_scan_user(void) {

    uint8_t layer = biton32(layer_state);

    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
    switch (layer) {
    case 1:
      ergodox_right_led_1_on();
      break;
    case 2:
      ergodox_right_led_2_on();
      break;
    case 3:
      ergodox_right_led_3_on();
      break;
    case 4:
      ergodox_right_led_1_on(); // TODO: Make a fourth layer
      ergodox_right_led_3_on();
      break;
    default:
      // none
      break;
    }

};
开发者ID:deadcyclo,项目名称:qmk_firmware,代码行数:29,代码来源:keymap.c


示例12: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {

    uint8_t layer = biton32(layer_state);

    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
    switch (layer) {
      // TODO: Make this relevant to the ErgoDox EZ.
        case 1:
            ergodox_right_led_1_on();
            break;
        case 2:
            ergodox_right_led_2_on();
            break;
        case 3:
            ergodox_right_led_3_on();
            break;
        case 4:
            ergodox_right_led_1_on();
            ergodox_right_led_2_on();
            break;
        default:
            // none
            break;
    }
};
开发者ID:0xdec,项目名称:qmk_firmware,代码行数:29,代码来源:keymap.c


示例13: matrix_scan_keymap

void matrix_scan_keymap(void) {  // runs frequently to update info
  uint8_t modifiders = get_mods();

  if (!skip_leds) {
    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();

    // Since we're not using the LEDs here for layer indication anymore,
    // then lets use them for modifier indicators.  Shame we don't have 4...
    // Also, no "else", since we want to know each, independantly. 
    if (modifiders & MODS_SHIFT_MASK) {
      ergodox_right_led_2_on();
    }
    if (modifiders & MODS_CTRL_MASK) {
      ergodox_right_led_1_on();
    }
    if (modifiders & MODS_ALT_MASK) {
      ergodox_right_led_3_on();
    }

  }

};
开发者ID:Twey,项目名称:qmk_firmware,代码行数:25,代码来源:keymap.c


示例14: matrix_scan_user

void matrix_scan_user(void) {

    uint8_t layer = biton32(layer_state);

    ergodox_board_led_on();
    ergodox_led_all_on();

    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
   //    _delay_ms(45);

    switch (layer)
    {
    case _SYMBOLS:
      ergodox_right_led_1_on();
      break;
    case _MOUSE:
      ergodox_right_led_2_on();
      break;
    case _NUMPAD:
      ergodox_right_led_3_on();
      break;
    case _NAV:
      ergodox_right_led_1_on();
      ergodox_right_led_2_on();
      break;
    case _MACROS:
      //layer unused right now
      break;
    case _FUNCTION:
      //layer unused right nowex
      break;
    case _APPSWITCH:
      ergodox_right_led_2_on();
      ergodox_right_led_3_on();
      break;
    case _ONESHOT:
      ergodox_right_led_1_on();
      ergodox_right_led_2_on();
      ergodox_right_led_3_on();
      break;
    case _TEXTNAV:
      ergodox_right_led_1_on();
      ergodox_right_led_3_on();
      break;
    case _QWERTY_KIDS:
      ergodox_right_led_1_on();
      ergodox_right_led_2_on();
      ergodox_right_led_3_on();
      break;
    case _STREET_FIGHTER:
      ergodox_right_led_2_on();
      ergodox_right_led_3_on();
    default:
      break;
    }
};
开发者ID:Talljoe,项目名称:qmk_firmware,代码行数:59,代码来源:keymap.c


示例15: dance_flsh_reset

// if the flash state didnt happen, then turn off leds, left to right
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
    _delay_ms(200);
    ergodox_right_led_3_off();
    _delay_ms(200);
    ergodox_right_led_2_off();
    _delay_ms(200);
    ergodox_right_led_1_off();
    _delay_ms(500);
    skip_leds = false;
}
开发者ID:berfarah,项目名称:qmk_firmware,代码行数:11,代码来源:keymap.c


示例16: led_set_kb

void led_set_kb(uint8_t usb_led) {
    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
        // Turn capslock on
        ergodox_right_led_3_on();
    } else{
        // Turn capslock off
        ergodox_right_led_3_off();
	  }
	
};
开发者ID:robotmaxtron,项目名称:qmk_firmware,代码行数:10,代码来源:keymap.c


示例17: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {

  uint8_t layer = biton32(layer_state);

  ergodox_board_led_off();
  ergodox_right_led_1_off();
  ergodox_right_led_2_off();
  ergodox_right_led_3_off();
  switch (layer) {
  case 1:
    ergodox_right_led_1_on();
    /* ergodox_left_led_1_on(); */
    break;
  case 2:
    ergodox_right_led_2_on();
    /* ergodox_left_led_2_on(); */
    break;
  case 3:
    ergodox_right_led_3_on();
    /* ergodox_left_led_3_on(); */
    break;
  case 4:
    ergodox_right_led_1_on();
    ergodox_right_led_2_on();
    /* ergodox_left_led_1_on(); */
    /* ergodox_left_led_2_on(); */
    break;
  case 5:
    ergodox_right_led_1_on();
    ergodox_right_led_3_on();
    /* ergodox_left_led_1_on(); */
    /* ergodox_left_led_3_on(); */
    break;
  case 6:
    ergodox_right_led_2_on();
    ergodox_right_led_3_on();
    /* ergodox_left_led_2_on(); */
    /* ergodox_left_led_3_on(); */
    break;
  case 7:
    ergodox_right_led_1_on();
    ergodox_right_led_2_on();
    ergodox_right_led_3_on();
    /* ergodox_left_led_1_on(); */
    /* ergodox_left_led_2_on(); */
    /* ergodox_left_led_3_on(); */
    break;
  default:
    break;
  }

};
开发者ID:styts,项目名称:dotfiles,代码行数:53,代码来源:keymap.c


示例18: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
  uint8_t layer = biton32(layer_state);

  ergodox_led_all_off();
  ergodox_led_all_set(LED_BRIGHTNESS_LO);

  switch (layer) {
  case BASE:
    current_layer = BASE;
    break;
  case KEYPAD:
    current_layer = KEYPAD;
    break;
  default:
    // none
    break;
  }

  // layer leds
  if (current_layer == KEYPAD) {
    ergodox_right_led_3_on();
  }

  // capslock
  if (host_keyboard_leds() & (3<<USB_LED_CAPS_LOCK)) {
    ergodox_right_led_1_on();
  }

  // Temporary leds

  // The function layer takes over other layers and we need to reflect that on the leds.
  // If the current layer is the BASE, we simply turn on the FN led, but if the current
  // layer is the KEYPAD, than we must turn it off before turning on the FN led.
  if (layer == FN && !has_oneshot_layer_timed_out()) {
    ergodox_right_led_3_off();
    ergodox_right_led_2_on();
  }

  // if the shifted is pressed I show the case led in a brighter color. This is nice to
  // differenciate the shift from the capslock.
  // Notice that I make sure that we're not using the shift on a chord shortcut (pressing
  // shift togather with other modifiers).
  if((keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) &&                                 // is shift pressed and there is no other
      !(keyboard_report->mods & (~MOD_BIT(KC_LSFT) & ~MOD_BIT(KC_RSFT)))) ||                           //    modifier being pressed as well
     (get_oneshot_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) && !has_oneshot_mods_timed_out())) {  // or the one shot shift didn't timed out
    ergodox_right_led_1_set(LED_BRIGHTNESS_HI);
    ergodox_right_led_1_on();
  }
};
开发者ID:GrandpaGhostTim,项目名称:qmk_firmware,代码行数:50,代码来源:keymap.c


示例19: ergodox_blink_all_leds

void ergodox_blink_all_leds(void)
{
    ergodox_led_all_off();
    ergodox_led_all_set(LED_BRIGHTNESS_HI);
    ergodox_right_led_1_on();
    _delay_ms(50);
    ergodox_right_led_2_on();
    _delay_ms(50);
    ergodox_right_led_3_on();
    _delay_ms(50);
    ergodox_right_led_1_off();
    _delay_ms(50);
    ergodox_right_led_2_off();
    _delay_ms(50);
    ergodox_right_led_3_off();
    //ergodox_led_all_on();
    //_delay_ms(333);
    ergodox_led_all_off();
}
开发者ID:0tsuki,项目名称:qmk_firmware,代码行数:19,代码来源:ergodone.c


示例20: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
  uint8_t layer = biton32(layer_state);
  ergodox_board_led_off();
  ergodox_right_led_1_off();
  ergodox_right_led_2_off();
  ergodox_right_led_3_off();
  switch (layer) {
    case SYMB:
      ergodox_right_led_1_on();
      break;
    case PLVR:
      ergodox_right_led_2_on();
      break;
    case ARRW:
      ergodox_right_led_3_on();
      break;
    default:
      break;
  }
};
开发者ID:Attsun1031,项目名称:qmk_firmware,代码行数:21,代码来源:keymap.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ erl_exit函数代码示例发布时间:2022-05-30
下一篇:
C++ ergodox_right_led_2_on函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap