#include "its_mode1.h"
#include "its_common.h"
#include "wpan.h"
#include "mrf24j40.h"
#include "config.h"
#include "pic_serial.h"
#include "pic_tick.h"
#include "pic_timer.h"
Go to the source code of this file.
Functions | |
its1_result | its1_controller_handle_association (uns16 pan_id, uns16 its_device_id) |
uns8 | its1_controller_init (uns16 my_device_id, uns16 network_id) |
void | its1_controller_process () |
void | its1_controller_receive_callback (uns16 device_id, uns8 *data, uns8 data_length) |
its1_result | its1_controller_transmit (uns16 device_id, uns8 *data, uns8 data_length) |
its1_result | its1_device_init (uns16 my_device_id, uns16 network_id) |
void | its1_device_process () |
its1_result | its1_device_transmit (uns8 *data, uns8 data_length) |
its1_result | its1_find_controller () |
void | its1_setup_io () |
void | wpan_data_received_callback (wpan_address *addr, uns8 *data, uns8 data_size) |
Variables | |
uns8 | channel |
uns8 | controller_handle |
its1_state | state = STATE_STARTUP |
uns16 | tick_marker |
its1_result its1_controller_handle_association | ( | uns16 | pan_id, | |
uns16 | its_device_id | |||
) |
Definition at line 62 of file its_mode1.c.
References ITS_ASSOC_RES, ITS_DEVICE_NONE, its_transmit_to_handle(), RESULT_FAILED, RESULT_SUCCESSFUL, and serial_print_str().
uns8 its1_controller_init | ( | uns16 | my_device_id, | |
uns16 | network_id | |||
) |
Definition at line 235 of file its_mode1.c.
References its_init(), its_set_device_id(), its_set_network_id(), mrf24j40_scan_for_lowest_channel_ed(), mrf24j40_set_channel(), mrf24j40_set_extended_address(), mrf24j40_set_pan_id(), mrf24j40_set_short_address(), serial_print_nl(), serial_print_str(), serial_print_var(), uns8, and wpan_init().
void its1_controller_process | ( | ) |
Definition at line 279 of file its_mode1.c.
void its1_controller_receive_callback | ( | uns16 | device_id, | |
uns8 * | data, | |||
uns8 | data_length | |||
) |
its1_result its1_controller_transmit | ( | uns16 | device_id, | |
uns8 * | data, | |||
uns8 | data_length | |||
) |
Definition at line 265 of file its_mode1.c.
References ITS_GENERIC_DATA, and its_transmit_to_handle().
its1_result its1_device_init | ( | uns16 | my_device_id, | |
uns16 | network_id | |||
) |
Definition at line 289 of file its_mode1.c.
References its_init(), its_set_device_id(), its_set_network_id(), mrf24j40_set_extended_address(), mrf24j40_set_pan_id(), mrf24j40_set_short_address(), serial_print_str(), state, STATE_UNASSOCIATED, uns8, and wpan_init().
void its1_device_process | ( | ) |
Definition at line 316 of file its_mode1.c.
References channel, ITS_ASSOC_REQ, its_transmit_to_ea(), mrf24j40_set_channel(), MRF_FIRST_CHANNEL, MRF_LAST_CHANNEL, serial_print_nl(), serial_print_str(), serial_print_var(), state, STATE_SEARCHING, STATE_UNASSOCIATED, tick_calc_diff(), tick_get_count(), tick_marker, uns16, and uns8.
its1_result its1_device_transmit | ( | uns8 * | data, | |
uns8 | data_length | |||
) |
Definition at line 352 of file its_mode1.c.
References controller_handle, ITS_GENERIC_DATA, and its_transmit_to_handle().
its1_result its1_find_controller | ( | ) |
Definition at line 310 of file its_mode1.c.
References channel, state, STATE_SEARCHING, tick_get_count(), and tick_marker.
void its1_setup_io | ( | ) |
Definition at line 57 of file its_mode1.c.
References wpan_setup_io().
void wpan_data_received_callback | ( | wpan_address * | addr, | |
uns8 * | data, | |||
uns8 | data_size | |||
) |
Definition at line 155 of file its_mode1.c.
References controller_handle, its1_device_receive_callback(), ITS_ASSOC_RES, ITS_DEVICE_NONE, ITS_GENERIC_DATA, serial_print_int_hex(), serial_print_nl(), serial_print_str(), serial_putc(), wpan_address::source_pan_id, state, STATE_ASSOCIATED, STATE_SEARCHING, STATE_UNASSOCIATED, uns16, uns8, wpan_print_address(), and wpan_print_frame_type().
Referenced by wpan_handle_receive().
uns8 channel |
Definition at line 51 of file its_mode1.c.
Referenced by ar1000_seek_more(), its1_device_process(), its1_find_controller(), its2_device_process(), its2_find_controller(), mrf24j40_active_channel_scan(), and mrf24j40_scan_for_lowest_channel_ed().
uns8 controller_handle |
Definition at line 49 of file its_mode1.c.
Referenced by its1_device_transmit(), its2_device_transmit(), and wpan_data_received_callback().
its1_state state = STATE_STARTUP |
Definition at line 47 of file its_mode1.c.
Referenced by its1_device_init(), its1_device_process(), its1_find_controller(), its2_device_init(), its2_device_process(), its2_find_controller(), and wpan_data_received_callback().
uns16 tick_marker |
Definition at line 50 of file its_mode1.c.
Referenced by its1_device_process(), its1_find_controller(), its2_device_process(), its2_find_controller(), and its2_router_process().