/Zephyr-latest/subsys/mgmt/osdp/src/ |
D | osdp_cp.c | 62 static struct osdp_cmd *cp_cmd_alloc(struct osdp_pd *pd) in cp_cmd_alloc() argument 66 if (k_mem_slab_alloc(&pd->cmd.slab, (void **)&cmd, K_MSEC(100))) { in cp_cmd_alloc() 73 static void cp_cmd_free(struct osdp_pd *pd, struct osdp_cmd *cmd) in cp_cmd_free() argument 75 k_mem_slab_free(&pd->cmd.slab, (void *)cmd); in cp_cmd_free() 78 static void cp_cmd_enqueue(struct osdp_pd *pd, struct osdp_cmd *cmd) in cp_cmd_enqueue() argument 80 sys_slist_append(&pd->cmd.queue, &cmd->node); in cp_cmd_enqueue() 83 static int cp_cmd_dequeue(struct osdp_pd *pd, struct osdp_cmd **cmd) in cp_cmd_dequeue() argument 87 node = sys_slist_peek_head(&pd->cmd.queue); in cp_cmd_dequeue() 91 sys_slist_remove(&pd->cmd.queue, NULL, node); in cp_cmd_dequeue() 126 static int cp_build_command(struct osdp_pd *pd, uint8_t *buf, int max_len) in cp_build_command() argument [all …]
|
D | osdp_sc.c | 35 void osdp_compute_scbk(struct osdp_pd *pd, uint8_t *master_key, uint8_t *scbk) in osdp_compute_scbk() argument 39 memcpy(scbk, pd->sc.pd_client_uid, 8); in osdp_compute_scbk() 46 void osdp_compute_session_keys(struct osdp_pd *pd) in osdp_compute_session_keys() argument 49 struct osdp *ctx = pd_to_osdp(pd); in osdp_compute_session_keys() 52 if (ISSET_FLAG(pd, PD_FLAG_SC_USE_SCBKD)) { in osdp_compute_session_keys() 55 if (is_cp_mode(pd) && !ISSET_FLAG(pd, PD_FLAG_HAS_SCBK)) { in osdp_compute_session_keys() 56 osdp_compute_scbk(pd, ctx->sc_master_key, scbk); in osdp_compute_session_keys() 58 memcpy(scbk, pd->sc.scbk, 16); in osdp_compute_session_keys() 62 memset(pd->sc.s_enc, 0, 16); in osdp_compute_session_keys() 63 memset(pd->sc.s_mac1, 0, 16); in osdp_compute_session_keys() [all …]
|
D | osdp_pd.c | 65 1, /* The PD supports the 16-bit CRC-16 mode */ 117 static struct osdp_event *pd_event_alloc(struct osdp_pd *pd) in pd_event_alloc() argument 121 if (k_mem_slab_alloc(&pd->event.slab, (void **)&event, K_MSEC(100))) { in pd_event_alloc() 128 static void pd_event_free(struct osdp_pd *pd, struct osdp_event *event) in pd_event_free() argument 130 k_mem_slab_free(&pd->event.slab, (void *)event); in pd_event_free() 133 static void pd_event_enqueue(struct osdp_pd *pd, struct osdp_event *event) in pd_event_enqueue() argument 135 sys_slist_append(&pd->event.queue, &event->node); in pd_event_enqueue() 138 static int pd_event_dequeue(struct osdp_pd *pd, struct osdp_event **event) in pd_event_dequeue() argument 142 node = sys_slist_peek_head(&pd->event.queue); in pd_event_dequeue() 146 sys_slist_remove(&pd->event.queue, NULL, node); in pd_event_dequeue() [all …]
|
D | osdp_phy.c | 28 static inline bool packet_has_mark(struct osdp_pd *pd) in packet_has_mark() argument 30 return ISSET_FLAG(pd, PD_FLAG_PKT_HAS_MARK); in packet_has_mark() 33 static inline void packet_set_mark(struct osdp_pd *pd, bool mark) in packet_set_mark() argument 36 SET_FLAG(pd, PD_FLAG_PKT_HAS_MARK); in packet_set_mark() 38 CLEAR_FLAG(pd, PD_FLAG_PKT_HAS_MARK); in packet_set_mark() 55 static int osdp_phy_get_seq_number(struct osdp_pd *pd, int do_inc) in osdp_phy_get_seq_number() argument 57 /* pd->seq_num is set to -1 to reset phy cmd state */ in osdp_phy_get_seq_number() 59 pd->seq_number += 1; in osdp_phy_get_seq_number() 60 if (pd->seq_number > 3) { in osdp_phy_get_seq_number() 61 pd->seq_number = 1; in osdp_phy_get_seq_number() [all …]
|
D | osdp_common.h | 105 #define SCS_11 0x11 /* CP -> PD -- CMD_CHLNG */ 106 #define SCS_12 0x12 /* PD -> CP -- REPLY_CCRYPT */ 107 #define SCS_13 0x13 /* CP -> PD -- CMD_SCRYPT */ 108 #define SCS_14 0x14 /* PD -> CP -- REPLY_RMAC_I */ 110 #define SCS_15 0x15 /* CP -> PD -- packets w MAC w/o ENC */ 111 #define SCS_16 0x16 /* PD -> CP -- packets w MAC w/o ENC */ 112 #define SCS_17 0x17 /* CP -> PD -- packets w MAC w ENC*/ 113 #define SCS_18 0x18 /* PD -> CP -- packets w MAC w ENC*/ 115 /* PD Flags */ 116 #define PD_FLAG_SC_CAPABLE 0x00000001 /* PD secure channel capable */ [all …]
|
D | osdp.c | 133 struct osdp_pd *pd; in osdp_build_ctx() local 145 ctx->pd = &osdp_pd_ctx[0]; in osdp_build_ctx() 149 pd = osdp_to_pd(ctx, i); in osdp_build_ctx() 150 pd->idx = i; in osdp_build_ctx() 151 pd->seq_number = -1; in osdp_build_ctx() 152 pd->osdp_ctx = ctx; in osdp_build_ctx() 153 pd->address = pd_adddres[i]; in osdp_build_ctx() 154 pd->baud_rate = CONFIG_OSDP_UART_BAUD_RATE; in osdp_build_ctx() 156 SET_FLAG(pd, PD_FLAG_PKT_SKIP_MARK); in osdp_build_ctx() 158 memcpy(&pd->channel, channel, sizeof(struct osdp_channel)); in osdp_build_ctx() [all …]
|
D | osdp_common.c | 44 void osdp_keyset_complete(struct osdp_pd *pd) in osdp_keyset_complete() argument 46 cp_keyset_complete(pd); in osdp_keyset_complete() 154 struct osdp_pd *pd; in osdp_get_sc_status_mask() local 158 pd = osdp_to_pd(ctx, i); in osdp_get_sc_status_mask() 159 if (ISSET_FLAG(pd, PD_FLAG_SC_ACTIVE)) { in osdp_get_sc_status_mask()
|
/Zephyr-latest/subsys/mgmt/osdp/ |
D | Kconfig.pd | 8 # operating as a PD. 13 In PD mode, number of connected PDs is always 1 and cannot 20 The number of commands that can be queued to a given PD. In CP mode, 21 the queue size is multiplied by number of connected PD so this can grow 29 The 7 least significant bits represent the address of the PD to which 30 the message is directed, or the address of the PD sending the reply. 40 Hexadecimal string representation of the 16 byte OSDP PD Secure 41 Channel Base Key. When this field is sent to "NONE", the PD is set to 42 "Install Mode". In this mode, the PD would allow a CP to setup a secure 44 default key, the CP can send a KEYSET command to set new keys to the PD. [all …]
|
D | Kconfig.cp | 12 In PD mode, number of connected PDs is always 1 and cannot 19 Comma Separated Values of PD addresses. The number of values in this 26 The number of commands that can be queued to a given PD. In CP mode, 27 the queue size is multiplied by number of connected PD so this can grow
|
D | Kconfig | 24 Configure this device to operate as a PD (Peripheral Device) 99 CP and PD. Provide an available crypto driver name here. 104 source "subsys/mgmt/osdp/Kconfig.pd"
|
/Zephyr-latest/include/zephyr/dt-bindings/pinctrl/ |
D | ch32v003-pinctrl.h | 44 #define TIM1_ETR_PD4_2 CH32V003_PINMUX_DEFINE(PD, 4, TIM1, 2) 46 #define TIM1_CH1_PD2_0 CH32V003_PINMUX_DEFINE(PD, 2, TIM1, 0) 48 #define TIM1_CH1_PD2_2 CH32V003_PINMUX_DEFINE(PD, 2, TIM1, 2) 59 #define TIM1_CH4_PD3_1 CH32V003_PINMUX_DEFINE(PD, 3, TIM1, 1) 61 #define TIM1_CH4_PD4_3 CH32V003_PINMUX_DEFINE(PD, 4, TIM1, 3) 66 #define TIM1_CH1N_PD0_0 CH32V003_PINMUX_DEFINE(PD, 0, TIM1, 0) 68 #define TIM1_CH1N_PD0_2 CH32V003_PINMUX_DEFINE(PD, 0, TIM1, 2) 73 #define TIM1_CH2N_PD2_3 CH32V003_PINMUX_DEFINE(PD, 2, TIM1, 3) 74 #define TIM1_CH3N_PD1_0 CH32V003_PINMUX_DEFINE(PD, 1, TIM1, 0) 75 #define TIM1_CH3N_PD1_1 CH32V003_PINMUX_DEFINE(PD, 1, TIM1, 1) [all …]
|
/Zephyr-latest/drivers/dma/ |
D | dma_iproc_pax_v2.c | 257 static int init_rm(struct dma_iproc_pax_data *pd) in init_rm() argument 261 k_mutex_lock(&pd->dma_lock, K_FOREVER); in init_rm() 265 if ((sys_read32(RM_COMM_REG(pd, RM_COMM_MAIN_HW_INIT_DONE)) & in init_rm() 272 k_mutex_unlock(&pd->dma_lock); in init_rm() 283 static void rm_cfg_start(struct dma_iproc_pax_data *pd) in rm_cfg_start() argument 287 k_mutex_lock(&pd->dma_lock, K_FOREVER); in rm_cfg_start() 290 val = sys_read32(RM_COMM_REG(pd, RM_COMM_CONTROL)); in rm_cfg_start() 292 sys_write32(val, RM_COMM_REG(pd, RM_COMM_CONTROL)); in rm_cfg_start() 303 sys_write32(val, RM_COMM_REG(pd, RM_COMM_CONTROL)); in rm_cfg_start() 305 RM_COMM_REG(pd, RM_COMM_MSI_DISABLE)); in rm_cfg_start() [all …]
|
D | dma_iproc_pax_v1.c | 236 static int init_rm(struct dma_iproc_pax_data *pd) in init_rm() argument 240 k_mutex_lock(&pd->dma_lock, K_FOREVER); in init_rm() 244 if ((sys_read32(RM_COMM_REG(pd, RM_COMM_MAIN_HW_INIT_DONE)) & in init_rm() 251 k_mutex_unlock(&pd->dma_lock); in init_rm() 262 static void rm_cfg_start(struct dma_iproc_pax_data *pd) in rm_cfg_start() argument 266 k_mutex_lock(&pd->dma_lock, K_FOREVER); in rm_cfg_start() 269 val = sys_read32(RM_COMM_REG(pd, RM_COMM_CONTROL)); in rm_cfg_start() 271 sys_write32(val, RM_COMM_REG(pd, RM_COMM_CONTROL)); in rm_cfg_start() 275 sys_write32(val, RM_COMM_REG(pd, RM_COMM_CONTROL)); in rm_cfg_start() 279 RM_COMM_REG(pd, RM_COMM_MSI_DISABLE)); in rm_cfg_start() [all …]
|
/Zephyr-latest/dts/xtensa/nxp/ |
D | nxp_imx8.dtsi | 52 irqstr_pd: pd@0 { 53 compatible = "nxp,imx8qm-scu-pd", "nxp,scu-pd"; 59 edma0_ch6_pd: pd@1 { 60 compatible = "nxp,imx8qm-scu-pd", "nxp,scu-pd"; 66 edma0_ch7_pd: pd@2 { 67 compatible = "nxp,imx8qm-scu-pd", "nxp,scu-pd"; 73 edma0_ch14_pd: pd@3 { 74 compatible = "nxp,imx8qm-scu-pd", "nxp,scu-pd"; 80 edma0_ch15_pd: pd@4 { 81 compatible = "nxp,imx8qm-scu-pd", "nxp,scu-pd"; [all …]
|
/Zephyr-latest/samples/subsys/mgmt/osdp/control_panel/src/ |
D | main.c | 31 int key_press_callback(int pd, uint8_t *data, int len) in key_press_callback() argument 33 printk("CP PD[%d] key press - data: 0x%02x\n", pd, data[0]); in key_press_callback() 37 int card_read_callback(int pd, int format, uint8_t *data, int len) in card_read_callback() argument 41 printk("CP PD[%d] card read - fmt: %d len: %d card_data: [ ", in card_read_callback() 42 pd, format, len); in card_read_callback() 52 int event_handler(void *unused, int pd, struct osdp_event *e) in event_handler() argument 56 card_read_callback(pd, e->cardread.format, in event_handler() 60 key_press_callback(pd, e->keypress.data, e->keypress.length); in event_handler()
|
/Zephyr-latest/include/zephyr/mgmt/ |
D | osdp.h | 29 * @brief Command sent from CP to Control digital output of PD. 107 * @brief Sent from CP to PD to control the behaviour of it's on-board LEDs 129 * @brief Sent from CP to control the behaviour of a buzzer in the PD. 159 * @brief Command to manipulate any display units that the PD supports. 198 * PD. Must be stored in PD non-volatile memory. 202 * Unit ID to which this PD will respond after the change takes effect. 214 * @brief This command transfers an encryption key from the CP to a PD. 246 OSDP_CMD_COMSET, /**< PD Communication Configuration Command */ 275 * @brief Various card formats that a PD can support. This is sent to CP 276 * when a PD must report a card read. [all …]
|
/Zephyr-latest/subsys/modem/backends/ |
D | modem_backend_tty.c | 26 struct pollfd pd; in modem_backend_tty_routine() local 31 pd.fd = backend->tty_fd; in modem_backend_tty_routine() 32 pd.events = POLLIN; in modem_backend_tty_routine() 37 pd.revents = 0; in modem_backend_tty_routine() 39 if (poll(&pd, 1, MODEM_BACKEND_TTY_THREAD_RUN_PERIOD_MS) < 0) { in modem_backend_tty_routine() 44 if (pd.revents & POLLIN) { in modem_backend_tty_routine()
|
/Zephyr-latest/drivers/power_domain/ |
D | Kconfig | 77 bool "NXP SCU-managed PD driver" 86 int "NXP SCU-managed PD driver init priority" 89 NXP SCU-managed PD driver initialization priority.
|
/Zephyr-latest/dts/bindings/power-domain/ |
D | nxp,scu-pd.yaml | 6 compatible: "nxp,scu-pd" 16 the resource on which the PD-related operations are to be
|
/Zephyr-latest/samples/net/dsa/src/ |
D | dsa_lldp.c | 30 int dsa_lldp_send(struct net_if *iface, struct instance_data *pd, in dsa_lldp_send() argument 86 ret = sendto(pd->sock, buffer, len, 0, (const struct sockaddr *)&dst, in dsa_lldp_send() 149 int dsa_lldp_recv(struct net_if *iface, struct instance_data *pd, in dsa_lldp_recv() argument 155 (struct net_eth_hdr *) pd->recv_buffer; in dsa_lldp_recv() 156 uint8_t *lldp_p = &pd->recv_buffer[sizeof(struct net_eth_hdr)]; in dsa_lldp_recv() 162 received = recv(pd->sock, pd->recv_buffer, in dsa_lldp_recv() 163 sizeof(pd->recv_buffer), 0); in dsa_lldp_recv()
|
D | main.c | 69 struct instance_data *pd) in start_slave_port_packet_socket() argument 74 pd->sock = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in start_slave_port_packet_socket() 75 if (pd->sock < 0) { in start_slave_port_packet_socket() 83 ret = bind(pd->sock, (const struct sockaddr *)&dst, in start_slave_port_packet_socket()
|
/Zephyr-latest/dts/bindings/usb-c/ |
D | usb-c-connector.yaml | 109 pd-disable: 119 dt-bindings/usb-c/pd.h. 131 dt-bindings/usb-c/pd.h. 143 dt-bindings/usb-c/pd.h. 159 dt-bindings/usb-c/pd.h.
|
/Zephyr-latest/boards/microchip/ev11l78a/doc/ |
D | index.rst | 8 Programmable USB Power Delivery (PD) Controller. This RoHS-compliant 10 USB Type-C™ Connector Specification and USB PD 3.0 specification. 16 - UPD301C combines a SAMD20 core and a UPD350 USB-PD controller
|
/Zephyr-latest/samples/subsys/mgmt/osdp/ |
D | README.rst | 12 Devices (PD) to a Control Panel (CP) over a two-wire RS-485 multi-drop serial 22 OSDP Supports the control of the following components on a PD:
|
/Zephyr-latest/include/zephyr/drivers/usb_c/ |
D | usbc_pd.h | 10 * The information in this file was taken from the USB PD 57 * @name USB PD 3.1 Rev 1.6, Table 6-70 Counter Parameters 79 * @name USB PD 3.1 Rev 1.6, Table 6-68 Time Values 131 * 2) The Source is not in an active connection with a PD Sink Port. 140 * 2) The Source is not in an active connection with a PD Sink Port. 290 * @brief Convert bytes to PD Header data object count, where a 298 * @brief Convert PD Header data object count to bytes 300 * @param c number of PD Header data objects 317 * @brief Build a PD message header 364 /** Raw PD Ext Header value */ [all …]
|