Lines Matching refs:cc1200

129 	struct cc1200_context *cc1200 = dev->data;  in get_mac()  local
132 uint32_t *ptr = (uint32_t *)(cc1200->mac_addr + 4); in get_mac()
136 cc1200->mac_addr[7] = (cc1200->mac_addr[7] & ~0x01) | 0x02; in get_mac()
138 cc1200->mac_addr[4] = CONFIG_IEEE802154_CC1200_MAC4; in get_mac()
139 cc1200->mac_addr[5] = CONFIG_IEEE802154_CC1200_MAC5; in get_mac()
140 cc1200->mac_addr[6] = CONFIG_IEEE802154_CC1200_MAC6; in get_mac()
141 cc1200->mac_addr[7] = CONFIG_IEEE802154_CC1200_MAC7; in get_mac()
144 cc1200->mac_addr[0] = 0x00; in get_mac()
145 cc1200->mac_addr[1] = 0x12; in get_mac()
146 cc1200->mac_addr[2] = 0x4b; in get_mac()
147 cc1200->mac_addr[3] = 0x00; in get_mac()
149 return cc1200->mac_addr; in get_mac()
173 struct cc1200_context *cc1200 = in gpio0_int_handler() local
176 if (atomic_get(&cc1200->tx) == 1) { in gpio0_int_handler()
177 if (atomic_get(&cc1200->tx_start) == 0) { in gpio0_int_handler()
178 atomic_set(&cc1200->tx_start, 1); in gpio0_int_handler()
180 atomic_set(&cc1200->tx, 0); in gpio0_int_handler()
183 k_sem_give(&cc1200->tx_sync); in gpio0_int_handler()
185 if (atomic_get(&cc1200->rx) == 1) { in gpio0_int_handler()
186 k_sem_give(&cc1200->rx_lock); in gpio0_int_handler()
187 atomic_set(&cc1200->rx, 0); in gpio0_int_handler()
189 atomic_set(&cc1200->rx, 1); in gpio0_int_handler()
205 struct cc1200_context *cc1200 = dev->data; in setup_gpio_callback() local
207 gpio_init_callback(&cc1200->rx_tx_cb, gpio0_int_handler, BIT(cfg->interrupt.pin)); in setup_gpio_callback()
209 if (gpio_add_callback(cfg->interrupt.port, &cc1200->rx_tx_cb) != 0) { in setup_gpio_callback()
323 struct cc1200_context *cc1200 = dev->data; in rf_install_settings() local
337 cc1200->rf_settings = rf_settings; in rf_install_settings()
452 struct cc1200_context *cc1200 = dev->data; in cc1200_rx() local
459 k_sem_take(&cc1200->rx_lock, K_FOREVER); in cc1200_rx()
472 pkt = net_pkt_rx_alloc_with_buffer(cc1200->iface, pkt_len, in cc1200_rx()
489 if (ieee802154_handle_ack(cc1200->iface, pkt) == NET_OK) { in cc1200_rx()
496 if (net_recv_data(cc1200->iface, pkt) < 0) { in cc1200_rx()
501 log_stack_usage(&cc1200->rx_thread); in cc1200_rx()
527 struct cc1200_context *cc1200 = dev->data; in cc1200_cca() local
529 if (atomic_get(&cc1200->rx) == 0) { in cc1200_cca()
545 struct cc1200_context *cc1200 = dev->data; in cc1200_set_channel() local
564 if (atomic_get(&cc1200->rx) != 0) { in cc1200_set_channel()
608 struct cc1200_context *cc1200 = dev->data; in cc1200_tx() local
640 atomic_set(&cc1200->tx, 1); in cc1200_tx()
641 atomic_set(&cc1200->tx_start, 0); in cc1200_tx()
649 k_sem_take(&cc1200->tx_sync, K_MSEC(100)); in cc1200_tx()
650 if (atomic_get(&cc1200->tx_start) == 1) { in cc1200_tx()
652 k_sem_take(&cc1200->tx_sync, K_MSEC(100)); in cc1200_tx()
658 if (atomic_get(&cc1200->tx) == 1 && in cc1200_tx()
662 atomic_set(&cc1200->tx_start, 0); in cc1200_tx()
669 atomic_set(&cc1200->tx, 0); in cc1200_tx()
753 struct cc1200_context *cc1200 = dev->data; in cc1200_init() local
755 atomic_set(&cc1200->tx, 0); in cc1200_init()
756 atomic_set(&cc1200->tx_start, 0); in cc1200_init()
757 atomic_set(&cc1200->rx, 0); in cc1200_init()
758 k_sem_init(&cc1200->rx_lock, 0, 1); in cc1200_init()
759 k_sem_init(&cc1200->tx_sync, 0, 1); in cc1200_init()
780 k_thread_create(&cc1200->rx_thread, cc1200->rx_stack, in cc1200_init()
784 k_thread_name_set(&cc1200->rx_thread, "cc1200_rx"); in cc1200_init()
794 struct cc1200_context *cc1200 = dev->data; in cc1200_iface_init() local
801 cc1200->iface = iface; in cc1200_iface_init()