Home
last modified time | relevance | path

Searched refs:pd (Results 1 – 25 of 55) sorted by relevance

123

/Zephyr-latest/subsys/mgmt/osdp/src/
Dosdp_sc.c35 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 …]
Dosdp_cp.c62 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 …]
Dosdp_pd.c117 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()
151 static int pd_translate_event(struct osdp_pd *pd, struct osdp_event *event) in pd_translate_event() argument
[all …]
Dosdp_phy.c28 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
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()
64 return pd->seq_number & PKT_CONTROL_SQN; in osdp_phy_get_seq_number()
[all …]
Dosdp_common.h495 struct osdp_pd *pd; member
505 static inline void cp_keyset_complete(struct osdp_pd *pd) { } in cp_keyset_complete() argument
507 void cp_keyset_complete(struct osdp_pd *pd);
510 void osdp_keyset_complete(struct osdp_pd *pd);
516 int osdp_phy_check_packet(struct osdp_pd *pd, uint8_t *buf, int len,
520 void osdp_phy_state_reset(struct osdp_pd *pd);
544 void osdp_compute_scbk(struct osdp_pd *pd, uint8_t *master_key, uint8_t *scbk);
545 void osdp_compute_session_keys(struct osdp_pd *pd);
546 void osdp_compute_cp_cryptogram(struct osdp_pd *pd);
547 int osdp_verify_cp_cryptogram(struct osdp_pd *pd);
[all …]
Dosdp.c133 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 …]
Dosdp_common.c44 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/drivers/dma/
Ddma_iproc_pax_v1.c236 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 …]
Ddma_iproc_pax_v2.c257 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 …]
/Zephyr-latest/dts/xtensa/nxp/
Dnxp_imx8.dtsi52 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/
Dmain.c31 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
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/subsys/modem/backends/
Dmodem_backend_tty.c26 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/samples/net/dsa/src/
Ddsa_lldp.c30 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()
Dmain.c69 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()
Dmain.h64 struct instance_data *pd);
/Zephyr-latest/samples/subsys/usb_c/sink/boards/
Dweact_stm32g431_core.overlay8 #include <dt-bindings/usb-c/pd.h>
Dstm32g081b_eval.overlay8 #include <dt-bindings/usb-c/pd.h>
Db_g474e_dpow1.overlay8 #include <dt-bindings/usb-c/pd.h>
Dnumaker_m2l31ki.overlay3 #include <dt-bindings/usb-c/pd.h>
/Zephyr-latest/include/zephyr/mgmt/
Dosdp.h396 typedef int (*cp_event_callback_t)(void *arg, int pd, struct osdp_event *ev);
444 int osdp_cp_send_command(int pd, struct osdp_cmd *cmd);
/Zephyr-latest/doc/connectivity/usb/
Dindex.rst28 pd/ucds.rst
/Zephyr-latest/doc/hardware/peripherals/
Dtcpc.rst23 * Power Delivery message reception and transmission `USB Power Delivery <usb-pd-specification_>`_:
56 .. _usb-pd-specification:
/Zephyr-latest/subsys/bluetooth/audio/
Dascs_internal.h80 uint8_t pd[3]; member
171 uint8_t pd[3]; member
Dbap_base.c279 uint32_t pd; in bt_bap_base_get_pres_delay() local
287 net_buf_simple_init_with_data(&net_buf, (void *)base, sizeof(pd)); in bt_bap_base_get_pres_delay()
288 pd = base_pull_pd(&net_buf); in bt_bap_base_get_pres_delay()
290 return (int)pd; /* PD is 24-bit so it fits in an int */ in bt_bap_base_get_pres_delay()
/Zephyr-latest/subsys/bluetooth/host/classic/
Dsdp.c2646 struct bt_sdp_uuid_desc *pd, in sdp_get_uuid_data() argument
2685 memcpy(&pd->uuid16, in sdp_get_uuid_data()
2697 memcpy(&pd->uuid32, in sdp_get_uuid_data()
2712 if ((proto_profile == BT_UUID_16(&pd->uuid)->val) || in sdp_get_uuid_data()
2713 (proto_profile == BT_UUID_32(&pd->uuid)->val)) { in sdp_get_uuid_data()
2714 pd->params = p; in sdp_get_uuid_data()
2715 pd->params_len = left; in sdp_get_uuid_data()
2717 LOG_DBG("UUID 0x%s found", bt_uuid_str(&pd->uuid)); in sdp_get_uuid_data()
2796 struct bt_sdp_uuid_desc pd; in bt_sdp_get_proto_param() local
2810 res = sdp_get_uuid_data(&attr, &pd, proto, 0U); in bt_sdp_get_proto_param()
[all …]

123