Lines Matching refs:cc1200

129 	struct cc1200_context *cc1200 = dev->data;  in get_mac()  local
132 sys_rand_get(&cc1200->mac_addr[4], 4U); in get_mac()
134 cc1200->mac_addr[7] = (cc1200->mac_addr[7] & ~0x01) | 0x02; in get_mac()
136 cc1200->mac_addr[4] = CONFIG_IEEE802154_CC1200_MAC4; in get_mac()
137 cc1200->mac_addr[5] = CONFIG_IEEE802154_CC1200_MAC5; in get_mac()
138 cc1200->mac_addr[6] = CONFIG_IEEE802154_CC1200_MAC6; in get_mac()
139 cc1200->mac_addr[7] = CONFIG_IEEE802154_CC1200_MAC7; in get_mac()
142 cc1200->mac_addr[0] = 0x00; in get_mac()
143 cc1200->mac_addr[1] = 0x12; in get_mac()
144 cc1200->mac_addr[2] = 0x4b; in get_mac()
145 cc1200->mac_addr[3] = 0x00; in get_mac()
147 return cc1200->mac_addr; in get_mac()
171 struct cc1200_context *cc1200 = in gpio0_int_handler() local
174 if (atomic_get(&cc1200->tx) == 1) { in gpio0_int_handler()
175 if (atomic_get(&cc1200->tx_start) == 0) { in gpio0_int_handler()
176 atomic_set(&cc1200->tx_start, 1); in gpio0_int_handler()
178 atomic_set(&cc1200->tx, 0); in gpio0_int_handler()
181 k_sem_give(&cc1200->tx_sync); in gpio0_int_handler()
183 if (atomic_get(&cc1200->rx) == 1) { in gpio0_int_handler()
184 k_sem_give(&cc1200->rx_lock); in gpio0_int_handler()
185 atomic_set(&cc1200->rx, 0); in gpio0_int_handler()
187 atomic_set(&cc1200->rx, 1); in gpio0_int_handler()
203 struct cc1200_context *cc1200 = dev->data; in setup_gpio_callback() local
205 gpio_init_callback(&cc1200->rx_tx_cb, gpio0_int_handler, BIT(cfg->interrupt.pin)); in setup_gpio_callback()
207 if (gpio_add_callback(cfg->interrupt.port, &cc1200->rx_tx_cb) != 0) { in setup_gpio_callback()
321 struct cc1200_context *cc1200 = dev->data; in rf_install_settings() local
335 cc1200->rf_settings = rf_settings; in rf_install_settings()
453 struct cc1200_context *cc1200 = dev->data; in cc1200_rx() local
460 k_sem_take(&cc1200->rx_lock, K_FOREVER); in cc1200_rx()
473 pkt = net_pkt_rx_alloc_with_buffer(cc1200->iface, pkt_len, in cc1200_rx()
490 if (ieee802154_handle_ack(cc1200->iface, pkt) == NET_OK) { in cc1200_rx()
497 if (net_recv_data(cc1200->iface, pkt) < 0) { in cc1200_rx()
502 log_stack_usage(&cc1200->rx_thread); in cc1200_rx()
528 struct cc1200_context *cc1200 = dev->data; in cc1200_cca() local
530 if (atomic_get(&cc1200->rx) == 0) { in cc1200_cca()
546 struct cc1200_context *cc1200 = dev->data; in cc1200_set_channel() local
565 if (atomic_get(&cc1200->rx) != 0) { in cc1200_set_channel()
609 struct cc1200_context *cc1200 = dev->data; in cc1200_tx() local
641 atomic_set(&cc1200->tx, 1); in cc1200_tx()
642 atomic_set(&cc1200->tx_start, 0); in cc1200_tx()
650 k_sem_take(&cc1200->tx_sync, K_MSEC(100)); in cc1200_tx()
651 if (atomic_get(&cc1200->tx_start) == 1) { in cc1200_tx()
653 k_sem_take(&cc1200->tx_sync, K_MSEC(100)); in cc1200_tx()
659 if (atomic_get(&cc1200->tx) == 1 && in cc1200_tx()
663 atomic_set(&cc1200->tx_start, 0); in cc1200_tx()
670 atomic_set(&cc1200->tx, 0); in cc1200_tx()
754 struct cc1200_context *cc1200 = dev->data; in cc1200_init() local
756 atomic_set(&cc1200->tx, 0); in cc1200_init()
757 atomic_set(&cc1200->tx_start, 0); in cc1200_init()
758 atomic_set(&cc1200->rx, 0); in cc1200_init()
759 k_sem_init(&cc1200->rx_lock, 0, 1); in cc1200_init()
760 k_sem_init(&cc1200->tx_sync, 0, 1); in cc1200_init()
781 k_thread_create(&cc1200->rx_thread, cc1200->rx_stack, in cc1200_init()
785 k_thread_name_set(&cc1200->rx_thread, "cc1200_rx"); in cc1200_init()
795 struct cc1200_context *cc1200 = dev->data; in cc1200_iface_init() local
802 cc1200->iface = iface; in cc1200_iface_init()