Home
last modified time | relevance | path

Searched refs:r (Results 1 – 25 of 544) sorted by relevance

12345678910>>...22

/device/board/unionman/unionpi_tiger/kernel/drivers/media/drivers/include/linux/amlogic/media/utils/
Dvdec_reg.h28 #define READ_DMCREG(r) codec_dmcbus_read(r) argument
29 #define WRITE_DMCREG(r, val) codec_dmcbus_write(r, val) argument
31 #define READ_AOREG(r) codec_aobus_read(r) argument
32 #define WRITE_AOREG(r, val) codec_aobus_write(r, val) argument
34 #define READ_VREG(r) codec_dosbus_read(r) argument
35 #define WRITE_VREG(r, val) codec_dosbus_write(r, val) argument
96 #define WRITE_VREG_BITS(r, val, start, len) \ argument
97 WRITE_VREG(r, (READ_VREG(r) & ~(((1L<<(len))-1)<<(start)))|\
99 #define SET_VREG_MASK(r, mask) WRITE_VREG(r, READ_VREG(r) | (mask)) argument
100 #define CLEAR_VREG_MASK(r, mask) WRITE_VREG(r, READ_VREG(r) & ~(mask)) argument
[all …]
/device/soc/telink/b91/b91_ble_sdk/drivers/B91/
Dflash.c122 unsigned int r = core_interrupt_disable(); in flash_erase_sector_ram() local
124 core_restore_interrupt(r); in flash_erase_sector_ram()
126 unsigned int r = core_interrupt_disable(); in flash_erase_sector_ram() local
136 r = core_interrupt_disable(); in flash_erase_sector_ram()
138 core_restore_interrupt(r); in flash_erase_sector_ram()
140 core_restore_interrupt(r); in flash_erase_sector_ram()
165 unsigned int r = core_interrupt_disable(); in flash_write_page_ram() local
167 core_restore_interrupt(r); in flash_write_page_ram()
169 unsigned int r = core_interrupt_disable(); // ???irq_disable(); in flash_write_page_ram() local
186 r = core_interrupt_disable(); in flash_write_page_ram()
[all …]
Danalog.c91 unsigned int r = core_interrupt_disable(); in analog_read_reg8() local
97 core_restore_interrupt(r); in analog_read_reg8()
109 unsigned int r = core_interrupt_disable(); in analog_write_reg8() local
115 core_restore_interrupt(r); in analog_write_reg8()
126 unsigned int r = core_interrupt_disable(); in analog_write_reg16() local
131 core_restore_interrupt(r); in analog_write_reg16()
141 unsigned int r = core_interrupt_disable(); in analog_read_reg16() local
147 core_restore_interrupt(r); in analog_read_reg16()
158 unsigned int r = core_interrupt_disable(); in analog_read_reg32() local
164 core_restore_interrupt(r); in analog_read_reg32()
[all …]
/device/board/isoftstone/yangfan/kernel/src/driv/net/rockchip_wlan/rkwifi/bcmdhd/include/
Dlinux_osl.h298 #define OSL_WRITE_REG(osh, r, v) (bcmsdh_reg_write(osl_get_bus_handle(osh), \ argument
299 (uintptr)(r), sizeof(*(r)), (v)))
300 #define OSL_READ_REG(osh, r) (bcmsdh_reg_read(osl_get_bus_handle(osh), \ argument
301 (uintptr)(r), sizeof(*(r))))
303 #define OSL_READ_REG(osh, r) \ argument
305 __typeof(*(r)) __osl_v; \
306 osl_bpt_rreg(osh, (uintptr)(r), &__osl_v, sizeof(*(r))); \
372 #define R_REG(osh, r) (\ argument
373 sizeof(*(r)) == sizeof(uint8) ? osl_readb((osh), (volatile uint8*)(r)) : \
374 sizeof(*(r)) == sizeof(uint16) ? osl_readw((osh), (volatile uint16*)(r)) : \
[all …]
/device/soc/esp/esp32/components/newlib/
Dreent_init.c30 void IRAM_ATTR esp_reent_init(struct _reent* r) in esp_reent_init() argument
32 memset(r, 0, sizeof(*r)); in esp_reent_init()
33 r->_stdout = _GLOBAL_REENT->_stdout; in esp_reent_init()
34 r->_stderr = _GLOBAL_REENT->_stderr; in esp_reent_init()
35 r->_stdin = _GLOBAL_REENT->_stdin; in esp_reent_init()
36 r->__cleanup = &_cleanup_r; in esp_reent_init()
37 r->__sdidinit = 1; in esp_reent_init()
38 r->__sglue._next = NULL; in esp_reent_init()
39 r->__sglue._niobs = 0; in esp_reent_init()
40 r->__sglue._iobs = NULL; in esp_reent_init()
[all …]
/device/soc/esp/esp32/components/esp_rom/include/esp32/rom/
Dlibc_stubs.h45 void* (*_malloc_r)(struct _reent *r, size_t);
46 void (*_free_r)(struct _reent *r, void*);
47 void* (*_realloc_r)(struct _reent *r, void*, size_t);
48 void* (*_calloc_r)(struct _reent *r, size_t, size_t);
50 int (*_system_r)(struct _reent *r, const char*);
51 int (*_rename_r)(struct _reent *r, const char*, const char*);
52 clock_t (*_times_r)(struct _reent *r, struct tms *);
53 int (*_gettimeofday_r) (struct _reent *r, struct timeval *, void *);
54 void (*_raise_r)(struct _reent *r); /* function signature is incorrect in ROM */
55 int (*_unlink_r)(struct _reent *r, const char*);
[all …]
/device/board/unionman/unionpi_tiger/kernel/drivers/media/drivers/stream_input/parser/demux/sw_demux/dvbcsa2/
Ddvbcsa_bs_block.c36 dvbcsa_bs_block_decrypt_register (const dvbcsa_bs_word_t *block, dvbcsa_bs_word_t *r) in dvbcsa_bs_block_decrypt_register() argument
44 r += 8 * 56; in dvbcsa_bs_block_decrypt_register()
49 r6_N = r + 8 * 6; in dvbcsa_bs_block_decrypt_register()
51 r -= 8; /* virtual shift of registers */ in dvbcsa_bs_block_decrypt_register()
78 w = BS_XOR(r[8 * 8 + g], sbox_out); in dvbcsa_bs_block_decrypt_register()
80 r[8 * 0 + g] = w; in dvbcsa_bs_block_decrypt_register()
81 BS_XOREQ(r[8 * 2 + g], w); in dvbcsa_bs_block_decrypt_register()
82 BS_XOREQ(r[8 * 3 + g], w); in dvbcsa_bs_block_decrypt_register()
83 BS_XOREQ(r[8 * 4 + g], w); in dvbcsa_bs_block_decrypt_register()
84 BS_XOREQ(r[8 * 6 + g], in); in dvbcsa_bs_block_decrypt_register()
[all …]
Ddvbcsa_bs_transpose.c51 dvbcsa_bs_word_t *r = out + j + i + k; in dvbcsa_bs_block_transpose_in() local
54 t = r[0]; in dvbcsa_bs_block_transpose_in()
55 b = r[16]; in dvbcsa_bs_block_transpose_in()
56 r[0] = BS_OR(BS_AND(t, BS_VAL32(0000ffff)), BS_SHL8(BS_AND(b, BS_VAL32(0000ffff)), 2)); in dvbcsa_bs_block_transpose_in()
57 r[16] = BS_OR(BS_AND(b, BS_VAL32(ffff0000)), BS_SHR8(BS_AND(t, BS_VAL32(ffff0000)), 2)); in dvbcsa_bs_block_transpose_in()
63 dvbcsa_bs_word_t *r = out + j + k; in dvbcsa_bs_block_transpose_in() local
66 t = r[0]; in dvbcsa_bs_block_transpose_in()
67 b = r[8]; in dvbcsa_bs_block_transpose_in()
68 r[0] = BS_OR(BS_AND(t, BS_VAL16(00ff)), BS_SHL8(BS_AND(b, BS_VAL16(00ff)), 1)); in dvbcsa_bs_block_transpose_in()
69 r[8] = BS_OR(BS_AND(b, BS_VAL16(ff00)), BS_SHR8(BS_AND(t, BS_VAL16(ff00)), 1)); in dvbcsa_bs_block_transpose_in()
[all …]
/device/board/unionman/unionpi_tiger/kernel/drivers/media/drivers/stream_input/amports/
Dstreambuf_reg.h89 #define _WRITE_ST_REG(r, val) do { \ argument
91 codec_dosbus_write((buf->reg_base+(r)), (val)); \
93 codec_aiubus_write((buf->reg_base+(r)), (val)); \
95 #define _READ_ST_REG(r) \ argument
97 codec_dosbus_read(buf->reg_base+(r)) : \
98 codec_aiubus_read(buf->reg_base+(r)))
100 #define _SET_ST_REG_MASK(r, val) _WRITE_ST_REG(r, _READ_ST_REG(r) | (val)) argument
101 #define _CLR_ST_REG_MASK(r, val) _WRITE_ST_REG(r, _READ_ST_REG(r)&~(val)) argument
102 #define _READ_VDEC2_ST_REG(r) (codec_dosbus_read(\ argument
103 (VDEC2_VLD_MEM_VIFIFO_START_PTR+(r))))
[all …]
Damstream.c603 int r; in video_port_init() local
628 r = vdec_init(vdec, in video_port_init()
631 if (r < 0) { in video_port_init()
634 return r; in video_port_init()
640 r = vdec_init(vdec->slave, in video_port_init()
643 if (r < 0) { in video_port_init()
647 return r; in video_port_init()
665 r = vdec_init(vdec, in video_port_init()
669 if (r < 0) { in video_port_init()
675 r = vdec_init(vdec->slave, in video_port_init()
[all …]
/device/soc/amlogic/a311d/soc/amlogic/ge2d/
Dge2d_main.c212 int r = 0; in ge2d_ioctl_config_ex_mem() local
227 r |= get_user(ge2d_para_config.para_config_memtype.ge2d_magic, in ge2d_ioctl_config_ex_mem()
236 r = copy_from_user(&pge2d_config_ex->src_para, &uf_ex_mem->_ge2d_config_ex.src_para, in ge2d_ioctl_config_ex_mem()
238r |= copy_from_user(&pge2d_config_ex->src2_para, &uf_ex_mem->_ge2d_config_ex.src2_para, in ge2d_ioctl_config_ex_mem()
240r |= copy_from_user(&pge2d_config_ex->dst_para, &uf_ex_mem->_ge2d_config_ex.dst_para, in ge2d_ioctl_config_ex_mem()
242 r |= copy_from_user(&pge2d_config_ex->src_key, &uf_ex_mem->_ge2d_config_ex.src_key, in ge2d_ioctl_config_ex_mem()
244r |= copy_from_user(&pge2d_config_ex->src2_key, &uf_ex_mem->_ge2d_config_ex.src2_key, in ge2d_ioctl_config_ex_mem()
247r |= get_user(pge2d_config_ex->src1_cmult_asel, &uf_ex_mem->_ge2d_config_ex.src1_cmult_asel); in ge2d_ioctl_config_ex_mem()
248r |= get_user(pge2d_config_ex->src2_cmult_asel, &uf_ex_mem->_ge2d_config_ex.src2_cmult_asel); in ge2d_ioctl_config_ex_mem()
249r |= get_user(pge2d_config_ex->alu_const_color, &uf_ex_mem->_ge2d_config_ex.alu_const_color); in ge2d_ioctl_config_ex_mem()
[all …]
/device/soc/winnermicro/wm800/board/include/arch/xt804/csi_core/
Dcsi_gcc.h982 #define __CSI_GCC_OUT_REG(r) "=r" (r) argument
983 #define __CSI_GCC_USE_REG(r) "r" (r) argument
1467 int32_t r = 0, s = 0; in __SSAT16() local
1469 r = __SSAT((((int32_t)x << 16) >> 16), y) & (int32_t)0x0000FFFF; in __SSAT16()
1472 return ((uint32_t)((s << 16) | (r))); in __SSAT16()
1488 int32_t r = 0, s = 0; in __USAT16() local
1490 r = __IUSAT(((x << 16) >> 16), y) & 0x0000FFFF; in __USAT16()
1493 return ((s << 16) | (r)); in __USAT16()
1515 int32_t r, s, t, u; in __QADD8() local
1517 r = __SSAT(((((int32_t)x << 24) >> 24) + (((int32_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF; in __QADD8()
[all …]
/device/qemu/SmartL_E802/liteos_m/board/hals/csky_driver/include/
Dcsi_gcc.h1004 #define __CSI_GCC_OUT_REG(r) "=r" (r) argument
1005 #define __CSI_GCC_USE_REG(r) "r" (r) argument
1503 int32_t r = 0, s = 0; in __SSAT16() local
1505 r = __SSAT((((int32_t)x << 16) >> 16), y) & (int32_t)0x0000FFFF; in __SSAT16()
1508 return ((uint32_t)((s << 16) | (r))); in __SSAT16()
1524 int32_t r = 0, s = 0; in __USAT16() local
1526 r = __IUSAT(((x << 16) >> 16), y) & 0x0000FFFF; in __USAT16()
1529 return ((s << 16) | (r)); in __USAT16()
1551 int32_t r, s, t, u; in __QADD8() local
1553 r = __SSAT(((((int32_t)x << 24) >> 24) + (((int32_t)y << 24) >> 24)), 8) & (int32_t)0x000000FF; in __QADD8()
[all …]
/device/soc/bestechnic/bes2600/liteos_m/sdk/bsp/platform/hal/
Dhal_phyif.c26 #define PHY_READ_CMD(r) ((1 << 26) | (((r) & 0x3FF) << 16)) argument
27 #define PHY_WRITE_CMD(r, v) ((((r) & 0x3FF) << 16) | ((v) & 0xFFFF)) argument
30 #define SPIPHY_REG_CS(r) ((r) >> 12) argument
31 #define SPIPHY_REG_OFFSET(r) ((r) & 0x3FF) argument
35 #define PHY_READ_CMD(r) ((1 << 24) | (((r) & 0xFF) << 16)) argument
36 #define PHY_WRITE_CMD(r, v) ((((r) & 0xFF) << 16) | ((v) & 0xFFFF)) argument
39 #define SPIPHY_REG_CS(r) ((r) >> 12) argument
40 #define SPIPHY_REG_PAGE(r) (((r) >> 8) & 0xF) argument
41 #define SPIPHY_REG_OFFSET(r) ((r) & 0xFF) argument
/device/board/unionman/unionpi_tiger/kernel/drivers/media/drivers/stream_input/parser/
Dtsdemux.c94 int r = 0; in tsdemux_set_reset_flag_ext() local
97 r = demux_ops->set_reset_flag(); in tsdemux_set_reset_flag_ext()
99 return r; in tsdemux_set_reset_flag_ext()
105 int r; in tsdemux_set_reset_flag() local
108 r = tsdemux_set_reset_flag_ext(); in tsdemux_set_reset_flag()
111 return r; in tsdemux_set_reset_flag()
117 int r = 0; in tsdemux_reset() local
122 r = demux_ops->reset(); in tsdemux_reset()
126 return r; in tsdemux_reset()
132 int r = 0; in tsdemux_request_irq() local
[all …]
/device/soc/amlogic/a311d/hardware/media/libamplayer/include/
Daudio_external_render.h28 int (*init)(struct audio_render_s *r);
29 int (*finalize)(struct audio_render_s *r);
30 …int (*config)(struct audio_render_s *r, uint32_t channels, uint32_t bits_per_sample, uint32_t samp…
31 int (*write)(struct audio_render_s *r, uint8_t *data, uint32_t size);
32 int (*start)(struct audio_render_s *r);
33 int (*stop)(struct audio_render_s *r);
34 int (*pause)(struct audio_render_s *r);
35 int (*resume)(struct audio_render_s *r);
36 uint32_t (*get_latency)(struct audio_render_s *r); /* get latency in unit of ms */
37 int (*set_mute)(struct audio_render_s *r, int mute); /* 1: enable mute ; 0: disable mute */
[all …]
/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/
Dhmac_wapi_sms4.c106 for (hi_u32 r = 0; r < rk_len; r += 4) { /* 0:起始,32:条件,4:递增 */ in hmac_sms4_crypt() local
107 hi_u32 mid = x[1] ^ x[2] ^ x[3] ^ puc_rk[r + 0]; /* 0:下标,1:下标,2:下标,3:下标 */ in hmac_sms4_crypt()
110 mid = x[2] ^ x[3] ^ x[0] ^ puc_rk[r + 1]; /* 0:下标,1:下标,2:下标,3:下标 */ in hmac_sms4_crypt()
113 mid = x[3] ^ x[0] ^ x[1] ^ puc_rk[r + 2]; /* 0:下标,1:下标,2:下标,3:下标 */ in hmac_sms4_crypt()
116 mid = x[0] ^ x[1] ^ x[2] ^ puc_rk[r + 3]; /* 0:下标,1:下标,2:下标,3:下标 */ in hmac_sms4_crypt()
149 hi_u32 r; in hmac_sms4_keyext() local
173 for (r = 0; r < rk_len; r += 4) { /* 0:起始,32:条件,4:递增 */ in hmac_sms4_keyext()
174 mid = x[1] ^ x[2] ^ x[3] ^ g_gaul_ck[r + 0]; /* 0:下标,1:下标,2:下标,3:下标 */ in hmac_sms4_keyext()
176 puc_rk[r + 0] = x[0] ^= l2(mid); /* 0:下标 */ in hmac_sms4_keyext()
177 mid = x[2] ^ x[3] ^ x[0] ^ g_gaul_ck[r + 1]; /* 0:下标,1:下标,2:下标,3:下标 */ in hmac_sms4_keyext()
[all …]
/device/board/openvalley/niobeu4/liteos_m/hals/syscalls/
Dsyscalls.c45 static int s_raise_r(struct _reent *r, int sig) in s_raise_r() argument
49 int _raise_r(struct _reent *r, int sig) __attribute__((alias("s_raise_r")));
53 int _open_r(struct _reent *r, const char *path, int flags, int mode) in _open_r() argument
57 int _close_r(struct _reent *r, int fd) in _close_r() argument
61 off_t _lseek_r(struct _reent *r, int fd, off_t size, int mode) in _lseek_r() argument
66 int _link_r(struct _reent *r, const char *n1, const char *n2) in _link_r() argument
70 int _unlink_r(struct _reent *r, const char *path) in _unlink_r() argument
74 int _stat_r(struct _reent *r, const char *path, struct stat *st) in _stat_r() argument
79 int _rename_r(struct _reent *r, const char *src, const char *dst) in _rename_r() argument
84 int _fstat_r(struct _reent *r, int fd, struct stat *st) in _fstat_r() argument
[all …]
/device/board/unionman/unionpi_tiger/kernel/drivers/media/drivers/common/codec_mm/configs/
Dconfigs_module.c326 int r = -1; in configs_ioctl() local
332 r = copy_from_user(io.cmd_path, in configs_ioctl()
334 r |= copy_from_user(io.val, user_io->val, sizeof(io.val)); in configs_ioctl()
337 if (r) { in configs_ioctl()
338 r = -EIO; in configs_ioctl()
343 r = configs_set_node_nodepath_str(NULL, in configs_ioctl()
351 r = -1; in configs_ioctl()
353 r = copy_from_user(&io.cmd_path, in configs_ioctl()
356 if (r) { in configs_ioctl()
357 r = -EIO; in configs_ioctl()
[all …]
/device/soc/amlogic/a311d/soc/amlogic/media/common/codec_mm/configs/
Dconfigs_module.c309 int r = -1; in configs_ioctl() local
315 r = copy_from_user(io.cmd_path, user_io->cmd_path, sizeof(io.cmd_path)); in configs_ioctl()
316 r |= copy_from_user(io.val, user_io->val, sizeof(io.val)); in configs_ioctl()
317 if (r) { in configs_ioctl()
318 r = -EIO; in configs_ioctl()
322 r = configs_set_node_nodepath_str(NULL, io.cmd_path, io.val); in configs_ioctl()
328 r = -1; in configs_ioctl()
330 r = copy_from_user(&io.cmd_path, user_io->cmd_path, sizeof(io.cmd_path)); in configs_ioctl()
332 if (r) { in configs_ioctl()
333 r = -EIO; in configs_ioctl()
[all …]
/device/board/kaihong/khdvk_3566b/wifi/bcmdhd_hdf/bcmdhd/
Ddhd_dbg_ring.h117 #define TXACTIVESZ(r, w, d) (((r) <= (w)) ? ((w) - (r)) : ((d) - (r) + (w))) argument
118 #define DBG_RING_READ_AVAIL_SPACE(w, r, d) \ argument
119 (((w) >= (r)) ? ((w) - (r)) : ((d) - (r)))
120 #define DBG_RING_WRITE_SPACE_AVAIL_CONT(r, w, d) \ argument
121 (((w) >= (r)) ? ((d) - (w)) : ((r) - (w)))
122 #define DBG_RING_WRITE_SPACE_AVAIL(r, w, d) (d - (TXACTIVESZ(r, w, d))) argument
123 #define DBG_RING_CHECK_WRITE_SPACE(r, w, d) \ argument
124 MIN(DBG_RING_WRITE_SPACE_AVAIL(r, w, d), \
125 DBG_RING_WRITE_SPACE_AVAIL_CONT(r, w, d))
/device/soc/rockchip/common/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/
Ddhd_dbg_ring.h119 #define TXACTIVESZ(r, w, d) (((r) <= (w)) ? ((w) - (r)) : ((d) - (r) + (w))) argument
120 #define DBG_RING_READ_AVAIL_SPACE(w, r, d) (((w) >= (r)) ? ((w) - (r)) : ((d) - (r))) argument
121 #define DBG_RING_WRITE_SPACE_AVAIL_CONT(r, w, d) (((w) >= (r)) ? ((d) - (w)) : ((r) - (w))) argument
122 #define DBG_RING_WRITE_SPACE_AVAIL(r, w, d) (d - (TXACTIVESZ(r, w, d))) argument
123 #define DBG_RING_CHECK_WRITE_SPACE(r, w, d) \ argument
124 MIN(DBG_RING_WRITE_SPACE_AVAIL(r, w, d), DBG_RING_WRITE_SPACE_AVAIL_CONT(r, w, d))
/device/board/bearpi/bearpi_hm_nano/app/C2_e53_ia1_temp_humi_pls/
DREADME.md77 printf("E53_IA1 Init failed!\r\n");
82 printf("\r\n=======================================\r\n");
83 printf("\r\n*************E53_IA1_example***********\r\n");
84 printf("\r\n=======================================\r\n");
88 printf("E53_IA1 Read Data failed!\r\n");
91 printf("\r\n******************************Lux Value is %.2f\r\n", data.Lux);
92 printf("\r\n******************************Humidity is %.2f\r\n", data.Humidity);
93 printf("\r\n******************************Temperature is %.2f\r\n", data.Temperature);
116 ```r
/device/board/unionman/unionpi_tiger/kernel/drivers/media/drivers/stream_input/subtitle/
Dsubtitle.c113 ssize_t r; in store_curr() local
115 r = kstrtoint(buf, 0, &curr); in store_curr()
116 if (r < 0) in store_curr()
135 ssize_t r; in store_index() local
137 r = kstrtoint(buf, 0, &curr); in store_index()
138 if (r < 0) in store_index()
156 ssize_t r; in store_reset() local
158 r = kstrtoint(buf, 0, &reset); in store_reset()
161 if (r < 0) in store_reset()
180 ssize_t r; in store_type() local
[all …]
/device/board/isoftstone/zhiyuan/kernel/driver/drivers/net/wireless/bcmdhd/include/
Dbcmpcie.h408 #define NTXPACTIVE(r, w, d) (((r) <= (w)) ? ((w)-(r)) : ((d)-(r)+(w))) argument
409 #define NTXPAVAIL(r, w, d) (((d) - NTXPACTIVE((r), (w), (d))) > 1) argument
412 #define READ_AVAIL_SPACE(w, r, d) \ argument
413 ((w >= r) ? (w - r) : (d - r))
415 #define WRITE_SPACE_AVAIL_CONTINUOUS(r, w, d) ((w >= r) ? (d - w) : (r - w)) argument
416 #define WRITE_SPACE_AVAIL(r, w, d) (d - (NTXPACTIVE(r, w, d)) - 1) argument
417 #define CHECK_WRITE_SPACE(r, w, d) \ argument
418 ((r) > (w)) ? ((r) - (w) - 1) : ((r) == 0 || (w) == 0) ? ((d) - (w) - 1) : ((d) - (w))
419 #define CHECK_NOWRITE_SPACE(r, w, d) \ argument
420 (((r) == (w) + 1) || (((r) == 0) && ((w) == ((d) - 1))))

12345678910>>...22