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

C++ ergodox_right_led_1_off函数代码示例

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

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



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

示例1: 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


示例2: matrix_scan_user

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

   if(layer == 1)
   {
      ergodox_right_led_2_on();
      ergodox_right_led_3_on();

      ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
      ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
   }

   if(capsOn)
   {
      ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
      ergodox_right_led_1_on ();
   }

  if(keyboard_report->mods & MOD_BIT(KC_LSFT))
  { 
      ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
      ergodox_right_led_1_on ();
  } else {
      ergodox_right_led_1_set (LED_BRIGHTNESS_LO);

      if(!capsOn)
      {
        ergodox_right_led_1_off ();
      }
  }

  if(keyboard_report->mods & MOD_BIT(KC_LALT))
  {
      ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
      ergodox_right_led_2_on ();
  } else {
      ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
     if(layer != 1)
     {
       ergodox_right_led_2_off ();
     }
  }

  if(keyboard_report->mods & MOD_BIT(KC_LCTRL))
  { 
      ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
      ergodox_right_led_3_on ();
  } else {
      ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
     if(layer != 1)
     {
       ergodox_right_led_3_off ();
     }
  }
};
开发者ID:0xdec,项目名称:qmk_firmware,代码行数:56,代码来源: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 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


示例4: matrix_scan_user

// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
    uint32_t layer0 = layer_state & (1UL << 0),
             layer1 = layer_state & (1UL << 1),
             layer2 = layer_state & (1UL << 2),
             layer3 = layer_state & (1UL << 3);    

    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();

    if (layer1) ergodox_right_led_1_on();
    if (layer2) ergodox_right_led_2_on();
    if (layer3) ergodox_right_led_3_on();
};
开发者ID:CastellaFactory,项目名称:qmk_firmware,代码行数:16,代码来源:keymap.c


示例5: matrix_scan_user

// light up leds based on the layer
void matrix_scan_user(void) {
  uint8_t layer = biton32(layer_state);

  switch(layer) {
  case SYSCTL:
    ergodox_right_led_3_on();
    break;
  case MOUSE:
    ergodox_right_led_2_on();
    break;
  default:
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
    break;
  }
}
开发者ID:0tsuki,项目名称:qmk_firmware,代码行数:18,代码来源:keymap.c


示例6: 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


示例7: 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();
    switch (layer) {
        case 1:
            ergodox_right_led_1_on();
            break;
        case 2:
            ergodox_right_led_2_on();
            break;
        default:
            // none
            break;
		   }
};
开发者ID:robotmaxtron,项目名称:qmk_firmware,代码行数:20,代码来源: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 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


示例9: flash_each_tap

// flash keyboard on 4x tap, with leds
void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) {
  switch (state->count) {
  case 1:
    ergodox_right_led_3_on();
    break;
  case 2:
    ergodox_right_led_2_on();
    break;
  case 3:
    ergodox_right_led_1_on();
    break;
  case 4:
    ergodox_right_led_3_off();
    wait_ms(50);
    ergodox_right_led_2_off();
    wait_ms(50);
    ergodox_right_led_1_off();
    break;
  }
}
开发者ID:0tsuki,项目名称:qmk_firmware,代码行数:21,代码来源: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) {
    // TODO: Make this relevant to the ErgoDox EZ.
    case 1:
      ergodox_right_led_1_on();
      break;
    case 2:
      ergodox_right_led_2_on();
      break;
    default:
      // none
      break;
  }

  LEADER_DICTIONARY() {
    leading = false;
    leader_end();

    SEQ_ONE_KEY(KC_W) {
      register_code(KC_LALT);
      register_code(KC_F4);
      unregister_code(KC_F4);
      unregister_code(KC_LALT);
    }
    SEQ_ONE_KEY(KC_O) {
      register_code(KC_LCTL);
      register_code(KC_LSFT);
      register_code(KC_O);
      unregister_code(KC_O);
      unregister_code(KC_LSFT);
      unregister_code(KC_LCTL);
    }
  }
}
开发者ID:JK40,项目名称:qmk_firmware,代码行数:42,代码来源: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) {
      // TODO: Make this relevant to the ErgoDox EZ.
        case SYMB:
            ergodox_right_led_1_on();
            break;
        case MACR:
            ergodox_right_led_2_on();
            break;
        default:
            // none
            break;
    }
};
开发者ID:2k0ri,项目名称:qmk_firmware,代码行数:22,代码来源:keymap.c


示例12: process_record_user

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
    switch (keycode) {
      case VRSN:
        if (record->event.pressed) {
          SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
        }
        return false;
        break;
      case QWRTY:
        if (record->event.pressed) {
          set_single_persistent_default_layer(QWERTY);
        }
        return false;
        break;
      case CLMK:
        if (record->event.pressed) {
          set_single_persistent_default_layer(COLEMAK);
        }
        return false;
        break;
      case KC_CAPS:
        if (record->event.pressed) {
          // Turn LED1 On/Off for Caps Lock
          if (CAPS_LED) {
            ergodox_right_led_1_off();
            CAPS_LED = false;
          } else {
            ergodox_right_led_1_on();
            CAPS_LED = true;
          }
        }
        return true;
        break;
    }
    return true;
};
开发者ID:Talljoe,项目名称:qmk_firmware,代码行数:36,代码来源:keymap.c


示例13: 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:
            ergodox_board_led_off();
        break;
    }

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


示例14: matrix_scan_user

void matrix_scan_user(void)
{

  uint8_t layer = biton32(layer_state);

  if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
      ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) &&
       !has_oneshot_mods_timed_out()))
  {
    ergodox_right_led_1_set(LED_BRIGHTNESS_HI);
    ergodox_right_led_1_on();
  }
  else if (layer == RAISE || layer == AUX)
  {
    ergodox_right_led_1_set(LED_BRIGHTNESS_LO);
    ergodox_right_led_1_on();
  }
  else
  {
    ergodox_right_led_1_off();
  }

  if (keyboard_report->mods & MOD_BIT(KC_LCTL) ||
      ((get_oneshot_mods() & MOD_BIT(KC_LCTL)) &&
       !has_oneshot_mods_timed_out()))
  {
    ergodox_right_led_2_set(LED_BRIGHTNESS_HI);
    ergodox_right_led_2_on();
  }
  else if (layer == LOWER || layer == AUX)
  {
    ergodox_right_led_2_set(LED_BRIGHTNESS_LO);
    ergodox_right_led_2_on();
  }
  else
  {
    ergodox_right_led_2_off();
  }

  if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
      ((get_oneshot_mods() & MOD_BIT(KC_LALT)) &&
       !has_oneshot_mods_timed_out()))
  {
    ergodox_right_led_3_set(LED_BRIGHTNESS_HI);
    ergodox_right_led_3_on();
  }
  else if (layer == COLE || layer == AUX)
  {
    ergodox_right_led_3_set(LED_BRIGHTNESS_LO);
    ergodox_right_led_3_on();
  }
  else
  {
    ergodox_right_led_3_off();
  }

  LEADER_DICTIONARY()
  {
    leading = false;
    leader_end();

    SEQ_THREE_KEYS(KC_W, KC_I, KC_N) { os_type = OS_WIN; };
    SEQ_THREE_KEYS(KC_O, KC_S, KC_X) { os_type = OS_OSX; };
    SEQ_THREE_KEYS(KC_L, KC_I, KC_N) { os_type = OS_LIN; };

    SEQ_ONE_KEY(KC_A)
    {
      switch (os_type)
      {
      case OS_WIN:
        tap(KC_NLCK);
        register_code(KC_RALT);
        tap(KC_KP_0);
        tap(KC_KP_2);
        tap(KC_KP_2);
        tap(KC_KP_8);
        unregister_code(KC_RALT);
        tap(KC_NLCK);
        break;
      case OS_OSX:
        register_code(KC_RALT);
        register_code(KC_RSFT);
        register_code(KC_SCLN);
        unregister_code(KC_SCLN);
        unregister_code(KC_RSFT);
        unregister_code(KC_RALT);
        tap(KC_A);
        break;
      case OS_LIN:
        tap(KC_RALT);
        tap(KC_DQT);
        tap(KC_A);
        break;
      }
    }
    SEQ_TWO_KEYS(KC_A, KC_A)
    {
      switch (os_type)
      {
      case OS_WIN:
//.........这里部分代码省略.........
开发者ID:berfarah,项目名称:qmk_firmware,代码行数:101,代码来源:keymap.c


示例15: layer_state_set_user

// Runs whenever there is a layer state change.
uint32_t layer_state_set_user(uint32_t state) {
  ergodox_board_led_off();
  ergodox_right_led_1_off();
  ergodox_right_led_2_off();
  ergodox_right_led_3_off();

  uint8_t layer = biton32(state);
  switch (layer) {
      case 0:
        #ifdef RGBLIGHT_COLOR_LAYER_0
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
        #else
        #ifdef RGBLIGHT_ENABLE
          rgblight_init();
        #endif
        #endif
        break;
      case 1:
        ergodox_right_led_1_on();
        #ifdef RGBLIGHT_COLOR_LAYER_1
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
        #endif
        break;
      case 2:
        ergodox_right_led_2_on();
        #ifdef RGBLIGHT_COLOR_LAYER_2
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
        #endif
        break;
      case 3:
        ergodox_right_led_3_on();
        #ifdef RGBLIGHT_COLOR_LAYER_3
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
        #endif
        break;
      case 4:
        ergodox_right_led_1_on();
        ergodox_right_led_2_on();
        #ifdef RGBLIGHT_COLOR_LAYER_4
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
        #endif
        break;
      case 5:
        ergodox_right_led_1_on();
        ergodox_right_led_3_on();
        #ifdef RGBLIGHT_COLOR_LAYER_5
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
        #endif
        break;
      case 6:
        ergodox_right_led_2_on();
        ergodox_right_led_3_on();
        #ifdef RGBLIGHT_COLOR_LAYER_6
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
        #endif
        break;
      case 7:
        ergodox_right_led_1_on();
        ergodox_right_led_2_on();
        ergodox_right_led_3_on();
        #ifdef RGBLIGHT_COLOR_LAYER_7
          rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
        #endif
        break;
      default:
        break;
    }

  return state;
};
开发者ID:rhysd,项目名称:dogfiles,代码行数:71,代码来源:keymap.c


示例16: led_1_off

void led_1_off(void) {
  ergodox_right_led_1_off();
}
开发者ID:0xdec,项目名称:qmk_firmware,代码行数:3,代码来源:keymap.c


示例17: matrix_init_user

// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
  ergodox_right_led_1_off();
  ergodox_right_led_2_off();
  ergodox_right_led_3_off();
};
开发者ID:0xdec,项目名称:qmk_firmware,代码行数:6,代码来源:keymap.c


示例18: matrix_scan

uint8_t matrix_scan(void)
{
    if (mcp23018_status) { // if there was an error
        if (++mcp23018_reset_loop == 0) {
            // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
            // this will be approx bit more frequent than once per second
            print("trying to reset mcp23018\n");
            mcp23018_status = init_mcp23018();
            if (mcp23018_status) {
                print("left side not responding\n");
            } else {
                print("left side attached\n");
                ergodox_blink_all_leds();
            }
        }
    }

#ifdef DEBUG_MATRIX_SCAN_RATE
    matrix_scan_count++;

    uint32_t timer_now = timer_read32();
    if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
        print("matrix scan frequency: ");
        pdec(matrix_scan_count);
        print("\n");

        matrix_timer = timer_now;
        matrix_scan_count = 0;
    }
#endif

#ifdef SHOW_LAYER_LEDS
    uint8_t layer = biton32(layer_state);

    // use the leds 2 and 3 to show which layer is currently active
    ergodox_board_led_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
    switch (layer) {
        case 0:
            // no leds
            break;
        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;
    }
#endif

#ifdef KEYMAP_CUB
    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:
            // no leds
            break;
        case 2:
            // blue
            ergodox_left_led_2_on();
            break;
        case 8:
            // blue and green
            ergodox_left_led_2_on();
            // break missed intentionally
        case 3:
            // green
            ergodox_left_led_3_on();
            break;
        case 6:
            ergodox_board_led_on();
            // break missed intentionally
        case 4:
        case 5:
        case 7:
            // white
            ergodox_left_led_1_on();
            break;
        case 9:
            // white+green
            ergodox_left_led_1_on();
            ergodox_left_led_3_on();
            break;
        default:
            // none
            break;
    }

    mcp23018_status = ergodox_left_leds_update();
#endif

//.........这里部分代码省略.........
开发者ID:tyll,项目名称:ergodox-tmk,代码行数:101,代码来源:matrix.c


示例19: matrix_scan_user

void matrix_scan_user(void) {

    uint8_t new_layer = biton32(layer_state);
    
    ergodox_board_led_off();
    ergodox_right_led_1_off();
    ergodox_right_led_2_off();
    ergodox_right_led_3_off();
    
#ifdef LAYER_UNDERGLOW_LIGHTING
    static uint8_t old_layer = 0;
    uint8_t modifiders = get_mods();
    
    if ( modifiders & MODS_SHIFT_MASK) {
            ergodox_right_led_1_on();
    }
    if ( modifiders & MODS_CTRL_MASK) {
            ergodox_right_led_2_on();
    }
    if ( modifiders & MODS_ALT_MASK) {
            ergodox_right_led_3_on();
    }
    
    if (old_layer != new_layer) {
        has_layer_changed = true; 
        old_layer = new_layer;
    }
    if (has_layer_changed) {
        switch (new_layer) {
            case 1:
                rgblight_set_red;
                break;
            case 2:
                rgblight_set_blue;
                break;
            case 3:
                rgblight_set_green;
                break;
            case 4:
                rgblight_set_yellow;
                break;
            case 5:
                rgblight_setrgb(0xFF, 0xFF, 0x00);
                break;
            case 6:
                rgblight_setrgb(0xFF, 0xFF, 0x00);
                break;
            case 7:
                rgblight_setrgb(0xFF, 0xFF, 0xFF);
                break;
            default:
                rgblight_set_teal;
                break;
        }
        has_layer_changed = false;
    }
    
#else    
    switch (new_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();
            ergodox_right_led_2_on();
            break;
        case 5:
            ergodox_right_led_1_on();
            ergodox_right_led_3_on();
            break;
        case 6:
            ergodox_right_led_2_on();
            ergodox_right_led_3_on();
            break;
        case 7:
            ergodox_right_led_1_on();
            ergodox_right_led_2_on();
            ergodox_right_led_3_on();
            break;
        default:
            break;
     }
#endif 
};
开发者ID:ScrelliCopter,项目名称:qmk_firmware,代码行数:90,代码来源:keymap.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ergodox_right_led_1_on函数代码示例发布时间:2022-05-30
下一篇:
C++ ergodox_board_led_off函数代码示例发布时间: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