Pic Pack library 3.02 - Embedded Adventures
-
Upload
khangminh22 -
Category
Documents
-
view
1 -
download
0
Transcript of Pic Pack library 3.02 - Embedded Adventures
iii
Table of Contents Data Structure Index ...................................................................................................................................................... 1
File Index ....................................................................................................................................................................... 1
Data Structure Documentation ...................................................................................................................................... 4
buffer_descriptor ....................................................................................................................................................... 4
CDC_ACM_functional_descriptor ............................................................................................................................ 5
CDC_call_mgt_functional_descriptor ....................................................................................................................... 6
CDC_header_functional_descriptor .......................................................................................................................... 7
CDC_union_functional_descriptor ............................................................................................................................ 8
configuration_descriptor ............................................................................................................................................ 9
device_descriptor ..................................................................................................................................................... 10
endpoint_descriptor ................................................................................................................................................. 12
hid_descriptor .......................................................................................................................................................... 13
interface_descriptor ................................................................................................................................................. 15
its2_packet ............................................................................................................................................................... 16
its_address ............................................................................................................................................................... 18
its_device_info......................................................................................................................................................... 19
line_coding .............................................................................................................................................................. 21
local_address ........................................................................................................................................................... 22
long_union ............................................................................................................................................................... 23
queued_item............................................................................................................................................................. 24
remote_address ........................................................................................................................................................ 26
rf_config .................................................................................................................................................................. 27
rf_packet .................................................................................................................................................................. 29
rf_packet_det ........................................................................................................................................................... 30
seen_packet .............................................................................................................................................................. 31
sending_item ............................................................................................................................................................ 32
setup_data_packet .................................................................................................................................................... 34
wpan_address........................................................................................................................................................... 35
File Documentation ..................................................................................................................................................... 37
ar1000.c ................................................................................................................................................................... 37
ar1000.h ................................................................................................................................................................... 44
audio_queue.c .......................................................................................................................................................... 62
audio_queue.h .......................................................................................................................................................... 64
cat4016.c .................................................................................................................................................................. 66
cat4016.h ................................................................................................................................................................. 68
config_bits.h ............................................................................................................................................................ 69
convert.c .................................................................................................................................................................. 70
convert.h .................................................................................................................................................................. 71
debug.h .................................................................................................................................................................... 72
draw.c ...................................................................................................................................................................... 74
draw.h ...................................................................................................................................................................... 82
draw_font_picpack_5x7.c ........................................................................................................................................ 92
draw_screen_buffer.c............................................................................................................................................... 93
draw_screen_buffer.h .............................................................................................................................................. 95
draw_tests.c ............................................................................................................................................................. 97
draw_tests.h ............................................................................................................................................................. 99
drv_ea_ldp6416.c .................................................................................................................................................. 101
drv_ea_ldp6432.c .................................................................................................................................................. 105
drv_ea_ldp8008.c .................................................................................................................................................. 108
drv_pcd8544.c ....................................................................................................................................................... 112
drv_sure_2416.c .................................................................................................................................................... 114
drv_sure_3208.c .................................................................................................................................................... 115
iv
ds1307.c ................................................................................................................................................................. 117
ds1307.h ................................................................................................................................................................. 124
ds1631.c ................................................................................................................................................................. 131
ds1631.h ................................................................................................................................................................. 133
ea_bitmaps.c .......................................................................................................................................................... 137
ea_bitmaps.h .......................................................................................................................................................... 139
ea_ldp6416.c .......................................................................................................................................................... 140
ea_ldp6416.h.......................................................................................................................................................... 142
ea_ldp6432.c .......................................................................................................................................................... 143
ea_ldp6432.h.......................................................................................................................................................... 145
ea_ldp8008.c .......................................................................................................................................................... 146
ea_ldp8008.h.......................................................................................................................................................... 147
hc4led.c .................................................................................................................................................................. 149
hc4led.h ................................................................................................................................................................. 150
hmc6352.c ............................................................................................................................................................. 152
hmc6352.h ............................................................................................................................................................. 158
ht1632.c ................................................................................................................................................................. 168
ht1632.h ................................................................................................................................................................. 171
i2c.c ....................................................................................................................................................................... 176
i2c.h ....................................................................................................................................................................... 191
i2c_hw.c ................................................................................................................................................................. 207
i2c_hw.h ................................................................................................................................................................ 210
its_common.c ......................................................................................................................................................... 212
its_common.h ........................................................................................................................................................ 219
its_mode1.c ............................................................................................................................................................ 229
its_mode1.h ........................................................................................................................................................... 234
its_mode2.c ............................................................................................................................................................ 240
its_mode2.h ........................................................................................................................................................... 254
lcd.c ....................................................................................................................................................................... 270
lcd.h ....................................................................................................................................................................... 276
lm75.c .................................................................................................................................................................... 282
lm75.h .................................................................................................................................................................... 284
m41t81s.c ............................................................................................................................................................... 286
m41t81s.h .............................................................................................................................................................. 298
mrf24j40.c ............................................................................................................................................................. 315
mrf24j40.h ............................................................................................................................................................. 330
mrf24j40_defines.h ................................................................................................................................................ 345
ms5540.c ................................................................................................................................................................ 400
ms5540.h ............................................................................................................................................................... 407
pcd8544.c ............................................................................................................................................................... 411
pcd8544.h .............................................................................................................................................................. 413
pic_flash.c .............................................................................................................................................................. 416
pic_flash.h ............................................................................................................................................................. 416
pic_packet.c ........................................................................................................................................................... 417
pic_packet.h ........................................................................................................................................................... 425
pic_pwm.c ............................................................................................................................................................. 432
pic_pwm.h ............................................................................................................................................................. 434
pic_rf_2401a.c ....................................................................................................................................................... 436
pic_rf_2401a.h ....................................................................................................................................................... 439
pic_rf_24l01.c ........................................................................................................................................................ 445
pic_rf_24l01.h........................................................................................................................................................ 452
pic_serial.c ............................................................................................................................................................. 466
pic_serial.h ............................................................................................................................................................. 480
pic_term.c .............................................................................................................................................................. 493
pic_term.h .............................................................................................................................................................. 495
pic_tick.c ............................................................................................................................................................... 497
v
pic_tick.h ............................................................................................................................................................... 499
pic_timer.c ............................................................................................................................................................. 502
pic_timer.h ............................................................................................................................................................. 503
pic_timer1.c ........................................................................................................................................................... 506
pic_timer1.h ........................................................................................................................................................... 507
pic_usb.c ................................................................................................................................................................ 509
pic_usb.h ................................................................................................................................................................ 522
pic_usb_buffer_mgt.c ............................................................................................................................................ 541
pic_usb_buffer_mgt.h ............................................................................................................................................ 545
pic_utils.c ............................................................................................................................................................... 550
pic_utils.h .............................................................................................................................................................. 550
platform.h .............................................................................................................................................................. 556
platform_leds.c ...................................................................................................................................................... 558
platform_leds.h ...................................................................................................................................................... 560
protocol.h ............................................................................................................................................................... 563
sfe_tdn_v1.h .......................................................................................................................................................... 568
sht15.c .................................................................................................................................................................... 568
sht15.h ................................................................................................................................................................... 574
somo_14d.c ............................................................................................................................................................ 579
somo_14d.h ........................................................................................................................................................... 583
spi.c ........................................................................................................................................................................ 586
spi.h ....................................................................................................................................................................... 588
spi_hw.c ................................................................................................................................................................. 590
spi_hw.h ................................................................................................................................................................. 592
sure_2416.c ............................................................................................................................................................ 594
sure_2416.h ........................................................................................................................................................... 597
sure_7seg.c ............................................................................................................................................................ 602
sure_7seg.h ............................................................................................................................................................ 604
tmp75.c .................................................................................................................................................................. 605
tmp75.h .................................................................................................................................................................. 609
usb_cdc_class.c...................................................................................................................................................... 614
usb_cdc_class.h ..................................................................................................................................................... 625
usb_hid_class.c ...................................................................................................................................................... 628
usb_hid_class.h ...................................................................................................................................................... 630
wpan.c .................................................................................................................................................................... 632
wpan.h ................................................................................................................................................................... 638
Index .......................................................................................................................................................................... 646
1
Data Structure Index
Data Structures Here are the data structures with brief descriptions:
buffer_descriptor .................................................................................................................................4
CDC_ACM_functional_descriptor ....................................................................................................5
CDC_call_mgt_functional_descriptor ...............................................................................................6
CDC_header_functional_descriptor ..................................................................................................7
CDC_union_functional_descriptor ....................................................................................................8
configuration_descriptor ....................................................................................................................9
device_descriptor ............................................................................................................................... 10
endpoint_descriptor .......................................................................................................................... 12
hid_descriptor .................................................................................................................................... 13
interface_descriptor .......................................................................................................................... 15
its2_packet ......................................................................................................................................... 16
its_address .......................................................................................................................................... 18
its_device_info ................................................................................................................................... 19
line_coding ......................................................................................................................................... 21
local_address ...................................................................................................................................... 22
long_union .......................................................................................................................................... 23
queued_item ....................................................................................................................................... 24
remote_address .................................................................................................................................. 26
rf_config ............................................................................................................................................. 27
rf_packet ............................................................................................................................................ 29
rf_packet_det ..................................................................................................................................... 30
seen_packet ........................................................................................................................................ 31
sending_item ...................................................................................................................................... 32
setup_data_packet ............................................................................................................................. 34
wpan_address .................................................................................................................................... 35
File Index
File List Here is a list of all files with brief descriptions:
ar1000.c .............................................................................................................................................. 37
ar1000.h (Routines to access the AR1000 FM radio chip ) .............................................................. 44
audio_queue.c .................................................................................................................................... 62
audio_queue.h (Queue audio files for the somo-14d ) ...................................................................... 64
2
cat4016.c ............................................................................................................................................. 66
cat4016.h ............................................................................................................................................ 68
config_bits.h (Trying the impossible task of creating some commonality around the config settings ) ................................................................................................................................................................ 69
convert.c ............................................................................................................................................. 70
convert.h (Convert pseudo-decimal to strings (typically temperature conversion) ) .................... 71
debug.h (A nice way of printing debug, allowing it to be compiled out for production ) ............. 72
draw.c (Buffered graphics routines ) ................................................................................................. 74
draw.h (Buffered graphics routines ) ................................................................................................ 82
draw_font_picpack_5x7.c (Simple 5x7 font for Draw library ) ...................................................... 92
draw_screen_buffer.c ........................................................................................................................ 93
draw_screen_buffer.h ....................................................................................................................... 95
draw_tests.c (Routines to test the Draw graphics functions ) ......................................................... 97
draw_tests.h (Routines to test the Draw graphics functions ) ......................................................... 99
drv_ea_ldp6416.c (Draw drivers for Embedded Adventures LDP-6416 LED panel and similar ) 101
drv_ea_ldp6432.c (Draw drivers for Embedded Adventures LDP-6432 LED panel and similar ) 105
drv_ea_ldp8008.c (Draw drivers for Embedded Adventures LDP-8008 LED panel and similar ) 108
drv_pcd8544.c (Draw drivers for PCD8544 based LCD display (Nokia 3310) ) ......................... 112
drv_sure_2416.c ............................................................................................................................... 114
drv_sure_3208.c (Draw drivers for HT1632 based displays such as Sure 3208 and similar ) .... 115
ds1307.c ............................................................................................................................................ 117
ds1307.h (Routines for communicating with the ds1307 real time clock ) ................................... 124
ds1631.c ............................................................................................................................................ 131
ds1631.h (DS1631 temperature sensor routines ) ........................................................................... 133
ea_bitmaps.c (Bitmaps for draw library testing ) .......................................................................... 137
ea_bitmaps.h (Bitmaps for draw library testing ) .......................................................................... 139
ea_ldp6416.c ..................................................................................................................................... 140
ea_ldp6416.h (Support routines for LDP-6416 LED display panel ) ............................................ 142
ea_ldp6432.c ..................................................................................................................................... 143
ea_ldp6432.h (Support routines for the LDP-6432 LED display panel ) ..................................... 145
ea_ldp8008.c ..................................................................................................................................... 146
ea_ldp8008.h (Support for LDP-8008 80x08 LED panel ) ............................................................. 147
hc4led.c ............................................................................................................................................. 149
hc4led.h (Routines to access four digit LED display ) ................................................................... 150
hmc6352.c ......................................................................................................................................... 152
hmc6352.h (Routines for communicating with the hmc6352 digital compass ) ........................... 158
ht1632.c ............................................................................................................................................ 168
ht1632.h (Holtek LED matrix display routines, used in Sure 2416 display and others ) ............ 171
i2c.c ................................................................................................................................................... 176
i2c.h (I2C software routines ) ........................................................................................................... 191
i2c_hw.c ............................................................................................................................................ 207
i2c_hw.h (Outputs i2c interfaces (clock+data) ) ............................................................................. 210
its_common.c ................................................................................................................................... 212
its_common.h ................................................................................................................................... 219
its_mode1.c ....................................................................................................................................... 229
its_mode1.h (ITS networking mode 1 ) ........................................................................................... 234
3
its_mode2.c ....................................................................................................................................... 240
its_mode2.h (ITS Mesh networking mode 2 ) ................................................................................. 254
lcd.c ................................................................................................................................................... 270
lcd.h (LCD routines ) ........................................................................................................................ 276
lm75.c ............................................................................................................................................... 282
lm75.h (LM75 temperature sensor routines ) ................................................................................. 284
m41t81s.c .......................................................................................................................................... 286
m41t81s.h (Routines for communicating with the m41t81s real time clock ) .............................. 298
mrf24j40.c ........................................................................................................................................ 315
mrf24j40.h (Microchip mrf24j40 IEEE 802.15.4 module routines ) ............................................. 330
mrf24j40_defines.h (Defines for MRF24J40 chip - generated from the datasheet ) ................... 345
ms5540.c ........................................................................................................................................... 400
ms5540.h (MS5540 temperature and pressure sensor routines ) .................................................. 407
pcd8544.c .......................................................................................................................................... 411
pcd8544.h (PCD8544 Interface routines (used in Nokia 3310 LCD) ) .......................................... 413
pic_flash.c ......................................................................................................................................... 416
pic_flash.h (Flash write / erase routines ) ....................................................................................... 416
pic_packet.c ..................................................................................................................................... 417
pic_packet.h (Pic meshed packed network library ) ...................................................................... 425
pic_pwm.c ........................................................................................................................................ 432
pic_pwm.h (Software (timer-based) PWM ) ................................................................................... 434
pic_rf_2401a.c .................................................................................................................................. 436
pic_rf_2401a.h (Pic Nordic nrf2401a routines ) ............................................................................. 439
pic_rf_24l01.c ................................................................................................................................... 445
pic_rf_24l01.h (RF routines for the Nordic nRF24L01 chip ) ....................................................... 452
pic_serial.c ....................................................................................................................................... 466
pic_serial.h (Interrupt driven fifo serial support ) ......................................................................... 480
pic_term.c ......................................................................................................................................... 493
pic_term.h (Pic terminal routines ) ................................................................................................. 495
pic_tick.c .......................................................................................................................................... 497
pic_tick.h (Timer helper routines ) .................................................................................................. 499
pic_timer.c ....................................................................................................................................... 502
pic_timer.h (Access to timer 0 ) ....................................................................................................... 503
pic_timer1.c ..................................................................................................................................... 506
pic_timer1.h (Timer 1 support ) ...................................................................................................... 507
pic_usb.c ........................................................................................................................................... 509
pic_usb.h (Pic USB routines ) ........................................................................................................... 522
pic_usb_buffer_mgt.c ...................................................................................................................... 541
pic_usb_buffer_mgt.h (Pic USB buffer routines ) .......................................................................... 545
pic_utils.c ......................................................................................................................................... 550
pic_utils.h (Generic PIC helper routines ) ...................................................................................... 550
platform.h (Platform definitions ) ................................................................................................... 556
platform_leds.c ................................................................................................................................ 558
platform_leds.h (Easy access to the LEDs on your platform ) ...................................................... 560
protocol.h (Protocol definitions for Pkt mesh network ) ............................................................... 563
4
sfe_tdn_v1.h ..................................................................................................................................... 568
sht15.c ............................................................................................................................................... 568
sht15.h (Support for SHT15 and SHT11 digital humidity sensors ) ............................................. 574
somo_14d.c ....................................................................................................................................... 579
somo_14d.h (Somo-14D audio player interface ) ............................................................................ 583
spi.c ................................................................................................................................................... 586
spi.h (Outputs SPI-like interfaces (clock+data) ) ........................................................................... 588
spi_hw.c ............................................................................................................................................ 590
spi_hw.h ........................................................................................................................................... 592
sure_2416.c (Sure 2416 led matrix display routines ) .................................................................... 594
sure_2416.h (Sure 2416 led matrix display routines ) .................................................................... 597
sure_7seg.c (Routines to talk to Sure electronics seven segment displays ) ................................. 602
sure_7seg.h (Routines to talk to Sure electronics seven segment displays ) ................................. 604
tmp75.c (Routines to access TMP75 temperature sensor ) ............................................................ 605
tmp75.h (Routines to access TMP75 temperature sensor ) ........................................................... 609
usb_cdc_class.c (Pic CDC USB routines ) ....................................................................................... 614
usb_cdc_class.h (USB Communications Device Class (Serial Port) routines ) ............................ 625
usb_hid_class.c (Callbacks for implementing USB HID class ) .................................................... 628
usb_hid_class.h (Helper definitions for USB HID class ) .............................................................. 630
wpan.c (Wireless Personal Area Network routines ) ..................................................................... 632
wpan.h (Wireless Personal Area Network routines ) ..................................................................... 638
Data Structure Documentation
buffer_descriptor Struct Reference
#include <pic_usb.h>
Data Fields
uns16 addr
uns8 count
uns8 stat
Detailed Description
Describes the USB endpoint buffer descriptor
Definition at line 159 of file pic_usb.h.
5
Field Documentation
uns16 buffer_descriptor::addr
Definition at line 162 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_transaction(),
usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(), and usb_send_data_chunk().
uns8 buffer_descriptor::count
Definition at line 160 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_transaction(),
usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(), and usb_send_data_chunk().
uns8 buffer_descriptor::stat
Definition at line 160 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_stall(),
usb_handle_standard_request(), usb_handle_transaction(), usb_prime_ep0_out_e(), usb_prime_ep0_out_o(),
usb_send_data(), usb_send_data_chunk(), usb_send_empty_data_pkt(), usb_send_one_byte(), usb_stall_ep0(),
and usb_stall_on_in().
The documentation for this struct was generated from the following file:
pic_usb.h
CDC_ACM_functional_descriptor Struct Reference
#include <pic_usb.h>
Data Fields
uns8 capabilities
uns8 descriptor_subtype
uns8 descriptor_type
uns8 length
Detailed Description
Definition at line 367 of file pic_usb.h.
6
Field Documentation
uns8 CDC_ACM_functional_descriptor::capabilities
Definition at line 368 of file pic_usb.h.
uns8 CDC_ACM_functional_descriptor::descriptor_subtype
Definition at line 368 of file pic_usb.h.
uns8 CDC_ACM_functional_descriptor::descriptor_type
Definition at line 368 of file pic_usb.h.
uns8 CDC_ACM_functional_descriptor::length
Definition at line 368 of file pic_usb.h.
The documentation for this struct was generated from the following file:
pic_usb.h
CDC_call_mgt_functional_descriptor Struct Reference
#include <pic_usb.h>
Data Fields
uns8 capabilities
uns8 data_interface
uns8 descriptor_subtype
uns8 descriptor_type
uns8 length
Detailed Description
Definition at line 382 of file pic_usb.h.
Field Documentation
uns8 CDC_call_mgt_functional_descriptor::capabilities
7
Definition at line 383 of file pic_usb.h.
uns8 CDC_call_mgt_functional_descriptor::data_interface
Definition at line 383 of file pic_usb.h.
uns8 CDC_call_mgt_functional_descriptor::descriptor_subtype
Definition at line 383 of file pic_usb.h.
uns8 CDC_call_mgt_functional_descriptor::descriptor_type
Definition at line 383 of file pic_usb.h.
uns8 CDC_call_mgt_functional_descriptor::length
Definition at line 383 of file pic_usb.h.
The documentation for this struct was generated from the following file:
pic_usb.h
CDC_header_functional_descriptor Struct Reference
#include <pic_usb.h>
Data Fields
uns16 CDC_version
uns8 descriptor_subtype
uns8 descriptor_type
uns8 length
Detailed Description
Definition at line 360 of file pic_usb.h.
Field Documentation
uns16 CDC_header_functional_descriptor::CDC_version
Definition at line 364 of file pic_usb.h.
8
uns8 CDC_header_functional_descriptor::descriptor_subtype
Definition at line 361 of file pic_usb.h.
uns8 CDC_header_functional_descriptor::descriptor_type
Definition at line 361 of file pic_usb.h.
uns8 CDC_header_functional_descriptor::length
Definition at line 361 of file pic_usb.h.
The documentation for this struct was generated from the following file:
pic_usb.h
CDC_union_functional_descriptor Struct Reference
#include <pic_usb.h>
Data Fields
uns8 descriptor_subtype
uns8 descriptor_type
uns8 length
uns8 master_interface
uns8 slave_interface
Detailed Description
Definition at line 374 of file pic_usb.h.
Field Documentation
uns8 CDC_union_functional_descriptor::descriptor_subtype
Definition at line 375 of file pic_usb.h.
uns8 CDC_union_functional_descriptor::descriptor_type
Definition at line 375 of file pic_usb.h.
9
uns8 CDC_union_functional_descriptor::length
Definition at line 375 of file pic_usb.h.
uns8 CDC_union_functional_descriptor::master_interface
Definition at line 375 of file pic_usb.h.
uns8 CDC_union_functional_descriptor::slave_interface
Definition at line 375 of file pic_usb.h.
The documentation for this struct was generated from the following file:
pic_usb.h
configuration_descriptor Struct Reference
#include <pic_usb.h>
Data Fields
uns8 attributes
uns8 configuration_string_id
uns8 configuration_value
uns8 descriptor_type
uns8 length
uns8 max_power
uns8 num_interfaces
uns16 total_length
Detailed Description
Configuration descriptor
Definition at line 312 of file pic_usb.h.
Field Documentation
uns8 configuration_descriptor::attributes
Definition at line 316 of file pic_usb.h.
10
uns8 configuration_descriptor::configuration_string_id
Definition at line 316 of file pic_usb.h.
uns8 configuration_descriptor::configuration_value
Definition at line 316 of file pic_usb.h.
uns8 configuration_descriptor::descriptor_type
Definition at line 313 of file pic_usb.h.
uns8 configuration_descriptor::length
Definition at line 313 of file pic_usb.h.
uns8 configuration_descriptor::max_power
Definition at line 316 of file pic_usb.h.
uns8 configuration_descriptor::num_interfaces
Definition at line 316 of file pic_usb.h.
uns16 configuration_descriptor::total_length
Definition at line 315 of file pic_usb.h.
The documentation for this struct was generated from the following file:
pic_usb.h
device_descriptor Struct Reference
#include <pic_usb.h>
Data Fields
uns8 descriptor_type
uns8 device_class
uns8 device_protocol
uns16 device_release
uns8 device_subclass
11
uns8 length
uns8 manufacturer_string_id
uns8 max_packet_size_ep0
uns8 num_configurations
uns16 product_id
uns8 product_string_id
uns8 serial_string_id
uns16 usb_version
uns16 vendor_id
Detailed Description
Device descriptor
Definition at line 294 of file pic_usb.h.
Field Documentation
uns8 device_descriptor::descriptor_type
Definition at line 295 of file pic_usb.h.
uns8 device_descriptor::device_class
Definition at line 298 of file pic_usb.h.
uns8 device_descriptor::device_protocol
Definition at line 298 of file pic_usb.h.
uns16 device_descriptor::device_release
Definition at line 302 of file pic_usb.h.
uns8 device_descriptor::device_subclass
Definition at line 298 of file pic_usb.h.
uns8 device_descriptor::length
Definition at line 295 of file pic_usb.h.
uns8 device_descriptor::manufacturer_string_id
Definition at line 305 of file pic_usb.h.
12
uns8 device_descriptor::max_packet_size_ep0
Definition at line 301 of file pic_usb.h.
uns8 device_descriptor::num_configurations
Definition at line 305 of file pic_usb.h.
uns16 device_descriptor::product_id
Definition at line 302 of file pic_usb.h.
uns8 device_descriptor::product_string_id
Definition at line 305 of file pic_usb.h.
uns8 device_descriptor::serial_string_id
Definition at line 305 of file pic_usb.h.
uns16 device_descriptor::usb_version
Definition at line 297 of file pic_usb.h.
uns16 device_descriptor::vendor_id
Definition at line 302 of file pic_usb.h.
The documentation for this struct was generated from the following file:
pic_usb.h
endpoint_descriptor Struct Reference
#include <pic_usb.h>
Data Fields
uns8 attributes
uns8 descriptor_type
uns8 endpoint_address
uns8 interval
uns8 length
13
uns16 max_packet_size
Detailed Description
Endpoint descriptor
Definition at line 339 of file pic_usb.h.
Field Documentation
uns8 endpoint_descriptor::attributes
Definition at line 340 of file pic_usb.h.
uns8 endpoint_descriptor::descriptor_type
Definition at line 340 of file pic_usb.h.
uns8 endpoint_descriptor::endpoint_address
Definition at line 340 of file pic_usb.h.
uns8 endpoint_descriptor::interval
Definition at line 345 of file pic_usb.h.
uns8 endpoint_descriptor::length
Definition at line 340 of file pic_usb.h.
uns16 endpoint_descriptor::max_packet_size
Definition at line 344 of file pic_usb.h.
The documentation for this struct was generated from the following file:
pic_usb.h
hid_descriptor Struct Reference
#include <pic_usb.h>
14
Data Fields
uns16 class_descriptor_length
uns8 class_descriptor_type
uns8 country_code
uns8 descriptor_type
uns16 hid_spec
uns8 length
uns8 num_class_descriptors
Detailed Description
Human Interface Device descriptor
Definition at line 349 of file pic_usb.h.
Field Documentation
uns16 hid_descriptor::class_descriptor_length
Definition at line 356 of file pic_usb.h.
uns8 hid_descriptor::class_descriptor_type
Definition at line 353 of file pic_usb.h.
uns8 hid_descriptor::country_code
Definition at line 353 of file pic_usb.h.
uns8 hid_descriptor::descriptor_type
Definition at line 350 of file pic_usb.h.
uns16 hid_descriptor::hid_spec
Definition at line 352 of file pic_usb.h.
uns8 hid_descriptor::length
Definition at line 350 of file pic_usb.h.
uns8 hid_descriptor::num_class_descriptors
Definition at line 353 of file pic_usb.h.
15
The documentation for this struct was generated from the following file:
pic_usb.h
interface_descriptor Struct Reference
#include <pic_usb.h>
Data Fields
uns8 alternate_setting
uns8 descriptor_type
uns8 interface_class
uns8 interface_number
uns8 interface_protocol
uns8 interface_string_id
uns8 interface_subclass
uns8 length
uns8 num_endpoints
Detailed Description
Interface descriptor
Definition at line 326 of file pic_usb.h.
Field Documentation
uns8 interface_descriptor::alternate_setting
Definition at line 327 of file pic_usb.h.
uns8 interface_descriptor::descriptor_type
Definition at line 327 of file pic_usb.h.
uns8 interface_descriptor::interface_class
Definition at line 327 of file pic_usb.h.
uns8 interface_descriptor::interface_number
Definition at line 327 of file pic_usb.h.
16
uns8 interface_descriptor::interface_protocol
Definition at line 327 of file pic_usb.h.
uns8 interface_descriptor::interface_string_id
Definition at line 327 of file pic_usb.h.
uns8 interface_descriptor::interface_subclass
Definition at line 327 of file pic_usb.h.
uns8 interface_descriptor::length
Definition at line 327 of file pic_usb.h.
uns8 interface_descriptor::num_endpoints
Definition at line 327 of file pic_usb.h.
The documentation for this struct was generated from the following file:
pic_usb.h
its2_packet Struct Reference
#include <its_mode2.h>
Data Fields
uns8 hop_count
uns16 its_dest_id
uns16 its_network_id
uns16 its_source_id
uns8 max_hop_count
uns8 num_routes
uns8 packet_type
uns16 routers [ITS2_MAX_HOP_COUNT]
uns8 sequence
Detailed Description
ITS2 Packet definition
Definition at line 120 of file its_mode2.h.
17
Field Documentation
uns8 its2_packet::hop_count
Number of routes (hops) specified for this packet to take
Definition at line 128 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_print_packet(), its2_rebroadcast_net_discover_req(), and
its2_router_queue_packet().
uns16 its2_packet::its_dest_id
ITS device ID of sender
Definition at line 125 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_print_packet(), its2_print_queue(), and
its2_router_queue_packet().
uns16 its2_packet::its_network_id
Sequence of packet (incremented for each packet)
Definition at line 123 of file its_mode2.h.
Referenced by its2_print_packet(), and its2_router_queue_packet().
uns16 its2_packet::its_source_id
Network ID of packet
Definition at line 124 of file its_mode2.h.
Referenced by its2_print_packet(), its2_print_queue(), its2_process_tx_queue(),
its2_rebroadcast_net_discover_req(), and its2_router_queue_packet().
uns8 its2_packet::max_hop_count
ITS device ID of destination
Definition at line 126 of file its_mode2.h.
Referenced by its2_print_packet(), its2_rebroadcast_net_discover_req(), and its2_router_queue_packet().
uns8 its2_packet::num_routes
Maximum number of permitted routes
Definition at line 127 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_print_packet(), its2_rebroadcast_net_discover_req(), and
its2_transmit().
uns8 its2_packet::packet_type
Definition at line 121 of file its_mode2.h.
Referenced by its2_print_packet(), and its2_router_queue_packet().
18
uns16 its2_packet::routers[ITS2_MAX_HOP_COUNT]
Number of routes (hops) already made by this packet
Definition at line 129 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_print_packet(), its2_rebroadcast_net_discover_req(), and
its2_transmit().
uns8 its2_packet::sequence
Type of packet (see its_common.h)
Definition at line 122 of file its_mode2.h.
Referenced by its2_print_packet(), its2_rebroadcast_net_discover_req(), and its2_router_queue_packet().
The documentation for this struct was generated from the following file:
its_mode2.h
its_address Union Reference
#include <its_common.h>
Collaboration diagram for its_address:
Data Fields
local_address local
remote_address remote
19
Detailed Description
Union of local and remote addresses
Definition at line 93 of file its_common.h.
Field Documentation
local_address its_address::local
Definition at line 94 of file its_common.h.
Referenced by its2_transmit(), its_add_local_device(), and its_transmit_to_handle().
remote_address its_address::remote
Definition at line 95 of file its_common.h.
Referenced by its2_forward_routed_packet(), and its_add_net_device().
The documentation for this union was generated from the following file:
its_common.h
its_device_info Struct Reference
#include <its_common.h>
Collaboration diagram for its_device_info:
20
Data Fields
its_address addr
uns16 its_device_id
Detailed Description
Device info - its_device_id and address (local or remote)
Definition at line 99 of file its_common.h.
Field Documentation
its_address its_device_info::addr
Definition at line 101 of file its_common.h.
Referenced by its2_forward_routed_packet(), its2_transmit(), its_add_local_device(), its_add_net_device(), and
its_transmit_to_handle().
21
uns16 its_device_info::its_device_id
Definition at line 100 of file its_common.h.
Referenced by its_add_local_device(), its_add_net_device(), its_init(), and its_transmit_to_handle().
The documentation for this struct was generated from the following file:
its_common.h
line_coding Struct Reference
Collaboration diagram for line_coding:
Data Fields
uns8 data_bits
long_union dte_rate
uns8 parity
uns8 stop_bits
Detailed Description
Line coding struction that defines what (should) happen if we were actually USB to RS232 converter
Definition at line 84 of file usb_cdc_class.c.
22
Field Documentation
uns8 line_coding::data_bits
Definition at line 88 of file usb_cdc_class.c.
Referenced by usb_handle_class_ctrl_write_callback(), and usb_handle_class_request_callback().
long_union line_coding::dte_rate
Definition at line 85 of file usb_cdc_class.c.
Referenced by usb_handle_class_ctrl_write_callback(), and usb_handle_class_request_callback().
uns8 line_coding::parity
Definition at line 87 of file usb_cdc_class.c.
Referenced by usb_handle_class_ctrl_write_callback(), and usb_handle_class_request_callback().
uns8 line_coding::stop_bits
Definition at line 86 of file usb_cdc_class.c.
Referenced by usb_handle_class_ctrl_write_callback(), and usb_handle_class_request_callback().
The documentation for this struct was generated from the following file:
usb_cdc_class.c
local_address Struct Reference
#include <its_common.h>
Data Fields
uns16 pan_id
uns16 short_address
Detailed Description
Local address definition
Definition at line 81 of file its_common.h.
23
Field Documentation
uns16 local_address::pan_id
Definition at line 82 of file its_common.h.
Referenced by its2_transmit(), and its_add_local_device().
uns16 local_address::short_address
Definition at line 83 of file its_common.h.
Referenced by its2_transmit(), its_add_local_device(), and its_transmit_to_handle().
The documentation for this struct was generated from the following file:
its_common.h
long_union Union Reference
Data Fields
uns8 as_byte_array [4]
long as_long
Detailed Description
Definition at line 76 of file usb_cdc_class.c.
Field Documentation
uns8 long_union::as_byte_array[4]
Definition at line 78 of file usb_cdc_class.c.
Referenced by usb_handle_class_ctrl_write_callback(), and usb_handle_class_request_callback().
long long_union::as_long
Definition at line 77 of file usb_cdc_class.c.
Referenced by usb_cdc_setup(), and usb_handle_class_ctrl_write_callback().
24
The documentation for this union was generated from the following file:
usb_cdc_class.c
queued_item Struct Reference
#include <its_mode2.h>
Collaboration diagram for queued_item:
Data Fields
uns8 * data
uns8 data_length
uns8 dest_device_handle
uns16 dest_its_device_id
uns8 flag
25
its2_packet packet
uns8 sent_count
uns8 status
uns16 tick_sent
Detailed Description
Definition at line 132 of file its_mode2.h.
Field Documentation
uns8* queued_item::data
Definition at line 134 of file its_mode2.h.
Referenced by its2_delete_item_from_queue(), its2_forward_routed_packet(),
its2_rebroadcast_net_discover_req(), its2_router_queue_packet(), and its2_transmit().
uns8 queued_item::data_length
Definition at line 135 of file its_mode2.h.
Referenced by its2_delete_item_from_queue(), its2_forward_routed_packet(),
its2_rebroadcast_net_discover_req(), its2_router_queue_packet(), and its2_transmit().
uns8 queued_item::dest_device_handle
Definition at line 137 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_rebroadcast_net_discover_req(), and its2_transmit().
uns16 queued_item::dest_its_device_id
Definition at line 136 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_process_tx_queue(), its2_rebroadcast_net_discover_req(),
its2_router_queue_packet(), and its2_transmit().
uns8 queued_item::flag
Definition at line 141 of file its_mode2.h.
Referenced by its2_delete_item_from_queue(), its2_forward_routed_packet(), its2_print_queue(),
its2_process_tx_queue(), its2_rebroadcast_net_discover_req(), its2_router_init(), its2_router_queue_packet(),
and its2_transmit().
its2_packet queued_item::packet
Definition at line 133 of file its_mode2.h.
26
Referenced by its2_forward_routed_packet(), its2_print_queue(), its2_process_tx_queue(),
its2_rebroadcast_net_discover_req(), its2_router_queue_packet(), and its2_transmit().
uns8 queued_item::sent_count
Definition at line 139 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_print_queue(), its2_process_tx_queue(),
its2_rebroadcast_net_discover_req(), its2_router_queue_packet(), and its2_transmit().
uns8 queued_item::status
Definition at line 140 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_print_queue(), its2_process_tx_queue(),
its2_rebroadcast_net_discover_req(), and its2_transmit().
uns16 queued_item::tick_sent
Definition at line 138 of file its_mode2.h.
Referenced by its2_print_queue(), its2_process_tx_queue(), and its2_transmit().
The documentation for this struct was generated from the following file:
its_mode2.h
remote_address Struct Reference
#include <its_common.h>
Data Fields
uns16 prior_device_id
uns16 remote_indicator
Detailed Description
Remote address definition
Definition at line 87 of file its_common.h.
Field Documentation
uns16 remote_address::prior_device_id
27
Definition at line 89 of file its_common.h.
Referenced by its_add_net_device().
uns16 remote_address::remote_indicator
Definition at line 88 of file its_common.h.
Referenced by its2_forward_routed_packet(), and its_add_net_device().
The documentation for this struct was generated from the following file:
its_common.h
rf_config Struct Reference
#include <pic_rf_2401a.h>
Data Fields
uns8 address_ch1 [5]
uns8 address_ch2 [5]
uns8 address_width
uns8 channel
uns8 crystal
uns8 options
uns8 output_power
uns8 payload_width_ch1
uns8 payload_width_ch2
Detailed Description
RF configuration structure
Definition at line 80 of file pic_rf_2401a.h.
Field Documentation
uns8 rf_config::address_ch1
Address of channel 1
Definition at line 84 of file pic_rf_2401a.h.
Referenced by pic_rf_init().
uns8 rf_config::address_ch2
Address of channel 2
28
Definition at line 83 of file pic_rf_2401a.h.
Referenced by pic_rf_init().
uns8 rf_config::address_width
Address width in bits
Definition at line 85 of file pic_rf_2401a.h.
Referenced by pic_rf_init().
uns8 rf_config::channel
Channel to operate on, 7 bits valid
Definition at line 88 of file pic_rf_2401a.h.
Referenced by pic_rf_init().
uns8 rf_config::crystal
Crystal frequency look up, 3 bits valid
Definition at line 86 of file pic_rf_2401a.h.
Referenced by pic_rf_init().
uns8 rf_config::options
Options (see option bits)
Definition at line 89 of file pic_rf_2401a.h.
Referenced by pic_rf_init().
uns8 rf_config::output_power
Output power, 2 bits valid
Definition at line 87 of file pic_rf_2401a.h.
Referenced by pic_rf_init().
uns8 rf_config::payload_width_ch1
Payload width of channel 1 in bits
Definition at line 82 of file pic_rf_2401a.h.
Referenced by pic_rf_init().
uns8 rf_config::payload_width_ch2
Payload width of channel 2 in bits
Definition at line 81 of file pic_rf_2401a.h.
Referenced by pic_rf_init().
The documentation for this struct was generated from the following files:
pic_rf_2401a.h
pic_rf_24l01.h
29
rf_packet Union Reference
Collaboration diagram for rf_packet:
Data Fields
char a [PKT_PACKET_SIZE]
rf_packet_det d
Detailed Description
Definition at line 50 of file pic_packet.c.
Field Documentation
char rf_packet::a[PKT_PACKET_SIZE]
Definition at line 52 of file pic_packet.c.
Referenced by pkt_calc_check_byte(), pkt_check_check_byte(), and pkt_send_packet().
rf_packet_det rf_packet::d
30
Definition at line 51 of file pic_packet.c.
Referenced by pkt_calc_check_byte(), pkt_check_check_byte(), pkt_print_packet(), pkt_process_rf_data(),
pkt_process_tx_queue(), and pkt_send_payload().
The documentation for this union was generated from the following file:
pic_packet.c
rf_packet_det Struct Reference
#include <pic_packet.h>
Data Fields
uns8 check_byte
uns16 dest_addr
uns8 payload [PKT_PAYLOAD_SIZE]
uns16 pkt_id
uns16 r1_addr
uns16 r2_addr
uns16 r3_addr
uns16 source_addr
Detailed Description
Internal packet structure. You shouldn't need to worry about this generally
Definition at line 190 of file pic_packet.h.
Field Documentation
uns8 rf_packet_det::check_byte
Definition at line 198 of file pic_packet.h.
Referenced by pkt_calc_check_byte(), and pkt_check_check_byte().
uns16 rf_packet_det::dest_addr
Definition at line 193 of file pic_packet.h.
Referenced by pkt_print_packet(), pkt_process_rf_data(), pkt_process_tx_queue(), and pkt_send_payload().
uns8 rf_packet_det::payload[PKT_PAYLOAD_SIZE]
31
Definition at line 197 of file pic_packet.h.
Referenced by pkt_print_packet(), pkt_process_tx_queue(), and pkt_send_payload().
uns16 rf_packet_det::pkt_id
Definition at line 192 of file pic_packet.h.
Referenced by pkt_print_packet(), pkt_process_rf_data(), pkt_process_tx_queue(), and pkt_send_payload().
uns16 rf_packet_det::r1_addr
Definition at line 194 of file pic_packet.h.
Referenced by pkt_print_packet(), pkt_process_tx_queue(), and pkt_send_payload().
uns16 rf_packet_det::r2_addr
Definition at line 195 of file pic_packet.h.
Referenced by pkt_print_packet(), and pkt_send_payload().
uns16 rf_packet_det::r3_addr
Definition at line 196 of file pic_packet.h.
Referenced by pkt_print_packet(), and pkt_send_payload().
uns16 rf_packet_det::source_addr
Definition at line 191 of file pic_packet.h.
Referenced by pkt_print_packet(), and pkt_send_payload().
The documentation for this struct was generated from the following file:
pic_packet.h
seen_packet Struct Reference
#include <its_mode2.h>
Data Fields
uns16 its_source_id
uns16 pkt_id
uns8 sequence
uns16 source_addr
32
Detailed Description
Definition at line 144 of file its_mode2.h.
Field Documentation
uns16 seen_packet::its_source_id
Definition at line 146 of file its_mode2.h.
Referenced by its2_router_init().
uns16 seen_packet::pkt_id
Definition at line 66 of file pic_packet.c.
Referenced by pkt_process_rf_data().
uns8 seen_packet::sequence
Definition at line 145 of file its_mode2.h.
uns16 seen_packet::source_addr
Definition at line 67 of file pic_packet.c.
Referenced by pkt_init(), and pkt_process_rf_data().
The documentation for this struct was generated from the following files:
its_mode2.h
pic_packet.c
sending_item Struct Reference
Collaboration diagram for sending_item:
33
Data Fields
uns8 flag
rf_packet packet
uns8 sent_count
uns16 tick_sent
Detailed Description
Definition at line 57 of file pic_packet.c.
34
Field Documentation
uns8 sending_item::flag
Definition at line 61 of file pic_packet.c.
Referenced by pkt_init(), pkt_process_rf_data(), pkt_process_tx_queue(), and pkt_queue_packet().
rf_packet sending_item::packet
Definition at line 58 of file pic_packet.c.
Referenced by pkt_process_rf_data(), and pkt_process_tx_queue().
uns8 sending_item::sent_count
Definition at line 60 of file pic_packet.c.
Referenced by pkt_process_tx_queue(), and pkt_queue_packet().
uns16 sending_item::tick_sent
Definition at line 59 of file pic_packet.c.
Referenced by pkt_process_tx_queue().
The documentation for this struct was generated from the following file:
pic_packet.c
setup_data_packet Struct Reference
#include <pic_usb.h>
Data Fields
uns8 bmRequestType
uns8 bRequest
uns16 wIndex
uns16 wLength
uns16 wValue
Detailed Description
Describes a set up data packet, part of the control transfer
Definition at line 166 of file pic_usb.h.
35
Field Documentation
uns8 setup_data_packet::bmRequestType
Definition at line 167 of file pic_usb.h.
Referenced by usb_handle_transaction().
uns8 setup_data_packet::bRequest
Definition at line 167 of file pic_usb.h.
Referenced by usb_handle_class_ctrl_read_callback(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_standard_request(), and usb_handle_transaction().
uns16 setup_data_packet::wIndex
Definition at line 169 of file pic_usb.h.
Referenced by usb_handle_transaction().
uns16 setup_data_packet::wLength
Definition at line 169 of file pic_usb.h.
Referenced by usb_handle_class_request_callback(), usb_handle_standard_request(), and
usb_handle_transaction().
uns16 setup_data_packet::wValue
Definition at line 169 of file pic_usb.h.
Referenced by usb_handle_class_request_callback(), usb_handle_standard_request(), and
usb_handle_transaction().
The documentation for this struct was generated from the following file:
pic_usb.h
wpan_address Struct Reference
#include <wpan.h>
Data Fields
uns8 dest_address_type
36
uns8 dest_ea [8]
uns16 dest_pan_id
uns16 dest_sa
uns8 source_address_type
uns8 source_ea [8]
uns16 source_pan_id
uns16 source_sa
Detailed Description
Definition at line 84 of file wpan.h.
Field Documentation
uns8 wpan_address::dest_address_type
Definition at line 90 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_address().
uns8 wpan_address::dest_ea[8]
Definition at line 93 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_address().
uns16 wpan_address::dest_pan_id
Definition at line 91 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_address().
uns16 wpan_address::dest_sa
Definition at line 92 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_address().
uns8 wpan_address::source_address_type
Definition at line 85 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_address().
uns8 wpan_address::source_ea[8]
Definition at line 88 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_address().
37
uns16 wpan_address::source_pan_id
Definition at line 86 of file wpan.h.
Referenced by wpan_data_received_callback(), wpan_handle_receive(), and wpan_print_address().
uns16 wpan_address::source_sa
Definition at line 87 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_address().
The documentation for this struct was generated from the following file:
wpan.h
File Documentation
ar1000.c File Reference #include "ar1000.h" #include "pic_serial.h" Include dependency graph for ar1000.c:
Functions
uns8 ar1000_get_register (uns8 reg)
void ar1000_init ()
38
uns16 ar1000_read_register (uns8 reg)
void ar1000_read_registers ()
void ar1000_seek (uns16 frequency, bit seek_up)
void ar1000_seek2 ()
void ar1000_seek_more ()
void ar1000_set_register (uns8 reg, uns8 data)
void ar1000_set_seek_threshold (uns8 new_seek_threshold)
void ar1000_set_volume (uns8 volume)
void ar1000_setup_io ()
Setup AR1000 ports and pins. void ar1000_test ()
void ar1000_tune (uns16 frequency)
void ar1000_write_register (uns8 reg, uns16 data)
void ar1000_write_registers ()
Variables
uns8 ar1000_seek_threshold
uns16 regs [18]
rom uns8 vol_lookup []
Function Documentation
uns8 ar1000_get_register (uns8 reg)
Definition at line 55 of file ar1000.c.
References regs.
void ar1000_init ()
Definition at line 224 of file ar1000.c.
References AR1000_DEV_ADDR, ar1000_seek_threshold, i2c_write_eeprom_16bit(), regs, and uns8.
Referenced by ar1000_seek2(), ar1000_seek_more(), ar1000_set_volume(), and ar1000_tune().
Here is the call graph for this function:
Here is the caller graph for this function:
39
uns16 ar1000_read_register (uns8 reg)
Definition at line 70 of file ar1000.c.
References AR1000_DEV_ADDR, and i2c_read_eeprom_16bit().
Here is the call graph for this function:
void ar1000_read_registers ()
Definition at line 66 of file ar1000.c.
void ar1000_seek (uns16 frequency, bit seek_up)
Definition at line 83 of file ar1000.c.
References AR1000_DEV_ADDR, ar1000_seek_threshold, i2c_read_eeprom_16bit(),
i2c_write_eeprom_16bit(), R1_HARD_MUTE_ENABLE, R2_TUNE_ENABLE, R3_BAND_1,
R3_SEEK_CHANNEL_SPACING, R3_SEEK_ENABLE, R3_SEEK_UP, and uns16.
Here is the call graph for this function:
40
void ar1000_seek2 ()
Definition at line 234 of file ar1000.c.
References ar1000_init(), and regs.
Here is the call graph for this function:
void ar1000_seek_more ()
Definition at line 273 of file ar1000.c.
References AR1000_DEV_ADDR, ar1000_init(), AR1000_STATUS, channel, i2c_read_eeprom_16bit(),
R2_TUNE_ENABLE, regs, serial_print_int(), serial_print_nl(), serial_print_str(), and uns16.
Here is the call graph for this function:
41
void ar1000_set_register (uns8 reg, uns8 data)
Definition at line 50 of file ar1000.c.
References regs.
void ar1000_set_seek_threshold (uns8 new_seek_threshold)
Definition at line 219 of file ar1000.c.
References ar1000_seek_threshold.
void ar1000_set_volume (uns8 volume)
Definition at line 321 of file ar1000.c.
References ar1000_init(), regs, uns16, uns8, and vol_lookup.
Here is the call graph for this function:
void ar1000_setup_io ()
Definition at line 46 of file ar1000.c.
References i2c_setup.
42
void ar1000_test ()
Definition at line 255 of file ar1000.c.
References AR1000_DEV_ADDR, i2c_read_eeprom_16bit(), i2c_write_eeprom_16bit(),
R1_HARD_MUTE_ENABLE, and uns16.
Here is the call graph for this function:
void ar1000_tune (uns16 frequency)
Definition at line 145 of file ar1000.c.
References AR1000_DEV_ADDR, ar1000_init(), i2c_read_eeprom_16bit(), i2c_write_eeprom_16bit(),
R1_HARD_MUTE_ENABLE, R2_TUNE_ENABLE, R3_BAND_1, R3_SEEK_CHANNEL_SPACING,
R3_SEEK_ENABLE, regs, serial_print_int_hex(), serial_print_str(), and uns16.
Here is the call graph for this function:
void ar1000_write_register (uns8 reg, uns16 data)
Definition at line 77 of file ar1000.c.
References AR1000_DEV_ADDR, and i2c_write_eeprom_16bit().
Here is the call graph for this function:
43
void ar1000_write_registers ()
Definition at line 60 of file ar1000.c.
References uns8.
Variable Documentation
uns8 ar1000_seek_threshold
Definition at line 38 of file ar1000.c.
Referenced by ar1000_init(), ar1000_seek(), and ar1000_set_seek_threshold().
uns16 regs[18]
Initial value: {
0xffff,0x5b15,0xF4B9,0x8012,0x0400,0x28aa,0x4400,0x1ee7,
0x7141,0x007d,0x82ce,0x4f55,0x970c,0xb845,0xfc2d,0x8097,
0x04a1,0xdf6a}
Definition at line 41 of file ar1000.c.
Referenced by ar1000_get_register(), ar1000_init(), ar1000_seek2(), ar1000_seek_more(),
ar1000_set_register(), ar1000_set_volume(), and ar1000_tune().
rom uns8 vol_lookup[]
Initial value: {
0x0F,
0xCF,
0xDF,
0xEF,
0xFF,
0xEE,
0xFE,
0xED,
0xFD,
0xFB,
0xFA,
0xF9,
0xF7,
0xE6,
0xF6,
0xE5,
0xF5,
0xE3,
0xF3,
0xF2,
44
0xF1,
0xF0}
Definition at line 295 of file ar1000.c.
Referenced by ar1000_set_volume().
ar1000.h File Reference
Routines to access the AR1000 FM radio chip. #include "pic_utils.h" #include "i2c.h" Include dependency graph for ar1000.h:
This graph shows which files directly or indirectly include this file:
Defines
#define AR1000_CHIP_ID 28
#define AR1000_DEV_ADDR 0b00100000
#define AR1000_DEV_ID 27
#define AR1000_R0 0
#define AR1000_R1 1
#define AR1000_R10 10
#define AR1000_R11 11
45
#define AR1000_R13 13
#define AR1000_R14 14
#define AR1000_R15 15
#define AR1000_R2 2
#define AR1000_R3 3
#define AR1000_RBS 20
#define AR1000_RDS_1 21
#define AR1000_RDS_2 22
#define AR1000_RDS_3 23
#define AR1000_RDS_4 24
#define AR1000_RDS_5 25
#define AR1000_RDS_6 26
#define AR1000_RSSI 18
#define ar1000_setup() ar1000_setup_io()
Setup AR1000 ports and pins. #define AR1000_STATUS 19
#define DEV_ID_MFID_0 0
#define DEV_ID_MFID_1 1
#define DEV_ID_MFID_10 10
#define DEV_ID_MFID_11 11
#define DEV_ID_MFID_2 2
#define DEV_ID_MFID_3 3
#define DEV_ID_MFID_4 4
#define DEV_ID_MFID_5 5
#define DEV_ID_MFID_6 6
#define DEV_ID_MFID_7 7
#define DEV_ID_MFID_8 8
#define DEV_ID_MFID_9 9
#define DEV_ID_VERSION_0 12
#define DEV_ID_VERSION_1 13
#define DEV_ID_VERSION_2 14
#define DEV_ID_VERSION_3 15
#define R0_ENABLE 0
#define R0_INT_OSC_EN 15
#define R10_SEEK_WRAP_ENABLE 3
#define R11_AFC_HIGH_SIDE_b1 2
#define R11_AFC_HIGH_SIDE_b2 0
#define R11_AFC_INJECTION_CONTROL 15
#define R11_HILO_SIDE 15
#define R13_GPIO1_0 0
#define R13_GPIO1_1 1
#define R13_GPIO2_0 2
#define R13_GPIO2_1 3
#define R13_GPIO3_0 4
#define R13_GPIO3_1 5
#define R14_VOL2_0 12
#define R14_VOL2_1 13
#define R14_VOL2_2 14
#define R14_VOL2_3 15
#define R15_RDS_CTRL 0
#define R15_RDS_MECC_0 3
#define R15_RDS_MECC_1 4
#define R15_RDS_STA_EN 5
#define R1_DEEMP_SETTING 4
46
#define R1_FORCE_MONO 3
#define R1_HARD_MUTE_ENABLE 1
#define R1_RDS_ENABLE 13
#define R1_RDS_INT_ENABLE 6
#define R1_SOFT_MUTE_ENABLE 2
#define R1_STC_INT_ENABLE 5
#define R2_CHAN_0 0
#define R2_CHAN_1 1
#define R2_CHAN_2 2
#define R2_CHAN_3 3
#define R2_CHAN_4 4
#define R2_CHAN_5 5
#define R2_CHAN_6 6
#define R2_CHAN_7 7
#define R2_CHAN_8 8
#define R2_TUNE_ENABLE 9
#define R3_BAND_0 11
#define R3_BAND_1 12
#define R3_SEEK_CHANNEL_SPACING 13
#define R3_SEEK_ENABLE 14
#define R3_SEEK_UP 15
#define R3_SEEKTH_0 0
#define R3_SEEKTH_1 1
#define R3_SEEKTH_2 2
#define R3_SEEKTH_3 3
#define R3_SEEKTH_4 4
#define R3_SEEKTH_5 5
#define R3_SEEKTH_6 6
#define R3_VOL_0 7
#define R3_VOL_1 8
#define R3_VOL_2 9
#define R3_VOL_3 10
#define STATUS_BIT_2 2
#define STATUS_CHAN_0 7
#define STATUS_CHAN_1 8
#define STATUS_CHAN_2 9
#define STATUS_CHAN_3 10
#define STATUS_CHAN_4 11
#define STATUS_CHAN_5 12
#define STATUS_CHAN_6 13
#define STATUS_CHAN_7 14
#define STATUS_CHAN_8 15
#define STATUS_RDS_DATA_READY 6
#define STATUS_SEEK_FAIL 4
#define STATUS_SEEK_TUNE_COMPLETE 5
#define STATUS_STEREO 3
Functions
uns8 ar1000_get_register (uns8 reg)
void ar1000_init ()
uns16 ar1000_read_register (uns8 reg)
void ar1000_read_registers ()
47
void ar1000_seek (uns16 frequency, bit seek_up)
void ar1000_seek2 ()
void ar1000_seek_more ()
void ar1000_set_register (uns8 reg, uns8 data)
void ar1000_set_seek_threshold (uns8 new_seek_threshold)
void ar1000_set_volume (uns8 volume)
void ar1000_setup_io ()
Setup AR1000 ports and pins. void ar1000_test ()
void ar1000_tune (uns16 frequency)
void ar1000_write_register (uns8 reg, uns16 data)
void ar1000_write_registers ()
Detailed Description
ITS networking routines - common to mode 1 and 2.
Definition in file ar1000.h.
Define Documentation
#define AR1000_CHIP_ID 28
Chip id - 0x1000 for RDS version, 0x1010 for non-rds version
Definition at line 325 of file ar1000.h.
#define AR1000_DEV_ADDR 0b00100000
Definition at line 46 of file ar1000.h.
Referenced by ar1000_init(), ar1000_read_register(), ar1000_seek(), ar1000_seek_more(), ar1000_test(),
ar1000_tune(), and ar1000_write_register().
#define AR1000_DEV_ID 27
Definition at line 286 of file ar1000.h.
#define AR1000_R0 0
Definition at line 52 of file ar1000.h.
#define AR1000_R1 1
Definition at line 64 of file ar1000.h.
#define AR1000_R10 10
Definition at line 138 of file ar1000.h.
48
#define AR1000_R11 11
Definition at line 145 of file ar1000.h.
#define AR1000_R13 13
GPIO controls in this register
Definition at line 160 of file ar1000.h.
#define AR1000_R14 14
Definition at line 177 of file ar1000.h.
#define AR1000_R15 15
Definition at line 190 of file ar1000.h.
#define AR1000_R2 2
Definition at line 85 of file ar1000.h.
#define AR1000_R3 3
Definition at line 106 of file ar1000.h.
#define AR1000_RBS 20
Definition at line 258 of file ar1000.h.
#define AR1000_RDS_1 21
Definition at line 262 of file ar1000.h.
#define AR1000_RDS_2 22
Definition at line 266 of file ar1000.h.
#define AR1000_RDS_3 23
Definition at line 270 of file ar1000.h.
#define AR1000_RDS_4 24
Definition at line 274 of file ar1000.h.
49
#define AR1000_RDS_5 25
Definition at line 278 of file ar1000.h.
#define AR1000_RDS_6 26
Definition at line 282 of file ar1000.h.
#define AR1000_RSSI 18
Definition at line 211 of file ar1000.h.
#define ar1000_setup() ar1000_setup_io()
define so as not to break existing code with new naming standard
Definition at line 334 of file ar1000.h.
#define AR1000_STATUS 19
Definition at line 220 of file ar1000.h.
Referenced by ar1000_seek_more().
#define DEV_ID_MFID_0 0
MFID (12 bits 5B1) bit 0
Definition at line 320 of file ar1000.h.
#define DEV_ID_MFID_1 1
MFID (12 bits 5B1) bit 1
Definition at line 318 of file ar1000.h.
#define DEV_ID_MFID_10 10
MFID (12 bits 5B1) bit 10
Definition at line 300 of file ar1000.h.
#define DEV_ID_MFID_11 11
MFID (12 bits 5B1) bit 11
Definition at line 298 of file ar1000.h.
#define DEV_ID_MFID_2 2
MFID (12 bits 5B1) bit 2
Definition at line 316 of file ar1000.h.
#define DEV_ID_MFID_3 3
MFID (12 bits 5B1) bit 3
50
Definition at line 314 of file ar1000.h.
#define DEV_ID_MFID_4 4
MFID (12 bits 5B1) bit 4
Definition at line 312 of file ar1000.h.
#define DEV_ID_MFID_5 5
MFID (12 bits 5B1) bit 5
Definition at line 310 of file ar1000.h.
#define DEV_ID_MFID_6 6
MFID (12 bits 5B1) bit 6
Definition at line 308 of file ar1000.h.
#define DEV_ID_MFID_7 7
MFID (12 bits 5B1) bit 7
Definition at line 306 of file ar1000.h.
#define DEV_ID_MFID_8 8
MFID (12 bits 5B1) bit 8
Definition at line 304 of file ar1000.h.
#define DEV_ID_MFID_9 9
MFID (12 bits 5B1) bit 9
Definition at line 302 of file ar1000.h.
#define DEV_ID_VERSION_0 12
Version of FM radio bit 0
Definition at line 295 of file ar1000.h.
#define DEV_ID_VERSION_1 13
Version of FM radio bit 1
Definition at line 293 of file ar1000.h.
#define DEV_ID_VERSION_2 14
Version of FM radio bit 2
Definition at line 291 of file ar1000.h.
#define DEV_ID_VERSION_3 15
Version of FM radio bit 3
Definition at line 289 of file ar1000.h.
51
#define R0_ENABLE 0
Definition at line 59 of file ar1000.h.
#define R0_INT_OSC_EN 15
Definition at line 55 of file ar1000.h.
#define R10_SEEK_WRAP_ENABLE 3
Seek wrap enable
Definition at line 141 of file ar1000.h.
#define R11_AFC_HIGH_SIDE_b1 2
High side control bits
Definition at line 151 of file ar1000.h.
#define R11_AFC_HIGH_SIDE_b2 0
Definition at line 152 of file ar1000.h.
#define R11_AFC_INJECTION_CONTROL 15
AFC injection control
Definition at line 148 of file ar1000.h.
#define R11_HILO_SIDE 15
Definition at line 149 of file ar1000.h.
#define R13_GPIO1_0 0
Definition at line 172 of file ar1000.h.
#define R13_GPIO1_1 1
GPIO1- 00-Disable 01-Reserved 10-Output logic 0 11-Output logic 1
Definition at line 171 of file ar1000.h.
#define R13_GPIO2_0 2
Definition at line 168 of file ar1000.h.
#define R13_GPIO2_1 3
GPIO2- 00-Disable 01-STC or RDS interrupt 10-Output logic 0 11-Output logic 1
Definition at line 167 of file ar1000.h.
52
#define R13_GPIO3_0 4
Definition at line 164 of file ar1000.h.
#define R13_GPIO3_1 5
GPIO3- 00-Disable 01-Stereo indication 10-Output logic 0 11-Output logic 1
Definition at line 163 of file ar1000.h.
#define R14_VOL2_0 12
Second volume settings (bit 0)
Definition at line 186 of file ar1000.h.
#define R14_VOL2_1 13
Second volume settings (bit 1)
Definition at line 184 of file ar1000.h.
#define R14_VOL2_2 14
Second volume settings (bit 2)
Definition at line 182 of file ar1000.h.
#define R14_VOL2_3 15
Second volume settings (bit 3)
Definition at line 180 of file ar1000.h.
#define R15_RDS_CTRL 0
RDS Control mode 0=block mode (RDSR asserted after 4 blocks received, data in blocks may not be
correct. RBS1-4 will present the status of each block) 1=group mode (RDSR is asserted after 4 blocks
received without any error)
Definition at line 202 of file ar1000.h.
#define R15_RDS_MECC_0 3
Definition at line 197 of file ar1000.h.
#define R15_RDS_MECC_1 4
RDS Error correction 0x=disable erorr correction 10=2 bit error correction 11=5 bit error correction
Definition at line 196 of file ar1000.h.
#define R15_RDS_STA_EN 5
RDS statistic data enable signal
Definition at line 193 of file ar1000.h.
53
#define R1_DEEMP_SETTING 4
De-emphasis 1=75us 0=50us
Definition at line 73 of file ar1000.h.
#define R1_FORCE_MONO 3
Force mono
Definition at line 75 of file ar1000.h.
#define R1_HARD_MUTE_ENABLE 1
Hard mute enable
Definition at line 79 of file ar1000.h.
Referenced by ar1000_seek(), ar1000_test(), and ar1000_tune().
#define R1_RDS_ENABLE 13
Enable RDS signal
Definition at line 67 of file ar1000.h.
#define R1_RDS_INT_ENABLE 6
Enable RDS interrupt
Definition at line 69 of file ar1000.h.
#define R1_SOFT_MUTE_ENABLE 2
Soft mute enable
Definition at line 77 of file ar1000.h.
#define R1_STC_INT_ENABLE 5
Seek Tune Complete (STC) interrupt enable
Definition at line 71 of file ar1000.h.
#define R2_CHAN_0 0
Definition at line 100 of file ar1000.h.
#define R2_CHAN_1 1
Definition at line 99 of file ar1000.h.
#define R2_CHAN_2 2
Definition at line 98 of file ar1000.h.
#define R2_CHAN_3 3
54
Definition at line 97 of file ar1000.h.
#define R2_CHAN_4 4
Definition at line 96 of file ar1000.h.
#define R2_CHAN_5 5
Definition at line 95 of file ar1000.h.
#define R2_CHAN_6 6
Definition at line 94 of file ar1000.h.
#define R2_CHAN_7 7
Definition at line 93 of file ar1000.h.
#define R2_CHAN_8 8
Definition at line 92 of file ar1000.h.
#define R2_TUNE_ENABLE 9
Tune channel enable
Definition at line 88 of file ar1000.h.
Referenced by ar1000_seek(), ar1000_seek_more(), and ar1000_tune().
#define R3_BAND_0 11
Band control 0=Japan narrow band 76Mhz - 90Mhz 1=Japan wide band 76Mhz - 108Mhz
Definition at line 117 of file ar1000.h.
#define R3_BAND_1 12
Band control 0=US/EUROPE 1=Japan
Definition at line 115 of file ar1000.h.
Referenced by ar1000_seek(), and ar1000_tune().
#define R3_SEEK_CHANNEL_SPACING 13
Seek channel spacing 1=100k 0=200k
Definition at line 113 of file ar1000.h.
Referenced by ar1000_seek(), and ar1000_tune().
#define R3_SEEK_ENABLE 14
Seek enable
55
Definition at line 111 of file ar1000.h.
Referenced by ar1000_seek(), and ar1000_tune().
#define R3_SEEK_UP 15
Seek direction 1=up 0=down
Definition at line 109 of file ar1000.h.
Referenced by ar1000_seek().
#define R3_SEEKTH_0 0
Definition at line 132 of file ar1000.h.
#define R3_SEEKTH_1 1
Definition at line 131 of file ar1000.h.
#define R3_SEEKTH_2 2
Definition at line 130 of file ar1000.h.
#define R3_SEEKTH_3 3
Definition at line 129 of file ar1000.h.
#define R3_SEEKTH_4 4
Definition at line 128 of file ar1000.h.
#define R3_SEEKTH_5 5
Definition at line 127 of file ar1000.h.
#define R3_SEEKTH_6 6
Definition at line 126 of file ar1000.h.
#define R3_VOL_0 7
Definition at line 123 of file ar1000.h.
#define R3_VOL_1 8
Definition at line 122 of file ar1000.h.
56
#define R3_VOL_2 9
Definition at line 121 of file ar1000.h.
#define R3_VOL_3 10
Definition at line 120 of file ar1000.h.
#define STATUS_BIT_2 2
Used but unknown function
Definition at line 254 of file ar1000.h.
#define STATUS_CHAN_0 7
Current tuned channel bit 0
Definition at line 239 of file ar1000.h.
#define STATUS_CHAN_1 8
Current tuned channel bit 1
Definition at line 237 of file ar1000.h.
#define STATUS_CHAN_2 9
Current tuned channel bit 2
Definition at line 235 of file ar1000.h.
#define STATUS_CHAN_3 10
Current tuned channel bit 3
Definition at line 233 of file ar1000.h.
#define STATUS_CHAN_4 11
Current tuned channel bit 4
Definition at line 231 of file ar1000.h.
#define STATUS_CHAN_5 12
Current tuned channel bit 5
Definition at line 229 of file ar1000.h.
#define STATUS_CHAN_6 13
Current tuned channel bit 6
Definition at line 227 of file ar1000.h.
#define STATUS_CHAN_7 14
Current tuned channel bit 7
Definition at line 225 of file ar1000.h.
57
#define STATUS_CHAN_8 15
Current tuned channel bit 8
Definition at line 223 of file ar1000.h.
#define STATUS_RDS_DATA_READY 6
RDS data recevied
Definition at line 242 of file ar1000.h.
#define STATUS_SEEK_FAIL 4
Seek has failed
Definition at line 248 of file ar1000.h.
#define STATUS_SEEK_TUNE_COMPLETE 5
Seek or Tune has completed
Definition at line 245 of file ar1000.h.
#define STATUS_STEREO 3
Stereo flag 1=stereo 0=mono
Definition at line 251 of file ar1000.h.
Function Documentation
uns8 ar1000_get_register (uns8 reg)
Definition at line 55 of file ar1000.c.
References regs.
void ar1000_init ()
Definition at line 224 of file ar1000.c.
References AR1000_DEV_ADDR, ar1000_seek_threshold, i2c_write_eeprom_16bit(), regs, and uns8.
Referenced by ar1000_seek2(), ar1000_seek_more(), ar1000_set_volume(), and ar1000_tune().
Here is the call graph for this function:
Here is the caller graph for this function:
58
uns16 ar1000_read_register (uns8 reg)
Definition at line 70 of file ar1000.c.
References AR1000_DEV_ADDR, and i2c_read_eeprom_16bit().
Here is the call graph for this function:
void ar1000_read_registers ()
Definition at line 66 of file ar1000.c.
void ar1000_seek (uns16 frequency, bit seek_up)
Definition at line 83 of file ar1000.c.
References AR1000_DEV_ADDR, ar1000_seek_threshold, i2c_read_eeprom_16bit(),
i2c_write_eeprom_16bit(), R1_HARD_MUTE_ENABLE, R2_TUNE_ENABLE, R3_BAND_1,
R3_SEEK_CHANNEL_SPACING, R3_SEEK_ENABLE, R3_SEEK_UP, and uns16.
Here is the call graph for this function:
59
void ar1000_seek2 ()
Definition at line 234 of file ar1000.c.
References ar1000_init(), and regs.
Here is the call graph for this function:
void ar1000_seek_more ()
Definition at line 273 of file ar1000.c.
References AR1000_DEV_ADDR, ar1000_init(), AR1000_STATUS, channel, i2c_read_eeprom_16bit(),
R2_TUNE_ENABLE, regs, serial_print_int(), serial_print_nl(), serial_print_str(), and uns16.
Here is the call graph for this function:
60
void ar1000_set_register (uns8 reg, uns8 data)
Definition at line 50 of file ar1000.c.
References regs.
void ar1000_set_seek_threshold (uns8 new_seek_threshold)
Definition at line 219 of file ar1000.c.
References ar1000_seek_threshold.
void ar1000_set_volume (uns8 volume)
Definition at line 321 of file ar1000.c.
References ar1000_init(), regs, uns16, uns8, and vol_lookup.
Here is the call graph for this function:
void ar1000_setup_io ()
Definition at line 46 of file ar1000.c.
References i2c_setup.
61
void ar1000_test ()
Definition at line 255 of file ar1000.c.
References AR1000_DEV_ADDR, i2c_read_eeprom_16bit(), i2c_write_eeprom_16bit(),
R1_HARD_MUTE_ENABLE, and uns16.
Here is the call graph for this function:
void ar1000_tune (uns16 frequency)
Definition at line 145 of file ar1000.c.
References AR1000_DEV_ADDR, ar1000_init(), i2c_read_eeprom_16bit(), i2c_write_eeprom_16bit(),
R1_HARD_MUTE_ENABLE, R2_TUNE_ENABLE, R3_BAND_1, R3_SEEK_CHANNEL_SPACING,
R3_SEEK_ENABLE, regs, serial_print_int_hex(), serial_print_str(), and uns16.
Here is the call graph for this function:
void ar1000_write_register (uns8 reg, uns16 data)
Definition at line 77 of file ar1000.c.
References AR1000_DEV_ADDR, and i2c_write_eeprom_16bit().
Here is the call graph for this function:
62
void ar1000_write_registers ()
Definition at line 60 of file ar1000.c.
References uns8.
audio_queue.c File Reference #include "audio_queue.h" #include "somo_14d.h" #include "pic_serial.h" Include dependency graph for audio_queue.c:
Functions
void audio_queue_add (uns8 phrase)
void audio_queue_clear ()
uns8 audio_queue_empty ()
void audio_queue_process ()
63
Variables
uns8 aq_end = 0
uns8 aq_start = 0
bit audio_playing = 0
uns8 audio_queue_fifo [AUDIO_QUEUE_FIFO_SIZE]
Function Documentation
void audio_queue_add (uns8 phrase)
Definition at line 51 of file audio_queue.c.
References aq_end, aq_start, audio_playing, audio_queue_fifo, somo_14d_set_file_id(), and uns8.
Here is the call graph for this function:
void audio_queue_clear ()
Definition at line 105 of file audio_queue.c.
References aq_end, aq_start, audio_playing, end_crit_sec, serial_print_str(), somo_14d_is_busy(),
somo_14d_stop(), and start_crit_sec.
Here is the call graph for this function:
uns8 audio_queue_empty ()
Definition at line 121 of file audio_queue.c.
References audio_playing.
void audio_queue_process ()
Call when audio file completes.
This routine will pluck the next file off the queue and start playing it. Assumes it is in an interrupt
otherwise will need wrapping in critsec
Definition at line 81 of file audio_queue.c.
References aq_end, aq_start, audio_playing, audio_queue_fifo, somo_14d_set_file_id(), and uns8.
64
Here is the call graph for this function:
Variable Documentation
uns8 aq_end = 0
Audio queue fifo end point
Definition at line 47 of file audio_queue.c.
Referenced by audio_queue_add(), audio_queue_clear(), and audio_queue_process().
uns8 aq_start = 0
Audio queue fifo start point
Definition at line 45 of file audio_queue.c.
Referenced by audio_queue_add(), audio_queue_clear(), and audio_queue_process().
bit audio_playing = 0
Audio playing at present
Definition at line 49 of file audio_queue.c.
Referenced by audio_queue_add(), audio_queue_clear(), audio_queue_empty(), and audio_queue_process().
uns8 audio_queue_fifo[AUDIO_QUEUE_FIFO_SIZE]
Audio queue fifo
Definition at line 43 of file audio_queue.c.
Referenced by audio_queue_add(), and audio_queue_process().
audio_queue.h File Reference
Queue audio files for the somo-14d. #include "config.h" #include "pic_utils.h" Include dependency graph for audio_queue.h:
65
This graph shows which files directly or indirectly include this file:
Functions
void audio_queue_add (uns8 phrase)
void audio_queue_clear ()
uns8 audio_queue_empty ()
void audio_queue_process ()
Detailed Description
Put the following into your config.h
- - - - - - - - - - - - - - - - - - - audio_queue defines
- - - - - - - - - - - - - - - - - - -
define AUDIO_QUEUE_FIFO_SIZE 5
Definition in file audio_queue.h.
Function Documentation
void audio_queue_add (uns8 phrase)
Definition at line 51 of file audio_queue.c.
References aq_end, aq_start, audio_playing, audio_queue_fifo, somo_14d_set_file_id(), and uns8.
Here is the call graph for this function:
66
void audio_queue_clear ()
Definition at line 105 of file audio_queue.c.
References aq_end, aq_start, audio_playing, end_crit_sec, serial_print_str(), somo_14d_is_busy(),
somo_14d_stop(), and start_crit_sec.
Here is the call graph for this function:
uns8 audio_queue_empty ()
Definition at line 121 of file audio_queue.c.
References audio_playing.
void audio_queue_process ()
Call when audio file completes.
This routine will pluck the next file off the queue and start playing it. Assumes it is in an interrupt
otherwise will need wrapping in critsec
Definition at line 81 of file audio_queue.c.
References aq_end, aq_start, audio_playing, audio_queue_fifo, somo_14d_set_file_id(), and uns8.
Here is the call graph for this function:
cat4016.c File Reference #include "cat4016.h" #include "pic_serial.h" Include dependency graph for cat4016.c:
67
Functions
void cat4016_enable_display (uns8 on)
void cat4016_latch_data ()
void cat4016_setup_io ()
void cat4016_write_data (uns8 d1, uns8 d2)
Function Documentation
void cat4016_enable_display (uns8 on)
Definition at line 58 of file cat4016.c.
References clear_pin, and set_pin.
void cat4016_latch_data ()
Definition at line 68 of file cat4016.c.
References clear_pin, and set_pin.
void cat4016_setup_io ()
Definition at line 5 of file cat4016.c.
References clear_pin, make_output, and set_pin.
void cat4016_write_data (uns8 d1, uns8 d2)
Definition at line 19 of file cat4016.c.
References change_pin_var, clear_pin, serial_putc(), set_pin, and uns8.
68
Here is the call graph for this function:
cat4016.h File Reference #include "pic_utils.h" Include dependency graph for cat4016.h:
This graph shows which files directly or indirectly include this file:
Defines
#define __cat4016_H
Functions
void cat4016_enable_display (uns8 on)
void cat4016_latch_data ()
void cat4016_setup_io ()
void cat4016_write_data (uns8 d1, uns8 d2)
Define Documentation
#define __cat4016_H
69
Definition at line 2 of file cat4016.h.
Function Documentation
void cat4016_enable_display (uns8 on)
Definition at line 58 of file cat4016.c.
References clear_pin, and set_pin.
void cat4016_latch_data ()
Definition at line 68 of file cat4016.c.
References clear_pin, and set_pin.
void cat4016_setup_io ()
Definition at line 5 of file cat4016.c.
References clear_pin, make_output, and set_pin.
void cat4016_write_data (uns8 d1, uns8 d2)
Definition at line 19 of file cat4016.c.
References change_pin_var, clear_pin, serial_putc(), set_pin, and uns8.
Here is the call graph for this function:
config_bits.h File Reference
Trying the impossible task of creating some commonality around the config settings. #include "config.h" Include dependency graph for config_bits.h:
70
Detailed Description
Definition in file config_bits.h.
convert.c File Reference #include "convert.h" Include dependency graph for convert.c:
Functions
uns8 convert_to_dec1 (uns8 data)
uns8 convert_to_dec2 (uns8 data)
uns8 convert_to_dec2b (uns8 data)
char * temp_to_str (uns8 int_part, uns8 fract_part, char *buffer)
Function Documentation
uns8 convert_to_dec1 (uns8 data)
Definition at line 80 of file convert.c.
uns8 convert_to_dec2 (uns8 data)
Definition at line 101 of file convert.c.
71
uns8 convert_to_dec2b (uns8 data)
Definition at line 58 of file convert.c.
char* temp_to_str (uns8 int_part, uns8 fract_part, char * buffer)
Definition at line 124 of file convert.c.
convert.h File Reference
Convert pseudo-decimal to strings (typically temperature conversion). #include "pic_utils.h" Include dependency graph for convert.h:
This graph shows which files directly or indirectly include this file:
Functions
uns8 convert_to_dec1 (uns8 data)
uns8 convert_to_dec2 (uns8 data)
uns8 convert_to_dec2b (uns8 data)
char * temp_to_str (uns8 int_part, uns8 fract_part, char *buffer)
Detailed Description
72
Definition in file convert.h.
Function Documentation
uns8 convert_to_dec1 (uns8 data)
Definition at line 80 of file convert.c.
uns8 convert_to_dec2 (uns8 data)
Definition at line 101 of file convert.c.
uns8 convert_to_dec2b (uns8 data)
Definition at line 58 of file convert.c.
char* temp_to_str (uns8 int_part, uns8 fract_part, char * buffer)
Definition at line 124 of file convert.c.
debug.h File Reference
A nice way of printing debug, allowing it to be compiled out for production. #include "pic_serial.h" #include "config.h" Include dependency graph for debug.h:
73
This graph shows which files directly or indirectly include this file:
Defines
#define debug_int(i)
#define debug_int_hex(i)
#define debug_int_hex_16bit(i)
#define debug_nl()
#define debug_putc(c)
#define debug_spc()
#define debug_str(str)
#define debug_var(str, i)
Detailed Description
Definition in file debug.h.
Define Documentation
#define debug_int(i)
Definition at line 64 of file debug.h.
Referenced by its2_forward_routed_packet(), its2_print_packet(), its2_process_tx_queue(), its2_transmit(),
mrf24j40_receive_callback(), and mrf24j40_transmit_callback().
#define debug_int_hex(i)
Definition at line 65 of file debug.h.
Referenced by wpan_data_received_callback().
#define debug_int_hex_16bit(i)
Definition at line 66 of file debug.h.
Referenced by its2_forward_routed_packet(), its2_print_packet(), its2_process_tx_queue(), its2_transmit(),
its_add_local_device(), its_add_net_device(), and its_print_devices().
74
#define debug_nl()
Definition at line 67 of file debug.h.
Referenced by its2_device_process(), its2_print_queue(), its2_router_init(), its_print_devices(), and
wpan_data_received_callback().
#define debug_putc(c)
Definition at line 61 of file debug.h.
Referenced by its2_print_packet(), its2_transmit(), and wpan_data_received_callback().
#define debug_spc()
Definition at line 68 of file debug.h.
Referenced by its2_forward_routed_packet().
#define debug_str(str)
Definition at line 62 of file debug.h.
Referenced by its2_device_init(), its2_device_process(), its2_forward_routed_packet(), its2_print_packet(),
its2_process_tx_queue(), its2_rebroadcast_net_discover_req(), its2_respond_local_addr(),
its2_router_handle_association(), its2_router_init(), its2_router_queue_packet(), its2_transmit(),
its_add_local_device(), its_add_net_device(), its_print_devices(), mrf24j40_receive_callback(),
mrf24j40_transmit_callback(), wpan_data_received_callback(), and wpan_print_address().
#define debug_var(str, i)
Definition at line 63 of file debug.h.
Referenced by its2_device_process(), its2_forward_routed_packet(), its2_print_queue(),
its2_rebroadcast_net_discover_req(), its2_router_init(), its2_router_queue_packet(), and its2_transmit().
draw.c File Reference
Buffered graphics routines. #include "pic_utils.h" #include "draw\draw.h" #include "config.h" #include "draw\draw_screen_buffer.h" Include dependency graph for draw.c:
75
Defines
#define FONT_FIRST_CHAR 32
#define FONT_HEIGHT 7
#define FONT_LAST_CHAR 127
Functions
void draw_bitmap (uns8 x, uns8 y, uns8 colour, char *bitmap)
void draw_circle (int x_centre, int y_centre, int r, uns8 colour)
void draw_circle2 (int x_centre, int y_centre, int r, uns8 colour)
void draw_circle_lines (int ctr_x, int ctr_y, int pt_x, int pt_y, uns8 colour)
void draw_circle_points (int ctr_x, int ctr_y, int pt_x, int pt_y, uns8 colour)
void draw_circle_points2 (int ctr_x, int ctr_y, int pt_x, int pt_y, uns8 colour)
void draw_clear_screen ()
void draw_filled_circle (int x_centre, int y_centre, int r, uns8 colour)
uns8 draw_get_pixel (uns8 x, uns8 y)
void draw_init ()
uns16 draw_length_str (char *str)
void draw_line (uns8 x0, uns8 y0, uns8 x1, uns8 y1, uns8 colour)
void draw_print_buffer ()
void draw_print_str (uns8 x, uns8 y, uns8 width, uns8 start_pixel, uns8 colour, char *str)
void draw_rect (uns8 x, uns8 y, uns16 width, uns8 height, uns8 colour)
void draw_set_pixel (uns8 x, uns8 y, uns8 colour)
void draw_setup_io ()
Variables
rom char PicPack5x7_bitmap_0 [1]
rom char PicPack5x7_bitmap_1 [1]
uns16 PicPack5x7_index [1]
76
Detailed Description
Definition in file draw.c.
Define Documentation
#define FONT_FIRST_CHAR 32
Definition at line 507 of file draw.c.
#define FONT_HEIGHT 7
Definition at line 509 of file draw.c.
#define FONT_LAST_CHAR 127
Definition at line 508 of file draw.c.
Function Documentation
void draw_bitmap (uns8 x, uns8 y, uns8 colour, char * bitmap)
Definition at line 591 of file draw.c.
References draw_set_pixel(), and uns8.
Referenced by draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_circle (int x_centre, int y_centre, int r, uns8 colour)
Definition at line 390 of file draw.c.
References draw_circle_points().
Here is the call graph for this function:
77
void draw_circle2 (int x_centre, int y_centre, int r, uns8 colour)
Definition at line 426 of file draw.c.
References draw_circle_points2().
Referenced by draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_circle_lines (int ctr_x, int ctr_y, int pt_x, int pt_y, uns8 colour)
Definition at line 345 of file draw.c.
References draw_line().
Referenced by draw_filled_circle().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_circle_points (int ctr_x, int ctr_y, int pt_x, int pt_y, uns8 colour)
Definition at line 375 of file draw.c.
References draw_set_pixel().
Referenced by draw_circle().
Here is the call graph for this function:
Here is the caller graph for this function:
78
void draw_circle_points2 (int ctr_x, int ctr_y, int pt_x, int pt_y, uns8 colour)
Definition at line 411 of file draw.c.
References draw_set_pixel().
Referenced by draw_circle2().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_clear_screen ()
Definition at line 49 of file draw.c.
References draw_buffer0, DRAW_TOTAL_BUFFER_SIZE, and uns8.
Referenced by draw_init(), and draw_tests_run().
Here is the caller graph for this function:
void draw_filled_circle (int x_centre, int y_centre, int r, uns8 colour)
Definition at line 352 of file draw.c.
References draw_circle_lines().
Here is the call graph for this function:
uns8 draw_get_pixel (uns8 x, uns8 y)
Definition at line 246 of file draw.c.
void draw_init ()
79
Definition at line 128 of file draw.c.
References draw_clear_screen(), and drv_init().
Here is the call graph for this function:
uns16 draw_length_str (char * str)
Definition at line 514 of file draw.c.
References PicPack5x7_index, uns16, and uns8.
void draw_line (uns8 x0, uns8 y0, uns8 x1, uns8 y1, uns8 colour)
Definition at line 307 of file draw.c.
References draw_set_pixel().
Referenced by draw_circle_lines(), and draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_print_buffer ()
Definition at line 266 of file draw.c.
References draw_buffer0, DRAW_PIXELS_PER_BYTE, serial_print_int(), serial_print_int_hex(),
serial_print_str(), serial_putc(), uns16, and uns8.
Here is the call graph for this function:
80
void draw_print_str (uns8 x, uns8 y, uns8 width, uns8 start_pixel, uns8 colour, char * str)
Definition at line 529 of file draw.c.
References draw_set_pixel(), PicPack5x7_bitmap_0, PicPack5x7_bitmap_1, PicPack5x7_index, uns16, and
uns8.
Referenced by draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_rect (uns8 x, uns8 y, uns16 width, uns8 height, uns8 colour)
Definition at line 251 of file draw.c.
References draw_set_pixel(), and uns16.
Referenced by draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_set_pixel (uns8 x, uns8 y, uns8 colour)
81
Definition at line 135 of file draw.c.
References draw_buffer0, uns16, and uns8.
Referenced by draw_bitmap(), draw_circle_points(), draw_circle_points2(), draw_line(), draw_print_str(),
draw_rect(), and draw_tests_run().
Here is the caller graph for this function:
void draw_setup_io ()
Definition at line 124 of file draw.c.
References drv_setup_io().
Here is the call graph for this function:
82
Variable Documentation
rom char PicPack5x7_bitmap_0[1]
Definition at line 54 of file draw_font_picpack_5x7.c.
Referenced by draw_print_str().
rom char PicPack5x7_bitmap_1[1]
Definition at line 123 of file draw_font_picpack_5x7.c.
Referenced by draw_print_str().
uns16 PicPack5x7_index[1]
Definition at line 157 of file draw_font_picpack_5x7.c.
Referenced by draw_length_str(), and draw_print_str().
draw.h File Reference
Buffered graphics routines. #include "pic_utils.h" Include dependency graph for draw.h:
This graph shows which files directly or indirectly include this file:
83
Defines
#define BOTTOM_LEFT 1
#define draw_paint() drv_paint()
#define DRAW_PIXELS_PER_BYTE (8 / DRAW_BITS_PER_PIXEL)
#define draw_set_display_brightness(brightness) drv_set_display_brightness(brightness)
#define drv_setup() drv_setup_io()
#define HORIZONTAL 0
#define TOP_LEFT 0
#define VERTICAL 1
Functions
void draw_bitmap (uns8 x, uns8 y, uns8 colour, char *bitmap)
void draw_circle (int x_centre, int y_centre, int r, uns8 colour)
void draw_circle2 (int x_centre, int y_centre, int r, uns8 colour)
void draw_clear_screen ()
uns8 draw_get_pixel (uns8 x, uns8)
void draw_init ()
uns16 draw_length_str (char *str)
void draw_line (uns8 x0, uns8 y0, uns8 x1, uns8 y1, uns8 colour)
void draw_print_buffer ()
void draw_print_str (uns8 x, uns8 y, uns8 width, uns8 start_pixel, uns8 colour, char *str)
void draw_rect (uns8 x, uns8 y, uns16 width, uns8 height, uns8 colour)
void draw_set_pixel (uns8 x, uns8 y, uns8 colour)
void draw_setup_io ()
void drv_init ()
void drv_paint ()
void drv_print_buffer ()
void drv_refresh ()
void drv_set_display_brightness (uns8 brightness)
void drv_setup_io ()
Detailed Description
You will need to pick a hardware buffering mode for the draw routines.
Draw buffer addressing
4 | U V W X Y 3 | P Q R S T 2 | K L M N O 1 | F G H I J 0 | A B C D E --------- 0 1 2 3 4
DRAW_HW_Y_ORIGIN == BOTTOM_LEFT DRAW_HW_BUFFER_ORIENTATION ==
HORIZONTAL
0 | A B C D E 1 | F G H I J 2 | K L M N O 3 | P Q R S T 4 | U V W X Y --------- 0 1 2 3 4
DRAW_HW_Y_ORIGIN == TOP_LEFT DRAW_HW_BUFFER_ORIENTATION == HORIZONTAL
0 | E J O T Y 1 | D I N S X 2 | C H M R W 3 | B G L Q V 4 | A F K P U --------- 0 1 2 3 4
DRAW_HW_Y_ORIGIN == BOTTOM_LEFT DRAW_HW_BUFFER_ORIENTATION ==
VERTICAL
0 | A F K P U 1 | B G L Q V 2 | C H M R W 3 | D I N S X 4 | E J O T Y --------- 0 1 2 3 4
DRAW_HW_Y_ORIGIN == TOP_LEFT DRAW_HW_BUFFER_ORIENTATION == VERTICAL
Put the following in your config.h:
84
// - - - - - - - - - - - - - - - - - - - -
// Draw defines
// - - - - - - - - - - - - - - - - - - - -
#define DRAW_PIXELS_HIGH 24
#define DRAW_PIXELS_WIDE 16
#define DRAW_BITS_PER_PIXEL 1
#define DRAW_HW_Y_ORIGIN TOP_LEFT
// or BOTTOM_LEFT
#define DRAW_HW_BUFFER_ORIENTATION VERTICAL
// or HORIZONTAL
//Enable debug to see what's happening under the hood
//#define DRAW_DEBUG
// - - - - - - - - - - - - - - - - - - - -
Definition in file draw.h.
Define Documentation
#define BOTTOM_LEFT 1
Definition at line 120 of file draw.h.
#define draw_paint() drv_paint()
Definition at line 136 of file draw.h.
Referenced by draw_tests_run().
#define DRAW_PIXELS_PER_BYTE (8 / DRAW_BITS_PER_PIXEL)
Definition at line 122 of file draw.h.
Referenced by draw_print_buffer(), and drv_paint().
#define draw_set_display_brightness(brightness) drv_set_display_brightness(brightness)
Definition at line 157 of file draw.h.
#define drv_setup() drv_setup_io()
Definition at line 151 of file draw.h.
#define HORIZONTAL 0
Definition at line 116 of file draw.h.
85
#define TOP_LEFT 0
Definition at line 119 of file draw.h.
#define VERTICAL 1
Definition at line 117 of file draw.h.
Function Documentation
void draw_bitmap (uns8 x, uns8 y, uns8 colour, char * bitmap)
Definition at line 591 of file draw.c.
References draw_set_pixel(), and uns8.
Referenced by draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_circle (int x_centre, int y_centre, int r, uns8 colour)
Definition at line 390 of file draw.c.
References draw_circle_points().
Here is the call graph for this function:
void draw_circle2 (int x_centre, int y_centre, int r, uns8 colour)
Definition at line 426 of file draw.c.
References draw_circle_points2().
Referenced by draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
86
void draw_clear_screen ()
Definition at line 49 of file draw.c.
References draw_buffer0, DRAW_TOTAL_BUFFER_SIZE, and uns8.
Referenced by draw_init(), and draw_tests_run().
Here is the caller graph for this function:
uns8 draw_get_pixel (uns8 x, uns8)
Definition at line 246 of file draw.c.
void draw_init ()
Definition at line 128 of file draw.c.
References draw_clear_screen(), and drv_init().
Here is the call graph for this function:
uns16 draw_length_str (char * str)
Definition at line 514 of file draw.c.
References PicPack5x7_index, uns16, and uns8.
void draw_line (uns8 x0, uns8 y0, uns8 x1, uns8 y1, uns8 colour)
87
Definition at line 307 of file draw.c.
References draw_set_pixel().
Referenced by draw_circle_lines(), and draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_print_buffer ()
Definition at line 266 of file draw.c.
References draw_buffer0, DRAW_PIXELS_PER_BYTE, serial_print_int(), serial_print_int_hex(),
serial_print_str(), serial_putc(), uns16, and uns8.
Here is the call graph for this function:
void draw_print_str (uns8 x, uns8 y, uns8 width, uns8 start_pixel, uns8 colour, char * str)
Definition at line 529 of file draw.c.
References draw_set_pixel(), PicPack5x7_bitmap_0, PicPack5x7_bitmap_1, PicPack5x7_index, uns16, and
uns8.
Referenced by draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
88
void draw_rect (uns8 x, uns8 y, uns16 width, uns8 height, uns8 colour)
Definition at line 251 of file draw.c.
References draw_set_pixel(), and uns16.
Referenced by draw_tests_run().
Here is the call graph for this function:
Here is the caller graph for this function:
void draw_set_pixel (uns8 x, uns8 y, uns8 colour)
Definition at line 135 of file draw.c.
References draw_buffer0, uns16, and uns8.
Referenced by draw_bitmap(), draw_circle_points(), draw_circle_points2(), draw_line(), draw_print_str(),
draw_rect(), and draw_tests_run().
Here is the caller graph for this function:
89
void draw_setup_io ()
Definition at line 124 of file draw.c.
References drv_setup_io().
Here is the call graph for this function:
void drv_init ()
Definition at line 287 of file drv_ea_ldp6416.c.
90
References ea_ldp6416_init(), ea_ldp6432_init(), ea_ldp8008_init(), HT1632_CMD_PMOS_16_COMMON,
ht1632_init(), and pcd8544_init().
Referenced by draw_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void drv_paint ()
Definition at line 73 of file drv_ea_ldp6416.c.
References buffer0, buffer1, clear_pin, draw_buffer0, DRAW_PIXELS_PER_BYTE, end_crit_sec,
get_draw_buffer(), pcd8544_send_command(), pcd8544_send_data(), serial_print_str(), set_pin, start_crit_sec,
uns16, and uns8.
Here is the call graph for this function:
void drv_print_buffer ()
Definition at line 94 of file drv_ea_ldp6416.c.
91
References buffer0, serial_print_int(), serial_print_nl(), serial_print_spc(), and uns8.
Here is the call graph for this function:
void drv_refresh ()
Definition at line 116 of file drv_ea_ldp6416.c.
References bright_count, bright_level, buffer0, buffer1, buffer_position, buffer_position0, clear_pin,
current_buffer, current_row, MAX_BRIGHTNESS, set_pin, set_pins_r1_g1, set_pins_r1_g1_r2_g2,
set_pins_r_g, and uns8.
void drv_set_display_brightness (uns8 brightness)
Definition at line 108 of file drv_ea_ldp6416.c.
References bright_level, and MAX_BRIGHTNESS.
void drv_setup_io ()
Definition at line 283 of file drv_ea_ldp6416.c.
References ea_ldp6416_setup_io(), ea_ldp6432_setup_io(), ea_ldp8008_setup_io(), ht1632_setup_io(), and
pcd8544_setup_io().
Referenced by draw_setup_io().
Here is the call graph for this function:
92
Here is the caller graph for this function:
draw_font_picpack_5x7.c File Reference
Simple 5x7 font for Draw library. #include "draw.h" Include dependency graph for draw_font_picpack_5x7.c:
Defines
#define FONT_FIRST_CHAR 32
#define FONT_LAST_CHAR 128
Variables
rom char PicPack5x7_bitmap_0 []
rom char PicPack5x7_bitmap_1 []
uns16 PicPack5x7_index []
Detailed Description
Definition in file draw_font_picpack_5x7.c.
93
Define Documentation
#define FONT_FIRST_CHAR 32
Definition at line 258 of file draw_font_picpack_5x7.c.
#define FONT_LAST_CHAR 128
Definition at line 259 of file draw_font_picpack_5x7.c.
Variable Documentation
rom char PicPack5x7_bitmap_0[]
Definition at line 54 of file draw_font_picpack_5x7.c.
Referenced by draw_print_str().
rom char PicPack5x7_bitmap_1[]
Definition at line 123 of file draw_font_picpack_5x7.c.
Referenced by draw_print_str().
uns16 PicPack5x7_index[]
Definition at line 157 of file draw_font_picpack_5x7.c.
Referenced by draw_length_str(), and draw_print_str().
draw_screen_buffer.c File Reference #include "pic_utils.h" #include "draw\draw_screen_buffer.h" Include dependency graph for draw_screen_buffer.c:
94
Functions
uns8 get_draw_buffer (uns16 address)
void set_draw_buffer (uns16 address, uns8 data)
Variables
uns8 draw_buffer0 [DRAW_TOTAL_BUFFER_SIZE]
Function Documentation
uns8 get_draw_buffer (uns16 address)
Definition at line 33 of file draw_screen_buffer.c.
References draw_buffer0.
Referenced by drv_paint().
Here is the caller graph for this function:
void set_draw_buffer (uns16 address, uns8 data)
Definition at line 55 of file draw_screen_buffer.c.
References draw_buffer0.
95
Variable Documentation
uns8 draw_buffer0[DRAW_TOTAL_BUFFER_SIZE]
Definition at line 8 of file draw_screen_buffer.c.
Referenced by draw_clear_screen(), draw_print_buffer(), draw_set_pixel(), drv_paint(), get_draw_buffer(), and
set_draw_buffer().
draw_screen_buffer.h File Reference #include "pic_utils.h" #include "config.h" #include "draw\draw.h" Include dependency graph for draw_screen_buffer.h:
This graph shows which files directly or indirectly include this file:
Defines
#define DRAW_BUFFERS 1
#define DRAW_TOTAL_BUFFER_SIZE (DRAW_PIXELS_WIDE * DRAW_PIXELS_HIGH /
DRAW_PIXELS_PER_BYTE)
96
Functions
uns8 get_draw_buffer (uns16 address)
void set_draw_buffer (uns16 address, uns8 data)
Variables
uns8 draw_buffer0 [DRAW_TOTAL_BUFFER_SIZE]
Define Documentation
#define DRAW_BUFFERS 1
Definition at line 20 of file draw_screen_buffer.h.
#define DRAW_TOTAL_BUFFER_SIZE (DRAW_PIXELS_WIDE * DRAW_PIXELS_HIGH / DRAW_PIXELS_PER_BYTE)
Definition at line 14 of file draw_screen_buffer.h.
Referenced by draw_clear_screen().
Function Documentation
uns8 get_draw_buffer (uns16 address)
Definition at line 33 of file draw_screen_buffer.c.
References draw_buffer0.
Referenced by drv_paint().
Here is the caller graph for this function:
void set_draw_buffer (uns16 address, uns8 data)
Definition at line 55 of file draw_screen_buffer.c.
References draw_buffer0.
Variable Documentation
uns8 draw_buffer0[DRAW_TOTAL_BUFFER_SIZE]
Definition at line 8 of file draw_screen_buffer.c.
97
Referenced by draw_clear_screen(), draw_print_buffer(), draw_set_pixel(), drv_paint(), get_draw_buffer(), and
set_draw_buffer().
draw_tests.c File Reference
Routines to test the Draw graphics functions. #include "draw_tests.h" #include "pic_serial.h" #include "draw\draw.h" #include "draw\ea_bitmaps.h" #include "config.h" Include dependency graph for draw_tests.c:
Defines
#define TEST_RADIUS DRAW_PIXELS_WIDE / 2 -1
Functions
uns8 draw_tests_run (uns8 test_num)
Detailed Description
Definition in file draw_tests.c.
98
Define Documentation
#define TEST_RADIUS DRAW_PIXELS_WIDE / 2 -1
Referenced by draw_tests_run().
Function Documentation
uns8 draw_tests_run (uns8 test_num)
Definition at line 46 of file draw_tests.c.
References a_big_bitmap, a_bitmap, adventures_bitmap, draw_bitmap(), DRAW_BOTTOM_PIXEL_Y,
draw_circle2(), draw_clear_screen(), draw_line(), draw_paint, draw_print_str(), draw_rect(), draw_set_pixel(),
DRAW_TOP_PIXEL_Y, e_big_bitmap, e_bitmap, embedded_bitmap, serial_print_str(), TEST_RADIUS,
TEST_RESULT_NO_MORE_TESTS, TEST_RESULT_NOT_APPLICABLE, TEST_RESULT_RAN, and
uns8.
Here is the call graph for this function:
99
draw_tests.h File Reference
Routines to test the Draw graphics functions. #include "pic_utils.h" #include "config.h" #include "draw\draw.h" Include dependency graph for draw_tests.h:
This graph shows which files directly or indirectly include this file:
Defines
#define DRAW_BOTTOM_PIXEL_Y DRAW_PIXELS_HIGH - 1
#define DRAW_TOP_PIXEL_Y 0
#define TEST_RESULT_NO_MORE_TESTS 2
#define TEST_RESULT_NOT_APPLICABLE 1
#define TEST_RESULT_RAN 0
Functions
uns8 draw_tests_run (uns8 test_num)
Detailed Description
Definition in file draw_tests.h.
100
Define Documentation
#define DRAW_BOTTOM_PIXEL_Y DRAW_PIXELS_HIGH - 1
Definition at line 50 of file draw_tests.h.
Referenced by draw_tests_run().
#define DRAW_TOP_PIXEL_Y 0
Definition at line 49 of file draw_tests.h.
Referenced by draw_tests_run().
#define TEST_RESULT_NO_MORE_TESTS 2
Definition at line 58 of file draw_tests.h.
Referenced by draw_tests_run().
#define TEST_RESULT_NOT_APPLICABLE 1
Definition at line 57 of file draw_tests.h.
Referenced by draw_tests_run().
#define TEST_RESULT_RAN 0
Definition at line 56 of file draw_tests.h.
Referenced by draw_tests_run().
Function Documentation
uns8 draw_tests_run (uns8 test_num)
Definition at line 46 of file draw_tests.c.
References a_big_bitmap, a_bitmap, adventures_bitmap, draw_bitmap(), DRAW_BOTTOM_PIXEL_Y,
draw_circle2(), draw_clear_screen(), draw_line(), draw_paint, draw_print_str(), draw_rect(), draw_set_pixel(),
DRAW_TOP_PIXEL_Y, e_big_bitmap, e_bitmap, embedded_bitmap, serial_print_str(), TEST_RADIUS,
TEST_RESULT_NO_MORE_TESTS, TEST_RESULT_NOT_APPLICABLE, TEST_RESULT_RAN, and
uns8.
Here is the call graph for this function:
101
drv_ea_ldp6416.c File Reference
Draw drivers for Embedded Adventures LDP-6416 LED panel and similar. #include "ea_ldp6416.h" #include "config.h" #include "draw\draw.h" #include "draw\draw_screen_buffer.h" Include dependency graph for drv_ea_ldp6416.c:
102
Defines
#define set_pins_r1_g1()
Functions
uns8 drv_get_pixel (uns8 x, uns8 y)
void drv_init ()
void drv_paint ()
void drv_print_buffer ()
void drv_refresh ()
void drv_set_display_brightness (uns8 brightness)
void drv_setup_io ()
Variables
uns8 bright_count = 0
uns8 bright_level = 0
char buffer0 [256]
uns8 buffer_position = 0
uns8 current_buffer = 0
uns8 current_row = 0
Detailed Description
Definition in file drv_ea_ldp6416.c.
103
Define Documentation
#define set_pins_r1_g1()
Value:set_pin(ea_ldp6416_r1_port, ea_ldp6416_r1_pin); \
set_pin(ea_ldp6416_g1_port, ea_ldp6416_g1_pin);
Definition at line 48 of file drv_ea_ldp6416.c.
Referenced by drv_refresh().
Function Documentation
uns8 drv_get_pixel (uns8 x, uns8 y)
Definition at line 279 of file drv_ea_ldp6416.c.
void drv_init ()
Definition at line 287 of file drv_ea_ldp6416.c.
References ea_ldp6416_init().
Here is the call graph for this function:
void drv_paint ()
Definition at line 73 of file drv_ea_ldp6416.c.
References buffer0, buffer1, draw_buffer0, and uns8.
void drv_print_buffer ()
Definition at line 94 of file drv_ea_ldp6416.c.
References buffer0, serial_print_int(), serial_print_nl(), serial_print_spc(), and uns8.
Here is the call graph for this function:
104
void drv_refresh ()
Definition at line 116 of file drv_ea_ldp6416.c.
References bright_count, bright_level, buffer0, buffer1, buffer_position, clear_pin, current_buffer, current_row,
set_pin, set_pins_r1_g1, and uns8.
void drv_set_display_brightness (uns8 brightness)
Definition at line 108 of file drv_ea_ldp6416.c.
References bright_level.
void drv_setup_io ()
Definition at line 283 of file drv_ea_ldp6416.c.
References ea_ldp6416_setup_io().
Here is the call graph for this function:
Variable Documentation
uns8 bright_count = 0
Definition at line 54 of file drv_ea_ldp6416.c.
Referenced by drv_refresh().
uns8 bright_level = 0
Definition at line 55 of file drv_ea_ldp6416.c.
Referenced by drv_refresh(), and drv_set_display_brightness().
char buffer0[256]
Definition at line 62 of file drv_ea_ldp6416.c.
Referenced by drv_paint(), drv_print_buffer(), and drv_refresh().
uns8 buffer_position = 0
Definition at line 56 of file drv_ea_ldp6416.c.
Referenced by drv_refresh().
105
uns8 current_buffer = 0
Definition at line 60 of file drv_ea_ldp6416.c.
Referenced by drv_refresh().
uns8 current_row = 0
Definition at line 52 of file drv_ea_ldp6416.c.
Referenced by drv_refresh().
drv_ea_ldp6432.c File Reference
Draw drivers for Embedded Adventures LDP-6432 LED panel and similar. #include "ea_ldp6432.h" #include "config.h" #include "draw\draw.h" #include "draw\draw_screen_buffer.h" Include dependency graph for drv_ea_ldp6432.c:
Defines
#define MAX_BRIGHTNESS 3
#define set_pins_r1_g1_r2_g2()
106
Functions
void drv_clear_screen ()
uns8 drv_get_pixel (uns8 x, uns8 y)
void drv_init ()
void drv_paint ()
void drv_print_buffer ()
void drv_refresh ()
void drv_set_display_brightness (uns8 brightness)
void drv_setup_io ()
Variables
uns8 bright_count = 0
uns8 bright_level = 3
char buffer0 [256]
char buffer1 [256]
uns8 buffer_position0 = 0
uns8 current_row = 0
Detailed Description
Definition in file drv_ea_ldp6432.c.
Define Documentation
#define MAX_BRIGHTNESS 3
Definition at line 71 of file drv_ea_ldp6432.c.
Referenced by drv_refresh(), and drv_set_display_brightness().
#define set_pins_r1_g1_r2_g2()
Value:set_pin(ea_ldp6432_r1_port, ea_ldp6432_r1_pin); \
set_pin(ea_ldp6432_r2_port, ea_ldp6432_r2_pin); \
set_pin(ea_ldp6432_g1_port, ea_ldp6432_g1_pin); \
set_pin(ea_ldp6432_g2_port, ea_ldp6432_g2_pin)
Definition at line 49 of file drv_ea_ldp6432.c.
Referenced by drv_refresh().
Function Documentation
void drv_clear_screen ()
Definition at line 331 of file drv_ea_ldp6432.c.
uns8 drv_get_pixel (uns8 x, uns8 y)
107
Definition at line 327 of file drv_ea_ldp6432.c.
void drv_init ()
Definition at line 339 of file drv_ea_ldp6432.c.
References ea_ldp6432_init().
Here is the call graph for this function:
void drv_paint ()
Definition at line 74 of file drv_ea_ldp6432.c.
References buffer0, buffer1, draw_buffer0, and uns8.
void drv_print_buffer ()
Definition at line 312 of file drv_ea_ldp6432.c.
References buffer0, serial_print_int(), serial_print_nl(), serial_print_spc(), and uns8.
Here is the call graph for this function:
void drv_refresh ()
Definition at line 98 of file drv_ea_ldp6432.c.
References bright_count, bright_level, buffer0, buffer1, buffer_position0, clear_pin, current_row,
MAX_BRIGHTNESS, set_pin, set_pins_r1_g1_r2_g2, and uns8.
void drv_set_display_brightness (uns8 brightness)
Definition at line 90 of file drv_ea_ldp6432.c.
References bright_level, and MAX_BRIGHTNESS.
void drv_setup_io ()
108
Definition at line 335 of file drv_ea_ldp6432.c.
References ea_ldp6432_setup_io().
Here is the call graph for this function:
Variable Documentation
uns8 bright_count = 0
Definition at line 64 of file drv_ea_ldp6432.c.
uns8 bright_level = 3
Definition at line 65 of file drv_ea_ldp6432.c.
char buffer0[256]
Definition at line 55 of file drv_ea_ldp6432.c.
char buffer1[256]
Definition at line 56 of file drv_ea_ldp6432.c.
Referenced by drv_paint(), and drv_refresh().
uns8 buffer_position0 = 0
Definition at line 66 of file drv_ea_ldp6432.c.
Referenced by drv_refresh().
uns8 current_row = 0
Definition at line 62 of file drv_ea_ldp6432.c.
drv_ea_ldp8008.c File Reference
Draw drivers for Embedded Adventures LDP-8008 LED panel and similar. #include "ea_ldp8008.h" #include "config.h"
109
#include "draw\draw.h" #include "draw\draw_screen_buffer.h" Include dependency graph for drv_ea_ldp8008.c:
Defines
#define MAX_BRIGHTNESS 3
#define set_pins_r_g()
Functions
uns8 drv_get_pixel (uns8 x, uns8 y)
void drv_init ()
void drv_paint ()
void drv_print_buffer ()
void drv_refresh ()
void drv_set_display_brightness (uns8 brightness)
void drv_setup_io ()
Variables
uns8 bright_count = 0
uns8 bright_level = 3
char buffer0 [256]
uns8 buffer_position0 = 0
uns8 current_row = 0
Detailed Description
Definition in file drv_ea_ldp8008.c.
110
Define Documentation
#define MAX_BRIGHTNESS 3
Definition at line 57 of file drv_ea_ldp8008.c.
#define set_pins_r_g()
Value:set_pin(ea_ldp8008_r_port, ea_ldp8008_r_pin); \
set_pin(ea_ldp8008_g_port, ea_ldp8008_g_pin);
Definition at line 48 of file drv_ea_ldp8008.c.
Referenced by drv_refresh().
Function Documentation
uns8 drv_get_pixel (uns8 x, uns8 y)
Definition at line 290 of file drv_ea_ldp8008.c.
void drv_init ()
Definition at line 298 of file drv_ea_ldp8008.c.
References ea_ldp8008_init().
Here is the call graph for this function:
void drv_paint ()
Definition at line 72 of file drv_ea_ldp8008.c.
References buffer0, buffer1, draw_buffer0, end_crit_sec, start_crit_sec, and uns8.
void drv_print_buffer ()
Definition at line 93 of file drv_ea_ldp8008.c.
References buffer0, serial_print_int(), serial_print_nl(), serial_print_spc(), and uns8.
Here is the call graph for this function:
111
void drv_refresh ()
Definition at line 115 of file drv_ea_ldp8008.c.
References bright_count, bright_level, buffer0, buffer_position0, clear_pin, current_row,
MAX_BRIGHTNESS, set_pin, set_pins_r_g, and uns8.
void drv_set_display_brightness (uns8 brightness)
Definition at line 107 of file drv_ea_ldp8008.c.
References bright_level, and MAX_BRIGHTNESS.
void drv_setup_io ()
Definition at line 294 of file drv_ea_ldp8008.c.
References ea_ldp8008_setup_io().
Here is the call graph for this function:
Variable Documentation
uns8 bright_count = 0
Definition at line 54 of file drv_ea_ldp8008.c.
uns8 bright_level = 3
Definition at line 55 of file drv_ea_ldp8008.c.
char buffer0[256]
Definition at line 61 of file drv_ea_ldp8008.c.
112
uns8 buffer_position0 = 0
Definition at line 56 of file drv_ea_ldp8008.c.
uns8 current_row = 0
Definition at line 52 of file drv_ea_ldp8008.c.
drv_pcd8544.c File Reference
Draw drivers for PCD8544 based LCD display (Nokia 3310). #include "pcd8544.h" #include "draw\draw.h" #include "draw\draw_screen_buffer.h" Include dependency graph for drv_pcd8544.c:
Functions
void drv_init ()
void drv_paint ()
void drv_setup_io ()
113
Detailed Description
Definition in file drv_pcd8544.c.
Function Documentation
void drv_init ()
Definition at line 89 of file drv_pcd8544.c.
References pcd8544_init().
Here is the call graph for this function:
void drv_paint ()
Definition at line 45 of file drv_pcd8544.c.
References DRAW_PIXELS_PER_BYTE, get_draw_buffer(), pcd8544_send_command(),
pcd8544_send_data(), serial_print_str(), uns16, and uns8.
Here is the call graph for this function:
void drv_setup_io ()
Definition at line 85 of file drv_pcd8544.c.
References pcd8544_setup_io().
Here is the call graph for this function:
114
drv_sure_2416.c File Reference #include "config.h" #include "ht1632.h" #include "draw\draw.h" #include "draw\draw_screen_buffer.h" Include dependency graph for drv_sure_2416.c:
Functions
void drv_clear_screen ()
uns8 drv_get_pixel (uns8 x, uns8 y)
void drv_init ()
void drv_paint ()
void drv_setup_io ()
Function Documentation
void drv_clear_screen ()
Definition at line 203 of file drv_sure_2416.c.
uns8 drv_get_pixel (uns8 x, uns8 y)
Definition at line 199 of file drv_sure_2416.c.
115
void drv_init ()
Definition at line 211 of file drv_sure_2416.c.
References HT1632_CMD_PMOS_16_COMMON, and ht1632_init().
Here is the call graph for this function:
void drv_paint ()
Definition at line 137 of file drv_sure_2416.c.
References clear_pin, draw_buffer0, set_pin, uns16, and uns8.
void drv_setup_io ()
Definition at line 207 of file drv_sure_2416.c.
References ht1632_setup_io().
Here is the call graph for this function:
drv_sure_3208.c File Reference
Draw drivers for HT1632 based displays such as Sure 3208 and similar. #include "ht1632.h" #include "draw\draw.h" #include "draw\draw_screen_buffer.h" Include dependency graph for drv_sure_3208.c:
116
Functions
void drv_clear_screen ()
uns8 drv_get_pixel (uns8 x, uns8 y)
void drv_init ()
void drv_paint ()
void drv_setup_io ()
Detailed Description
Definition in file drv_sure_3208.c.
Function Documentation
void drv_clear_screen ()
Definition at line 161 of file drv_sure_3208.c.
uns8 drv_get_pixel (uns8 x, uns8 y)
Definition at line 157 of file drv_sure_3208.c.
void drv_init ()
117
Definition at line 169 of file drv_sure_3208.c.
References ht1632_init().
Referenced by draw_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void drv_paint ()
Definition at line 47 of file drv_sure_3208.c.
References clear_pin, draw_buffer0, set_pin, uns16, and uns8.
void drv_setup_io ()
Definition at line 165 of file drv_sure_3208.c.
References ht1632_setup_io().
Referenced by draw_setup_io().
Here is the call graph for this function:
Here is the caller graph for this function:
ds1307.c File Reference #include "ds1307.h" Include dependency graph for ds1307.c:
118
Functions
uns8 bcd_to_dec (uns8 bcd)
uns8 dec_to_bcd (uns8 dec)
uns8 rtc_get_config ()
Get the config register from the ds1307. uns8 rtc_get_date ()
Get the date register from the ds1307. uns8 rtc_get_day ()
Get the day register from the ds1307. uns8 rtc_get_hours ()
Get the decoded hours register from the ds1307. uns8 rtc_get_minutes ()
Get the decoded minutes register from the ds1307. uns8 rtc_get_month ()
Get the month register from the ds1307. uns8 rtc_get_seconds ()
Get the decoded seconds register from the ds1307. uns8 rtc_get_year ()
Get the year register from the ds1307. uns8 rtc_set_config (uns8 config)
Set the config register in the ds1307. void rtc_set_date (uns8 date)
Set the date register from the ds1307. void rtc_set_day (uns8 day)
Set the day of the week register from the ds1307. void rtc_set_hours (uns8 hours)
Set the hours register in the ds1307. void rtc_set_minutes (uns16 minutes)
Set the minutes register from the ds1307. void rtc_set_month (uns8 month)
Set the month register in the ds1307. void rtc_set_seconds (uns8 seconds)
Set the seconds register in the ds1307. void rtc_set_year (uns16 year)
Set the year register from the ds1307. void rtc_setup_io ()
Setup ports and pins for use in the ds1307. void rtc_start_clock ()
Starts the clock in the ds1307. void rtc_stop_clock ()
Stop the clock in the ds1307.
Function Documentation
uns8 bcd_to_dec (uns8 bcd)
119
Definition at line 39 of file ds1307.c.
Referenced by rtc_get_date(), rtc_get_day(), rtc_get_dow(), rtc_get_hours(), rtc_get_minutes(),
rtc_get_month(), rtc_get_seconds(), and rtc_get_year().
Here is the caller graph for this function:
uns8 dec_to_bcd (uns8 dec)
Definition at line 43 of file ds1307.c.
Referenced by rtc_set_date(), rtc_set_day(), rtc_set_hours(), rtc_set_minutes(), rtc_set_month(),
rtc_set_seconds(), and rtc_set_year().
Here is the caller graph for this function:
120
uns8 rtc_get_config ()
Returns the config register from the ds1307. Bit 7 - Out - Value on SQWE pin if not outputting
square wave Bit 6 - 0 Bit 5 - 0 Bit 4 - SQWE - Enable square wave output Bit 3 - 0 Bit 2 - 0 Bit 1 -
RS1 Bit 0 - RS0
RS1/0 determin the speed of the square wave output. Set to 0/0 for 1 Hz.
Definition at line 76 of file ds1307.c.
References ds1307_control_register, ds1307_device, and i2c_read_eeprom().
Here is the call graph for this function:
uns8 rtc_get_date ()
Get the date register from the m41t81s.
121
Returns the date in month from the ds1307. The result is coverted to decimal from BCD and is ready
to use. Range 1 through 28/29/30/31 depending on month
Definition at line 65 of file ds1307.c.
uns8 rtc_get_day ()
Returns the day of the week from the ds1307. The result is coverted to decimal from BCD and is
ready to use. Range - 1 through 7
Definition at line 61 of file ds1307.c.
References bcd_to_dec(), ds1307_day_register, ds1307_device, and i2c_read_eeprom().
Here is the call graph for this function:
uns8 rtc_get_hours ()
Get the decoded hours register from the m41t81s.
Returns hour from the ds1307. The result is coverted to decimal from BCD and is ready to use. These
routines assume the ds1307 is running in 24 hour mode. Range - 0 through 23
Definition at line 50 of file ds1307.c.
uns8 rtc_get_minutes ()
Get the decoded minutes register from the m41t81s.
Returns the number of minutes past the hour from the ds1307. The result is coverted to decimal from
BCD and is ready to use. Range - 0 through 59
Definition at line 47 of file ds1307.c.
uns8 rtc_get_month ()
Get the month register from the m41t81s.
Returns the month of the year from the ds1307. The result is coverted to decimal from BCD and is
ready to use. Range 1 through 12
Definition at line 69 of file ds1307.c.
uns8 rtc_get_seconds ()
Get the decoded seconds register from the m41t81s.
122
Returns seconds from the ds1307. The result is coverted to decimal from BCD and is ready to use.
Range - 0 through 59
Definition at line 57 of file ds1307.c.
uns8 rtc_get_year ()
Get the year register from the m41t81s.
Returns the year from the ds1307. The result is coverted to decimal from BCD and is ready to use.
Range 0 through 99
Definition at line 72 of file ds1307.c.
uns8 rtc_set_config (uns8 config)
Set the config register in the m41t81s.
Sets the config register in the ds1307.
Bit 7 - Out - Value on SQWE pin if not outputting square wave Bit 6 - 0 Bit 5 - 0 Bit 4 - SQWE -
Enable square wave output Bit 3 - 0 Bit 2 - 0 Bit 1 - RS1 Bit 0 - RS0
RS1/0 determin the speed of the square wave output. Set to 0/0 for 1 Hz.
Parameters:
config Value to set the config register to
Definition at line 80 of file ds1307.c.
References ds1307_control_register, ds1307_device, and i2c_write_eeprom().
Here is the call graph for this function:
void rtc_set_date (uns8 date)
Set the date register from the m41t81s.
Changes the date in the ds1307.
Parameters:
seconds Value to set date to
Definition at line 102 of file ds1307.c.
void rtc_set_day (uns8 day)
Set the day of the week register from the m41t81s.
Changes the day of the week in the ds1307.
Parameters:
seconds Value to set day to
123
Definition at line 99 of file ds1307.c.
void rtc_set_hours (uns8 hours)
Set the hours register in the m41t81s.
Changes the hours in the ds1307. Forces the ds1307 into 24 hour mode.
Definition at line 110 of file ds1307.c.
void rtc_set_minutes (uns16 minutes)
Changes the minutes in the ds1307.
Parameters:
seconds Value to set minutes to
Definition at line 96 of file ds1307.c.
References dec_to_bcd(), ds1307_device, ds1307_minutes_register, and i2c_write_eeprom().
Here is the call graph for this function:
void rtc_set_month (uns8 month)
Set the month register in the m41t81s.
Changes the month in the ds1307.
Definition at line 115 of file ds1307.c.
void rtc_set_seconds (uns8 seconds)
Set the seconds register in the m41t81s.
Changes the seconds in the ds1307.
Parameters:
seconds Value to set seconds to
Definition at line 106 of file ds1307.c.
void rtc_set_year (uns16 year)
Changes the year in the ds1307.
Definition at line 93 of file ds1307.c.
References dec_to_bcd(), ds1307_device, ds1307_year_register, and i2c_write_eeprom().
Here is the call graph for this function:
124
void rtc_setup_io ()
Setup ports and pins for use in the m41t81s.
Calls i2c_setup() to configure ports and pins ready for use
Definition at line 119 of file ds1307.c.
void rtc_start_clock ()
Starts the clock in the m41t81s.
Resume time in the ds1307
Definition at line 89 of file ds1307.c.
void rtc_stop_clock ()
Stop the clock in the m41t81s.
Pauses time in the ds1307
Definition at line 85 of file ds1307.c.
ds1307.h File Reference
Routines for communicating with the ds1307 real time clock. #include "i2c.h" #include "pic_utils.h" Include dependency graph for ds1307.h:
125
This graph shows which files directly or indirectly include this file:
Defines
#define __ds1307_h defined
#define ds1307_control_register 0x07
#define ds1307_date_register 0x04
#define ds1307_day_register 0x03
#define ds1307_device 0xD0
#define ds1307_hours_register 0x02
#define ds1307_minutes_register 0x01
#define ds1307_month_register 0x05
#define ds1307_seconds_register 0x00
#define ds1307_year_register 0x06
#define rtc_setup() rtc_setup_io()
Functions
uns8 rtc_get_config ()
Get the config register from the ds1307. uns8 rtc_get_date ()
Get the date register from the ds1307. uns8 rtc_get_day ()
Get the day register from the ds1307. uns8 rtc_get_hours ()
Get the decoded hours register from the ds1307. uns8 rtc_get_minutes ()
Get the decoded minutes register from the ds1307. uns8 rtc_get_month ()
Get the month register from the ds1307. uns8 rtc_get_seconds ()
Get the decoded seconds register from the ds1307. uns8 rtc_get_year ()
Get the year register from the ds1307. uns8 rtc_set_config (uns8 config)
126
Set the config register in the ds1307. void rtc_set_date (uns8 date)
Set the date register from the ds1307. void rtc_set_day (uns8 day)
Set the day of the week register from the ds1307. void rtc_set_hours (uns8 hours)
Set the hours register in the ds1307. void rtc_set_minutes (uns16 minutes)
Set the minutes register from the ds1307. void rtc_set_month (uns8 month)
Set the month register in the ds1307. void rtc_set_seconds (uns8 seconds)
Set the seconds register in the ds1307. void rtc_set_year (uns16 year)
Set the year register from the ds1307. void rtc_setup_io ()
Setup ports and pins for use in the ds1307. void rtc_start_clock ()
Starts the clock in the ds1307. void rtc_stop_clock ()
Stop the clock in the ds1307.
Detailed Description
Definition in file ds1307.h.
Define Documentation
#define __ds1307_h defined
Definition at line 44 of file ds1307.h.
#define ds1307_control_register 0x07
ds1307 control register
Definition at line 67 of file ds1307.h.
Referenced by rtc_get_config(), and rtc_set_config().
#define ds1307_date_register 0x04
ds1307 date in month register
Definition at line 61 of file ds1307.h.
Referenced by rtc_get_date(), and rtc_set_date().
#define ds1307_day_register 0x03
ds1307 day of week register
Definition at line 59 of file ds1307.h.
Referenced by rtc_get_day(), and rtc_set_day().
#define ds1307_device 0xD0
The ds1307 device address
Definition at line 50 of file ds1307.h.
Referenced by rtc_get_config(), rtc_get_date(), rtc_get_day(), rtc_get_hours(), rtc_get_minutes(),
rtc_get_month(), rtc_get_seconds(), rtc_get_year(), rtc_set_config(), rtc_set_date(), rtc_set_day(),
rtc_set_hours(), rtc_set_minutes(), rtc_set_month(), rtc_set_seconds(), rtc_set_year(), rtc_start_clock(), and
rtc_stop_clock().
127
#define ds1307_hours_register 0x02
ds1307 hours register
Definition at line 57 of file ds1307.h.
Referenced by rtc_get_hours(), and rtc_set_hours().
#define ds1307_minutes_register 0x01
ds1307 minutes register
Definition at line 55 of file ds1307.h.
Referenced by rtc_get_minutes(), and rtc_set_minutes().
#define ds1307_month_register 0x05
ds1307 month register
Definition at line 63 of file ds1307.h.
Referenced by rtc_get_month(), and rtc_set_month().
#define ds1307_seconds_register 0x00
ds1307 seconds register
Definition at line 53 of file ds1307.h.
Referenced by rtc_get_seconds(), rtc_set_seconds(), rtc_start_clock(), and rtc_stop_clock().
#define ds1307_year_register 0x06
ds1307 year register
Definition at line 65 of file ds1307.h.
Referenced by rtc_get_year(), and rtc_set_year().
#define rtc_setup() rtc_setup_io()
Definition at line 264 of file ds1307.h.
Function Documentation
uns8 rtc_get_config ()
Returns the config register from the ds1307. Bit 7 - Out - Value on SQWE pin if not outputting
square wave Bit 6 - 0 Bit 5 - 0 Bit 4 - SQWE - Enable square wave output Bit 3 - 0 Bit 2 - 0 Bit 1 -
RS1 Bit 0 - RS0
RS1/0 determin the speed of the square wave output. Set to 0/0 for 1 Hz.
Definition at line 76 of file ds1307.c.
References ds1307_control_register, ds1307_device, and i2c_read_eeprom().
Here is the call graph for this function:
128
uns8 rtc_get_date ()
Returns the date in month from the ds1307. The result is coverted to decimal from BCD and is ready
to use. Range 1 through 28/29/30/31 depending on month
Definition at line 65 of file ds1307.c.
uns8 rtc_get_day ()
Returns the day of the week from the ds1307. The result is coverted to decimal from BCD and is
ready to use. Range - 1 through 7
Definition at line 61 of file ds1307.c.
References bcd_to_dec(), ds1307_day_register, ds1307_device, and i2c_read_eeprom().
Here is the call graph for this function:
uns8 rtc_get_hours ()
Returns hour from the ds1307. The result is coverted to decimal from BCD and is ready to use. These
routines assume the ds1307 is running in 24 hour mode. Range - 0 through 23
Definition at line 50 of file ds1307.c.
uns8 rtc_get_minutes ()
Returns the number of minutes past the hour from the ds1307. The result is coverted to decimal from
BCD and is ready to use. Range - 0 through 59
Definition at line 47 of file ds1307.c.
129
uns8 rtc_get_month ()
Returns the month of the year from the ds1307. The result is coverted to decimal from BCD and is
ready to use. Range 1 through 12
Definition at line 69 of file ds1307.c.
uns8 rtc_get_seconds ()
Returns seconds from the ds1307. The result is coverted to decimal from BCD and is ready to use.
Range - 0 through 59
Definition at line 57 of file ds1307.c.
uns8 rtc_get_year ()
Returns the year from the ds1307. The result is coverted to decimal from BCD and is ready to use.
Range 0 through 99
Definition at line 72 of file ds1307.c.
uns8 rtc_set_config (uns8 config)
Sets the config register in the ds1307.
Bit 7 - Out - Value on SQWE pin if not outputting square wave Bit 6 - 0 Bit 5 - 0 Bit 4 - SQWE -
Enable square wave output Bit 3 - 0 Bit 2 - 0 Bit 1 - RS1 Bit 0 - RS0
RS1/0 determin the speed of the square wave output. Set to 0/0 for 1 Hz.
Parameters:
config Value to set the config register to
Definition at line 80 of file ds1307.c.
void rtc_set_date (uns8 date)
Changes the date in the ds1307.
Parameters:
seconds Value to set date to
Definition at line 102 of file ds1307.c.
void rtc_set_day (uns8 day)
Changes the day of the week in the ds1307.
Parameters:
seconds Value to set day to
Definition at line 99 of file ds1307.c.
void rtc_set_hours (uns8 hours)
Changes the hours in the ds1307. Forces the ds1307 into 24 hour mode.
Definition at line 110 of file ds1307.c.
void rtc_set_minutes (uns16 minutes)
Changes the minutes in the ds1307.
130
Parameters:
seconds Value to set minutes to
Definition at line 96 of file ds1307.c.
References dec_to_bcd(), ds1307_device, ds1307_minutes_register, and i2c_write_eeprom().
Here is the call graph for this function:
void rtc_set_month (uns8 month)
Changes the month in the ds1307.
Definition at line 115 of file ds1307.c.
void rtc_set_seconds (uns8 seconds)
Changes the seconds in the ds1307.
Parameters:
seconds Value to set seconds to
Definition at line 106 of file ds1307.c.
void rtc_set_year (uns16 year)
Changes the year in the ds1307.
Definition at line 93 of file ds1307.c.
References dec_to_bcd(), ds1307_device, ds1307_year_register, and i2c_write_eeprom().
Here is the call graph for this function:
void rtc_setup_io ()
Calls i2c_setup() to configure ports and pins ready for use
Definition at line 119 of file ds1307.c.
131
void rtc_start_clock ()
Resume time in the ds1307
Definition at line 89 of file ds1307.c.
void rtc_stop_clock ()
Pauses time in the ds1307
Definition at line 85 of file ds1307.c.
ds1631.c File Reference #include "ds1631.h" Include dependency graph for ds1631.c:
Functions
void ds1631_convert_temp (uns8 addr)
Start temperature conversion on ds1631. uns8 ds1631_get_config (uns8 addr)
Get ds1631 config register. uns16 ds1631_get_temp (uns8 addr)
Read temperature from ds1631. void ds1631_set_config (uns8 addr, uns8 config)
Set ds1631 config register. void ds1631_setup ()
132
Function Documentation
void ds1631_convert_temp (uns8 addr)
This routine starts the temperature conversion in the ds1631. Issue this command before actually
reading the temperature.
Definition at line 52 of file ds1631.c.
References ds1631_start_convert, i2c_send_byte(), i2c_start(), and i2c_stop().
Here is the call graph for this function:
uns8 ds1631_get_config (uns8 addr)
Gets the ds1631 config register (memory location 0x01)
Definition at line 47 of file ds1631.c.
References ds1631_access_config, and i2c_read_eeprom().
Here is the call graph for this function:
uns16 ds1631_get_temp (uns8 addr)
Returns 16bit raw temperature register from ds1631. Note that if you are in one-shot mode (the
default) you must have already issued a start_convert and waited until it is complete (to check for
completion you can either wait long enough, or query the config register to check).
Definition at line 59 of file ds1631.c.
References ds1631_read_temp, and i2c_read_eeprom_16bit().
Here is the call graph for this function:
133
void ds1631_set_config (uns8 addr, uns8 config)
Sets the ds1631 config register
Definition at line 42 of file ds1631.c.
References ds1631_access_config, and i2c_write_eeprom().
Here is the call graph for this function:
void ds1631_setup ()
Definition at line 38 of file ds1631.c.
References i2c_setup.
ds1631.h File Reference
DS1631 temperature sensor routines. #include "pic_utils.h" #include "i2c.h" Include dependency graph for ds1631.h:
134
This graph shows which files directly or indirectly include this file:
Defines
#define ds1631_access_config 0xAC
#define ds1631_access_th 0xA1
#define ds1631_access_tl 0xA2
#define ds1631_read_temp 0xAA
#define ds1631_setup() ds1631_setup_io()
Setup ds1631 ports and pins. #define ds1631_software_por 0x54
#define ds1631_start_convert 0x51
#define ds1631_stop_convert 0x22
Functions
void ds1631_convert_temp (uns8 addr)
Start temperature conversion on ds1631. uns8 ds1631_get_config (uns8 addr)
Get ds1631 config register. uns16 ds1631_get_temp (uns8 addr)
Read temperature from ds1631. void ds1631_set_config (uns8 addr, uns8 config)
Set ds1631 config register. void ds1631_setup_io (void)
Detailed Description
Definition in file ds1631.h.
135
Define Documentation
#define ds1631_access_config 0xAC
Definition at line 50 of file ds1631.h.
Referenced by ds1631_get_config(), and ds1631_set_config().
#define ds1631_access_th 0xA1
Definition at line 48 of file ds1631.h.
#define ds1631_access_tl 0xA2
Definition at line 49 of file ds1631.h.
#define ds1631_read_temp 0xAA
Definition at line 47 of file ds1631.h.
Referenced by ds1631_get_temp().
#define ds1631_setup() ds1631_setup_io()
Definition at line 58 of file ds1631.h.
#define ds1631_software_por 0x54
Definition at line 51 of file ds1631.h.
#define ds1631_start_convert 0x51
Definition at line 45 of file ds1631.h.
Referenced by ds1631_convert_temp().
#define ds1631_stop_convert 0x22
Definition at line 46 of file ds1631.h.
Function Documentation
void ds1631_convert_temp (uns8 addr)
This routine starts the temperature conversion in the ds1631. Issue this command before actually
reading the temperature.
Definition at line 52 of file ds1631.c.
136
References ds1631_start_convert, i2c_send_byte(), i2c_start(), and i2c_stop().
Here is the call graph for this function:
uns8 ds1631_get_config (uns8 addr)
Gets the ds1631 config register (memory location 0x01)
Definition at line 47 of file ds1631.c.
References ds1631_access_config, and i2c_read_eeprom().
Here is the call graph for this function:
uns16 ds1631_get_temp (uns8 addr)
Returns 16bit raw temperature register from ds1631. Note that if you are in one-shot mode (the
default) you must have already issued a start_convert and waited until it is complete (to check for
completion you can either wait long enough, or query the config register to check).
Definition at line 59 of file ds1631.c.
References ds1631_read_temp, and i2c_read_eeprom_16bit().
Here is the call graph for this function:
137
void ds1631_set_config (uns8 addr, uns8 config)
Sets the ds1631 config register
Definition at line 42 of file ds1631.c.
References ds1631_access_config, and i2c_write_eeprom().
Here is the call graph for this function:
void ds1631_setup_io (void)
ea_bitmaps.c File Reference
Bitmaps for draw library testing.
Variables
char a_big_bitmap []
char a_bitmap []
char adventures_bitmap []
char e_big_bitmap []
char e_bitmap []
char embedded_bitmap []
138
Detailed Description
Definition in file ea_bitmaps.c.
Variable Documentation
char a_big_bitmap[]
Definition at line 126 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char a_bitmap[]
Initial value: {
0x12,
0x10,
0x01,
0x24,
0x80,0x3F,0xC0,0x7F,0xC0,0x7F,0xE0,0xFF,0xE0,0xF1,0xE0,0xF1,0xE0,0xF1,0xE0,0xF1,
0xE6,0xF1,0xEF,0xF1,0xEF,0xF1,0xEF,0xF1,0xEF,0xF1,0xEF,0xF1,0xFF,0xFF,0xFE,0x7F,
0xFE,0x7F,0xF8,0x3F,
}
Definition at line 74 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char adventures_bitmap[]
Initial value: {
0x40,
0x08,
0x01,
0x40,
0x70,0x90,0x90,0x90,0x94,0x94,0x7C,0x00,0x78,0x84,0x84,0x84,0x84,0x84,0x7F,0x00,
0x0C,0x18,0x60,0xC0,0x70,0x18,0x0C,0x00,0x78,0xA4,0xA4,0x24,0x24,0x38,0x00,0xF8,
0x04,0x04,0x04,0x04,0x04,0xF8,0x04,0xFF,0x04,0x04,0x7C,0x80,0x80,0x80,0x80,0xFC,
0x00,0xF8,0x04,0x04,0x00,0x78,0xA4,0xA4,0x24,0x24,0x38,0x00,0x98,0xA4,0xA4,0xC4,
}
Definition at line 52 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char e_big_bitmap[]
Definition at line 84 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char e_bitmap[]
Initial value: {
0x11,
0x10,
0x01,
0x22,
0xF8,0x1F,0xFE,0x7F,0xFE,0x7F,0xFF,0xFF,0xCF,0xF3,0xCF,0xF3,0xCF,0xF3,0xCF,0xF3,
0xCF,0xF3,0xCF,0xF3,0xCF,0x03,0xCF,0x03,0xCF,0x03,0xFF,0x03,0xFE,0x03,0xFE,0x03,
0xFC,0x03,
139
}
Definition at line 63 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char embedded_bitmap[]
Initial value: {
0x40,
0x08,
0x01,
0x40,
0x78,0xA4,0xA4,0x24,0x24,0x38,0x00,0x00,0xF8,0x04,0x04,0xFC,0x04,0x04,0x04,0xF8,
0x00,0x7F,0x84,0x84,0x84,0x84,0x84,0x78,0x00,0x00,0x78,0xA4,0xA4,0x24,0x24,0x38,
0x00,0x78,0x84,0x84,0x84,0x84,0x84,0x7F,0x00,0x78,0x84,0x84,0x84,0x84,0x84,0x7F,
0x00,0x00,0x78,0xA4,0xA4,0x24,0x24,0x38,0x00,0x78,0x84,0x84,0x84,0x84,0x84,0x7F,
}
Definition at line 40 of file ea_bitmaps.c.
Referenced by draw_tests_run().
ea_bitmaps.h File Reference
Bitmaps for draw library testing. This graph shows which files directly or indirectly include this file:
Variables
char a_big_bitmap [1]
char a_bitmap [1]
char adventures_bitmap [1]
char e_big_bitmap [1]
char e_bitmap [1]
char embedded_bitmap [1]
Detailed Description
Definition in file ea_bitmaps.h.
140
Variable Documentation
char a_big_bitmap[1]
Definition at line 126 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char a_bitmap[1]
Definition at line 74 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char adventures_bitmap[1]
Definition at line 52 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char e_big_bitmap[1]
Definition at line 84 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char e_bitmap[1]
Definition at line 63 of file ea_bitmaps.c.
Referenced by draw_tests_run().
char embedded_bitmap[1]
Definition at line 40 of file ea_bitmaps.c.
Referenced by draw_tests_run().
ea_ldp6416.c File Reference #include "ea_ldp6416.h" Include dependency graph for ea_ldp6416.c:
141
Functions
void ea_ldp6416_init ()
void ea_ldp6416_setup_io ()
Function Documentation
void ea_ldp6416_init ()
Definition at line 63 of file ea_ldp6416.c.
Referenced by drv_init().
Here is the caller graph for this function:
void ea_ldp6416_setup_io ()
Definition at line 40 of file ea_ldp6416.c.
References clear_pin, make_output, and set_pin.
Referenced by drv_setup_io().
Here is the caller graph for this function:
142
ea_ldp6416.h File Reference
Support routines for LDP-6416 LED display panel. #include "pic_utils.h" #include "draw\draw.h" #include "config.h" Include dependency graph for ea_ldp6416.h:
This graph shows which files directly or indirectly include this file:
Defines
#define ea_ldp6416_setup() ea_ldp6416_setup_io()
Functions
void ea_ldp6416_init ()
void ea_ldp6416_setup_io ()
143
Detailed Description
Definition in file ea_ldp6416.h.
Define Documentation
#define ea_ldp6416_setup() ea_ldp6416_setup_io()
Definition at line 139 of file ea_ldp6416.h.
Function Documentation
void ea_ldp6416_init ()
Definition at line 63 of file ea_ldp6416.c.
Referenced by drv_init().
Here is the caller graph for this function:
void ea_ldp6416_setup_io ()
Definition at line 40 of file ea_ldp6416.c.
References clear_pin, make_output, and set_pin.
Referenced by drv_setup_io().
Here is the caller graph for this function:
ea_ldp6432.c File Reference #include "ea_ldp6432.h" #include "pic_serial.h" Include dependency graph for ea_ldp6432.c:
144
Functions
void ea_ldp6432_init ()
void ea_ldp6432_setup_io ()
Function Documentation
void ea_ldp6432_init ()
Definition at line 67 of file ea_ldp6432.c.
Referenced by drv_init().
Here is the caller graph for this function:
void ea_ldp6432_setup_io ()
Definition at line 44 of file ea_ldp6432.c.
References clear_pin, make_output, and set_pin.
Referenced by drv_setup_io().
Here is the caller graph for this function:
145
ea_ldp6432.h File Reference
Support routines for the LDP-6432 LED display panel. #include "config.h" #include "pic_utils.h" Include dependency graph for ea_ldp6432.h:
This graph shows which files directly or indirectly include this file:
Defines
#define ea_ldp6432_setup() ea_ldp6432_setup_io()
Functions
void ea_ldp6432_init ()
void ea_ldp6432_setup_io ()
Detailed Description
Definition in file ea_ldp6432.h.
Define Documentation
#define ea_ldp6432_setup() ea_ldp6432_setup_io()
Definition at line 92 of file ea_ldp6432.h.
146
Function Documentation
void ea_ldp6432_init ()
Definition at line 67 of file ea_ldp6432.c.
Referenced by drv_init().
Here is the caller graph for this function:
void ea_ldp6432_setup_io ()
Definition at line 44 of file ea_ldp6432.c.
References clear_pin, make_output, and set_pin.
Referenced by drv_setup_io().
Here is the caller graph for this function:
ea_ldp8008.c File Reference #include "ea_ldp8008.h" Include dependency graph for ea_ldp8008.c:
147
Functions
void ea_ldp8008_init ()
void ea_ldp8008_setup_io ()
Function Documentation
void ea_ldp8008_init ()
Definition at line 60 of file ea_ldp8008.c.
Referenced by drv_init().
Here is the caller graph for this function:
void ea_ldp8008_setup_io ()
Definition at line 40 of file ea_ldp8008.c.
References clear_pin, and make_output.
Referenced by drv_setup_io().
Here is the caller graph for this function:
ea_ldp8008.h File Reference
Support for LDP-8008 80x08 LED panel. #include "config.h" #include "pic_utils.h" Include dependency graph for ea_ldp8008.h:
148
This graph shows which files directly or indirectly include this file:
Defines
#define ea_ldp8008_setup() ea_ldp8008_setup_io()
Functions
void ea_ldp8008_init ()
void ea_ldp8008_setup_io ()
Detailed Description
Definition in file ea_ldp8008.h.
Define Documentation
#define ea_ldp8008_setup() ea_ldp8008_setup_io()
Definition at line 86 of file ea_ldp8008.h.
Function Documentation
void ea_ldp8008_init ()
Definition at line 60 of file ea_ldp8008.c.
Referenced by drv_init().
Here is the caller graph for this function:
void ea_ldp8008_setup_io ()
Definition at line 40 of file ea_ldp8008.c.
149
References clear_pin, and make_output.
Referenced by drv_setup_io().
Here is the caller graph for this function:
hc4led.c File Reference #include "hc4led.h" #include "pic_serial.h" Include dependency graph for hc4led.c:
Functions
uns8 hc4led_convert (uns8 digit)
void hc4led_setup ()
void hc4led_write_str (char *data)
Function Documentation
uns8 hc4led_convert (uns8 digit)
Definition at line 43 of file hc4led.c.
150
Referenced by hc4led_write_str().
Here is the caller graph for this function:
void hc4led_setup ()
Definition at line 39 of file hc4led.c.
References spi_setup().
Here is the call graph for this function:
void hc4led_write_str (char * data)
Definition at line 60 of file hc4led.c.
References hc4led_convert(), spi_write(), and uns8.
Here is the call graph for this function:
hc4led.h File Reference
Routines to access four digit LED display. #include "spi.h" #include "pic_utils.h" Include dependency graph for hc4led.h:
151
This graph shows which files directly or indirectly include this file:
Defines
#define __hc4led_h include
Functions
void hc4led_setup ()
void hc4led_write_str (char *data)
Detailed Description
Definition in file hc4led.h.
Define Documentation
#define __hc4led_h include
Definition at line 41 of file hc4led.h.
152
Function Documentation
void hc4led_setup ()
Definition at line 39 of file hc4led.c.
References spi_setup().
Here is the call graph for this function:
void hc4led_write_str (char * data)
Definition at line 60 of file hc4led.c.
References hc4led_convert(), spi_write(), and uns8.
Here is the call graph for this function:
hmc6352.c File Reference #include "hmc6352.h" #include "i2c.h" Include dependency graph for hmc6352.c:
153
Functions
void hmc6352_enter_cal ()
void hmc6352_exit_cal ()
uns16 hmc6352_get_data ()
uns8 hmc6352_read_eeprom (uns8 addr)
uns8 hmc6352_read_ram (uns8 addr)
void hmc6352_save_op_mode ()
void hmc6352_set_mode (uns8 mode)
void hmc6352_setup_io ()
void hmc6352_sleep ()
void hmc6352_update_bridge_offsets ()
void hmc6352_wake ()
void hmc6352_write_eeprom (uns8 addr, uns8 data)
void hmc6352_write_ram (uns8 addr, uns8 data)
Function Documentation
void hmc6352_enter_cal ()
Definition at line 160 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_enter_cal_cmd, hmc6352_write, i2c_send_byte(), i2c_start(), and
i2c_stop().
Here is the call graph for this function:
void hmc6352_exit_cal ()
Definition at line 171 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_exit_cal_cmd, hmc6352_write, i2c_send_byte(), i2c_start(), and
i2c_stop().
Here is the call graph for this function:
154
uns16 hmc6352_get_data ()
Definition at line 193 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_get_data_cmd, hmc6352_read, hmc6352_write,
i2c_receive_byte(), i2c_send_ack(), i2c_send_byte(), i2c_start(), i2c_stop(), and uns16.
Here is the call graph for this function:
uns8 hmc6352_read_eeprom (uns8 addr)
Definition at line 55 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_read, hmc6352_read_from_eeprom, hmc6352_write,
i2c_receive_byte(), i2c_send_ack(), i2c_send_byte(), i2c_start(), i2c_stop(), and uns8.
Here is the call graph for this function:
155
uns8 hmc6352_read_ram (uns8 addr)
Definition at line 99 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_read, hmc6352_read_from_ram, hmc6352_write,
i2c_receive_byte(), i2c_send_ack(), i2c_send_byte(), i2c_start(), i2c_stop(), and uns8.
Referenced by hmc6352_set_mode().
Here is the call graph for this function:
Here is the caller graph for this function:
void hmc6352_save_op_mode ()
Definition at line 182 of file hmc6352.c.
156
References hmc6352_device_addr, hmc6352_save_op_mode_cmd, hmc6352_write, i2c_send_byte(),
i2c_start(), and i2c_stop().
Here is the call graph for this function:
void hmc6352_set_mode (uns8 mode)
Definition at line 225 of file hmc6352.c.
References hmc6352_mode_continuous, hmc6352_mode_query, hmc6352_mode_standby,
hmc6352_read_ram(), hmc6352_write_ram(), and uns8.
Here is the call graph for this function:
void hmc6352_setup_io ()
Definition at line 247 of file hmc6352.c.
References i2c_setup_io().
Here is the call graph for this function:
void hmc6352_sleep ()
157
Definition at line 125 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_sleep_cmd, hmc6352_write, i2c_send_byte(), i2c_start(), and
i2c_stop().
Here is the call graph for this function:
void hmc6352_update_bridge_offsets ()
Definition at line 149 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_update_bridge_cmd, hmc6352_write, i2c_send_byte(),
i2c_start(), and i2c_stop().
Here is the call graph for this function:
void hmc6352_wake ()
Definition at line 137 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_wake_cmd, hmc6352_write, i2c_send_byte(), i2c_start(), and
i2c_stop().
Here is the call graph for this function:
158
void hmc6352_write_eeprom (uns8 addr, uns8 data)
Definition at line 40 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_write, hmc6352_write_to_eeprom, i2c_send_byte(), i2c_start(),
and i2c_stop().
Here is the call graph for this function:
void hmc6352_write_ram (uns8 addr, uns8 data)
Definition at line 82 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_write, hmc6352_write_to_ram, i2c_send_byte(), i2c_start(), and
i2c_stop().
Referenced by hmc6352_set_mode().
Here is the call graph for this function:
Here is the caller graph for this function:
hmc6352.h File Reference
Routines for communicating with the hmc6352 digital compass. #include "pic_utils.h" Include dependency graph for hmc6352.h:
159
This graph shows which files directly or indirectly include this file:
Defines
#define hmc6352_device_addr 0x42
#define hmc6352_ee_slave_addr 0x00
#define hmc6352_ee_time_delay 0x05
#define hmc6352_ee_x_offset_lsb 0x02
#define hmc6352_ee_x_offset_msb 0x01
#define hmc6352_ee_y_offset_lsb 0x04
#define hmc6352_ee_y_offset_msb 0x03
#define hmc6352_enter_cal_cmd 0x43
#define hmc6352_exit_cal_cmd 0x45
#define hmc6352_get_data_cmd 0x41
#define hmc6352_mode_continuous 0x02
#define hmc6352_mode_query 0x01
#define hmc6352_mode_standby 0x00
#define hmc6352_num_summed 0x06
#define hmc6352_op_mode 0x08
#define hmc6352_ram_op_mode_control 0x74
#define hmc6352_ram_output_data_control 0x4e
#define hmc6352_read 0x01
#define hmc6352_read_from_eeprom 0x72
#define hmc6352_read_from_ram 0x67
#define hmc6352_save_op_mode_cmd 0x4c
#define hmc6352_sleep_cmd 0x53
#define hmc6352_software_ver 0x07
#define hmc6352_update_bridge_cmd 0x4F
#define hmc6352_wake_cmd 0x57
#define hmc6352_write 0x00
#define hmc6352_write_to_eeprom 0x77
160
#define hmc6352_write_to_ram 0x47
Functions
void hmc6352_enter_cal ()
void hmc6352_exit_cal ()
uns16 hmc6352_get_data ()
uns8 hmc6352_read_eeprom (uns8 addr)
uns8 hmc6352_read_ram (uns8 addr)
void hmc6352_save_op_mode ()
void hmc6352_set_mode (uns8 mode)
void hmc6352_setup_io ()
void hmc6352_sleep ()
void hmc6352_update_bridge_offsets ()
void hmc6352_wake ()
void hmc6352_write_eeprom (uns8 addr, uns8 data)
void hmc6352_write_ram (uns8 addr, uns8 data)
Detailed Description
Definition in file hmc6352.h.
Define Documentation
#define hmc6352_device_addr 0x42
Definition at line 47 of file hmc6352.h.
Referenced by hmc6352_enter_cal(), hmc6352_exit_cal(), hmc6352_get_data(), hmc6352_read_eeprom(),
hmc6352_read_ram(), hmc6352_save_op_mode(), hmc6352_sleep(), hmc6352_update_bridge_offsets(),
hmc6352_wake(), hmc6352_write_eeprom(), and hmc6352_write_ram().
#define hmc6352_ee_slave_addr 0x00
Definition at line 63 of file hmc6352.h.
#define hmc6352_ee_time_delay 0x05
Definition at line 68 of file hmc6352.h.
#define hmc6352_ee_x_offset_lsb 0x02
Definition at line 65 of file hmc6352.h.
#define hmc6352_ee_x_offset_msb 0x01
161
Definition at line 64 of file hmc6352.h.
#define hmc6352_ee_y_offset_lsb 0x04
Definition at line 67 of file hmc6352.h.
#define hmc6352_ee_y_offset_msb 0x03
Definition at line 66 of file hmc6352.h.
#define hmc6352_enter_cal_cmd 0x43
Definition at line 58 of file hmc6352.h.
Referenced by hmc6352_enter_cal().
#define hmc6352_exit_cal_cmd 0x45
Definition at line 59 of file hmc6352.h.
Referenced by hmc6352_exit_cal().
#define hmc6352_get_data_cmd 0x41
Definition at line 61 of file hmc6352.h.
Referenced by hmc6352_get_data().
#define hmc6352_mode_continuous 0x02
Definition at line 75 of file hmc6352.h.
Referenced by hmc6352_set_mode().
#define hmc6352_mode_query 0x01
Definition at line 74 of file hmc6352.h.
Referenced by hmc6352_set_mode().
#define hmc6352_mode_standby 0x00
Definition at line 73 of file hmc6352.h.
Referenced by hmc6352_set_mode().
#define hmc6352_num_summed 0x06
Definition at line 69 of file hmc6352.h.
162
#define hmc6352_op_mode 0x08
Definition at line 71 of file hmc6352.h.
#define hmc6352_ram_op_mode_control 0x74
Definition at line 77 of file hmc6352.h.
#define hmc6352_ram_output_data_control 0x4e
Definition at line 78 of file hmc6352.h.
#define hmc6352_read 0x01
Definition at line 48 of file hmc6352.h.
Referenced by hmc6352_get_data(), hmc6352_read_eeprom(), and hmc6352_read_ram().
#define hmc6352_read_from_eeprom 0x72
Definition at line 52 of file hmc6352.h.
Referenced by hmc6352_read_eeprom().
#define hmc6352_read_from_ram 0x67
Definition at line 54 of file hmc6352.h.
Referenced by hmc6352_read_ram().
#define hmc6352_save_op_mode_cmd 0x4c
Definition at line 60 of file hmc6352.h.
Referenced by hmc6352_save_op_mode().
#define hmc6352_sleep_cmd 0x53
Definition at line 55 of file hmc6352.h.
Referenced by hmc6352_sleep().
#define hmc6352_software_ver 0x07
Definition at line 70 of file hmc6352.h.
#define hmc6352_update_bridge_cmd 0x4F
163
Definition at line 57 of file hmc6352.h.
Referenced by hmc6352_update_bridge_offsets().
#define hmc6352_wake_cmd 0x57
Definition at line 56 of file hmc6352.h.
Referenced by hmc6352_wake().
#define hmc6352_write 0x00
Definition at line 49 of file hmc6352.h.
Referenced by hmc6352_enter_cal(), hmc6352_exit_cal(), hmc6352_get_data(), hmc6352_read_eeprom(),
hmc6352_read_ram(), hmc6352_save_op_mode(), hmc6352_sleep(), hmc6352_update_bridge_offsets(),
hmc6352_wake(), hmc6352_write_eeprom(), and hmc6352_write_ram().
#define hmc6352_write_to_eeprom 0x77
Definition at line 51 of file hmc6352.h.
Referenced by hmc6352_write_eeprom().
#define hmc6352_write_to_ram 0x47
Definition at line 53 of file hmc6352.h.
Referenced by hmc6352_write_ram().
Function Documentation
void hmc6352_enter_cal ()
Definition at line 160 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_enter_cal_cmd, hmc6352_write, i2c_send_byte(), i2c_start(), and
i2c_stop().
Here is the call graph for this function:
164
void hmc6352_exit_cal ()
Definition at line 171 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_exit_cal_cmd, hmc6352_write, i2c_send_byte(), i2c_start(), and
i2c_stop().
Here is the call graph for this function:
uns16 hmc6352_get_data ()
Definition at line 193 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_get_data_cmd, hmc6352_read, hmc6352_write,
i2c_receive_byte(), i2c_send_ack(), i2c_send_byte(), i2c_start(), i2c_stop(), and uns16.
Here is the call graph for this function:
uns8 hmc6352_read_eeprom (uns8 addr)
Definition at line 55 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_read, hmc6352_read_from_eeprom, hmc6352_write,
i2c_receive_byte(), i2c_send_ack(), i2c_send_byte(), i2c_start(), i2c_stop(), and uns8.
Here is the call graph for this function:
165
uns8 hmc6352_read_ram (uns8 addr)
Definition at line 99 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_read, hmc6352_read_from_ram, hmc6352_write,
i2c_receive_byte(), i2c_send_ack(), i2c_send_byte(), i2c_start(), i2c_stop(), and uns8.
Referenced by hmc6352_set_mode().
Here is the call graph for this function:
Here is the caller graph for this function:
void hmc6352_save_op_mode ()
Definition at line 182 of file hmc6352.c.
166
References hmc6352_device_addr, hmc6352_save_op_mode_cmd, hmc6352_write, i2c_send_byte(),
i2c_start(), and i2c_stop().
Here is the call graph for this function:
void hmc6352_set_mode (uns8 mode)
Definition at line 225 of file hmc6352.c.
References hmc6352_mode_continuous, hmc6352_mode_query, hmc6352_mode_standby,
hmc6352_read_ram(), hmc6352_write_ram(), and uns8.
Here is the call graph for this function:
void hmc6352_setup_io ()
Definition at line 247 of file hmc6352.c.
References i2c_setup_io().
Here is the call graph for this function:
void hmc6352_sleep ()
167
Definition at line 125 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_sleep_cmd, hmc6352_write, i2c_send_byte(), i2c_start(), and
i2c_stop().
Here is the call graph for this function:
void hmc6352_update_bridge_offsets ()
Definition at line 149 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_update_bridge_cmd, hmc6352_write, i2c_send_byte(),
i2c_start(), and i2c_stop().
Here is the call graph for this function:
void hmc6352_wake ()
Definition at line 137 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_wake_cmd, hmc6352_write, i2c_send_byte(), i2c_start(), and
i2c_stop().
Here is the call graph for this function:
168
void hmc6352_write_eeprom (uns8 addr, uns8 data)
Definition at line 40 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_write, hmc6352_write_to_eeprom, i2c_send_byte(), i2c_start(),
and i2c_stop().
Here is the call graph for this function:
void hmc6352_write_ram (uns8 addr, uns8 data)
Definition at line 82 of file hmc6352.c.
References hmc6352_device_addr, hmc6352_write, hmc6352_write_to_ram, i2c_send_byte(), i2c_start(), and
i2c_stop().
Referenced by hmc6352_set_mode().
Here is the call graph for this function:
Here is the caller graph for this function:
ht1632.c File Reference #include "ht1632.h" Include dependency graph for ht1632.c:
169
Functions
void ht1632_fill (uns8 colour)
void ht1632_fill2 (uns8 colour)
void ht1632_init (uns8 hw_config)
void ht1632_send_command (uns8 command)
void ht1632_set_brightness (uns8 brightness)
void ht1632_set_pixel (uns8 x, uns8 y, uns8 colour)
void ht1632_setup_io ()
void ht1632_write (uns8 mem_addr, uns8 data)
Function Documentation
void ht1632_fill (uns8 colour)
Definition at line 326 of file ht1632.c.
References ht1632_write(), and uns8.
Here is the call graph for this function:
void ht1632_fill2 (uns8 colour)
Definition at line 341 of file ht1632.c.
References clear_pin, HT1632_CMD_LEDS_OFF, HT1632_CMD_LEDS_ON, ht1632_send_command(),
set_pin, and uns16.
Here is the call graph for this function:
170
void ht1632_init (uns8 hw_config)
Definition at line 75 of file ht1632.c.
References HT1632_CMD_CLK_MASTER_MODE, HT1632_CMD_LEDS_ON,
HT1632_CMD_SYS_DISABLE, HT1632_CMD_SYS_ENABLE, and ht1632_send_command().
Referenced by drv_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void ht1632_send_command (uns8 command)
Definition at line 86 of file ht1632.c.
References clear_pin, set_pin, and uns8.
Referenced by ht1632_fill2(), ht1632_init(), and ht1632_set_brightness().
Here is the caller graph for this function:
void ht1632_set_brightness (uns8 brightness)
Definition at line 206 of file ht1632.c.
References ht1632_send_command().
Here is the call graph for this function:
171
void ht1632_set_pixel (uns8 x, uns8 y, uns8 colour)
Definition at line 211 of file ht1632.c.
References clear_pin, make_input, make_output, set_pin, test_pin, and uns8.
void ht1632_setup_io ()
Definition at line 41 of file ht1632.c.
References make_output, and set_pin.
Referenced by drv_setup_io().
Here is the caller graph for this function:
void ht1632_write (uns8 mem_addr, uns8 data)
Definition at line 142 of file ht1632.c.
References change_pin_var, clear_pin, set_pin, and uns8.
Referenced by ht1632_fill().
Here is the caller graph for this function:
ht1632.h File Reference
Holtek LED matrix display routines, used in Sure 2416 display and others. #include "config.h" #include "pic_utils.h" Include dependency graph for ht1632.h:
172
This graph shows which files directly or indirectly include this file:
Defines
#define HT1632_CMD_BLINK_OFF 0b00001000
#define HT1632_CMD_BLINK_ON 0b00001001
#define HT1632_CMD_CLK_MASTER_MODE 0b00010100
#define HT1632_CMD_CLK_SLAVE_MODE 0b00010000
#define HT1632_CMD_CLK_SOURCE_EXT 0b00011100
#define HT1632_CMD_CLK_SOURCE_INT_RC 0b00011000
#define HT1632_CMD_LEDS_OFF 0b00000010
#define HT1632_CMD_LEDS_ON 0b00000011
#define HT1632_CMD_NMOS_16_COMMON 0b00100100
#define HT1632_CMD_NMOS_8_COMMON 0b00100000
#define HT1632_CMD_PMOS_16_COMMON 0b00101100
#define HT1632_CMD_PMOS_8_COMMON 0b00101000
#define HT1632_CMD_SYS_DISABLE 0b00000000
#define HT1632_CMD_SYS_ENABLE 0b00000001
Functions
void ht1632_clear ()
void ht1632_fill (uns8 colour)
void ht1632_fill2 (uns8 colour)
uns8 ht1632_get_pixel (uns8 x, uns8 y)
void ht1632_horizontal_line (uns8 x, uns8 y, uns8 length, uns8 colour)
void ht1632_init (uns8 hw_config)
void ht1632_send_command (uns8 command)
void ht1632_set_brightness (uns8 brightness)
void ht1632_set_pixel (uns8 x, uns8 y, uns8 colour)
void ht1632_setup_io ()
void ht1632_vertical_line (uns8 x, uns8 y, uns8 length, uns8 colour)
void ht1632_write (uns8 mem_addr, uns8 data)
Detailed Description
Routines to communicate with Holtek HT1632 led matrix display chip
Definition in file ht1632.h.
173
Define Documentation
#define HT1632_CMD_BLINK_OFF 0b00001000
Definition at line 104 of file ht1632.h.
#define HT1632_CMD_BLINK_ON 0b00001001
Definition at line 105 of file ht1632.h.
#define HT1632_CMD_CLK_MASTER_MODE 0b00010100
Definition at line 95 of file ht1632.h.
Referenced by ht1632_init().
#define HT1632_CMD_CLK_SLAVE_MODE 0b00010000
Definition at line 96 of file ht1632.h.
#define HT1632_CMD_CLK_SOURCE_EXT 0b00011100
Definition at line 99 of file ht1632.h.
#define HT1632_CMD_CLK_SOURCE_INT_RC 0b00011000
Definition at line 98 of file ht1632.h.
#define HT1632_CMD_LEDS_OFF 0b00000010
Definition at line 101 of file ht1632.h.
Referenced by ht1632_fill2().
#define HT1632_CMD_LEDS_ON 0b00000011
Definition at line 102 of file ht1632.h.
Referenced by ht1632_fill2(), and ht1632_init().
#define HT1632_CMD_NMOS_16_COMMON 0b00100100
Definition at line 91 of file ht1632.h.
#define HT1632_CMD_NMOS_8_COMMON 0b00100000
Definition at line 90 of file ht1632.h.
174
#define HT1632_CMD_PMOS_16_COMMON 0b00101100
Definition at line 93 of file ht1632.h.
Referenced by drv_init().
#define HT1632_CMD_PMOS_8_COMMON 0b00101000
Definition at line 92 of file ht1632.h.
#define HT1632_CMD_SYS_DISABLE 0b00000000
Definition at line 87 of file ht1632.h.
Referenced by ht1632_init().
#define HT1632_CMD_SYS_ENABLE 0b00000001
Definition at line 88 of file ht1632.h.
Referenced by ht1632_init().
Function Documentation
void ht1632_clear ()
void ht1632_fill (uns8 colour)
Definition at line 326 of file ht1632.c.
References ht1632_write(), and uns8.
Here is the call graph for this function:
void ht1632_fill2 (uns8 colour)
Definition at line 341 of file ht1632.c.
References clear_pin, HT1632_CMD_LEDS_OFF, HT1632_CMD_LEDS_ON, ht1632_send_command(),
set_pin, and uns16.
Here is the call graph for this function:
175
uns8 ht1632_get_pixel (uns8 x, uns8 y)
void ht1632_horizontal_line (uns8 x, uns8 y, uns8 length, uns8 colour)
void ht1632_init (uns8 hw_config)
Definition at line 75 of file ht1632.c.
References HT1632_CMD_CLK_MASTER_MODE, HT1632_CMD_LEDS_ON,
HT1632_CMD_SYS_DISABLE, HT1632_CMD_SYS_ENABLE, and ht1632_send_command().
Referenced by drv_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void ht1632_send_command (uns8 command)
Definition at line 86 of file ht1632.c.
References clear_pin, set_pin, and uns8.
Referenced by ht1632_fill2(), ht1632_init(), and ht1632_set_brightness().
Here is the caller graph for this function:
void ht1632_set_brightness (uns8 brightness)
Definition at line 206 of file ht1632.c.
References ht1632_send_command().
Here is the call graph for this function:
176
void ht1632_set_pixel (uns8 x, uns8 y, uns8 colour)
Definition at line 211 of file ht1632.c.
References clear_pin, make_input, make_output, set_pin, test_pin, and uns8.
void ht1632_setup_io ()
Definition at line 41 of file ht1632.c.
References make_output, and set_pin.
Referenced by drv_setup_io().
Here is the caller graph for this function:
void ht1632_vertical_line (uns8 x, uns8 y, uns8 length, uns8 colour)
void ht1632_write (uns8 mem_addr, uns8 data)
Definition at line 142 of file ht1632.c.
References change_pin_var, clear_pin, set_pin, and uns8.
Referenced by ht1632_fill().
Here is the caller graph for this function:
i2c.c File Reference #include "i2c.h" #include "pic_serial.h" Include dependency graph for i2c.c:
177
Defines
#define DELAY_AMOUNT 10
Functions
void i2c_ack_polling (uns8 device_address)
uns8 i2c_read_eeprom (uns8 device_address, uns8 mem_address)
Read an 8 bit byte over I2C buss. uns16 i2c_read_eeprom_16bit (uns8 device_address, uns8 mem_address)
Read 16 bits of data over I2C buss. uns8 i2c_receive_byte (void)
Receive byte from I2C buss. void i2c_send_ack (void)
Send an ACK. void i2c_send_byte (uns8 data)
Send a byte to I2C buss. void i2c_setup_io ()
Setup ports and pins for I2C communication. void i2c_start (void)
Send start signal to I2C buss. void i2c_stop (void)
Send stop signal to I2C buss. void i2c_write_eeprom (uns8 device_address, uns8 mem_address, uns8 data)
Write an 8 bit byte ove I2C buss. void i2c_write_eeprom_16bit (uns8 device_address, uns8 mem_address,
uns16 data)
Write a 16 bit value over I2C buss.
Define Documentation
#define DELAY_AMOUNT 10
Definition at line 39 of file i2c.c.
Referenced by i2c_read_eeprom(), i2c_read_eeprom_16bit(), i2c_receive_byte(), i2c_send_ack(),
i2c_send_byte(), i2c_start(), and i2c_stop().
Function Documentation
void i2c_ack_polling (uns8 device_address)
178
Definition at line 41 of file i2c.c.
References i2c_send_byte(), i2c_start(), i2c_stop(), and test_pin.
Here is the call graph for this function:
uns8 i2c_read_eeprom (uns8 device_address, uns8 mem_address)
Read an 8 bit byte from the specified device at the memory address
Definition at line 76 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_receive_byte(), i2c_send_byte(), i2c_start(), i2c_stop(),
i2c_write_sda, set_pin, and uns8.
Referenced by ds1631_get_config(), lm75_get_config(), rtc_get_config(), rtc_get_date(), rtc_get_day(),
rtc_get_dow(), rtc_get_hours(), rtc_get_minutes(), rtc_get_month(), rtc_get_register(), rtc_get_seconds(),
rtc_get_year(), rtc_set_hours(), rtc_set_seconds(), rtc_start_clock(), and rtc_stop_clock().
Here is the call graph for this function:
Here is the caller graph for this function:
180
uns16 i2c_read_eeprom_16bit (uns8 device_address, uns8 mem_address)
Read a 16 bit chunk of data from the given device and memory address
Definition at line 103 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_receive_byte(), i2c_send_byte(), i2c_start(), i2c_stop(),
i2c_write_sda, set_pin, and uns16.
Referenced by ar1000_read_register(), ar1000_seek(), ar1000_seek_more(), ar1000_test(), ar1000_tune(),
ds1631_get_temp(), and lm75_get_temp().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 i2c_receive_byte ()
Clock in a byte over I2C lines. Note that an acknowledge is not sent/received
Definition at line 186 of file i2c.c.
181
References clear_pin, DELAY_AMOUNT, i2c_read_sda, set_pin, test_pin, and uns8.
Referenced by hmc6352_get_data(), hmc6352_read_eeprom(), hmc6352_read_ram(), i2c_read_eeprom(),
i2c_read_eeprom_16bit(), tmp75_read(), and tmp75_read_16bit().
Here is the caller graph for this function:
183
void i2c_send_ack (void)
Sends an I2C acknowledge (bit)
Definition at line 140 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_write_sda, and set_pin.
Referenced by hmc6352_get_data(), hmc6352_read_eeprom(), hmc6352_read_ram(), and tmp75_read_16bit().
Here is the caller graph for this function:
void i2c_send_byte (uns8 data)
Clock out a byte from the I2C buss. An acknowledge is "received" (although ignored).
Definition at line 206 of file i2c.c.
References change_pin, clear_pin, DELAY_AMOUNT, i2c_read_sda, i2c_write_sda, set_pin, and uns8.
Referenced by ds1631_convert_temp(), hmc6352_enter_cal(), hmc6352_exit_cal(), hmc6352_get_data(),
hmc6352_read_eeprom(), hmc6352_read_ram(), hmc6352_save_op_mode(), hmc6352_sleep(),
hmc6352_update_bridge_offsets(), hmc6352_wake(), hmc6352_write_eeprom(), hmc6352_write_ram(),
i2c_ack_polling(), i2c_read_eeprom(), i2c_read_eeprom_16bit(), i2c_write_eeprom(),
i2c_write_eeprom_16bit(), tmp75_read(), tmp75_read_16bit(), and tmp75_write().
Here is the caller graph for this function:
185
void i2c_setup_io ()
Setup ports and pins for i2c output.
Set port and pins correctly for I2C communication
Definition at line 231 of file i2c.c.
References make_input, and make_output.
Referenced by hmc6352_setup_io(), and rtc_setup_io().
Here is the caller graph for this function:
void i2c_start (void)
Signals a start condition on the I2C buss.
Definition at line 155 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_write_sda, and set_pin.
Referenced by ds1631_convert_temp(), hmc6352_enter_cal(), hmc6352_exit_cal(), hmc6352_get_data(),
hmc6352_read_eeprom(), hmc6352_read_ram(), hmc6352_save_op_mode(), hmc6352_sleep(),
hmc6352_update_bridge_offsets(), hmc6352_wake(), hmc6352_write_eeprom(), hmc6352_write_ram(),
i2c_ack_polling(), i2c_read_eeprom(), i2c_read_eeprom_16bit(), i2c_write_eeprom(),
i2c_write_eeprom_16bit(), tmp75_read(), tmp75_read_16bit(), and tmp75_write().
Here is the caller graph for this function:
187
void i2c_stop (void)
Signals a stop condition on the I2C buss.
Definition at line 171 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_write_sda, and set_pin.
Referenced by ds1631_convert_temp(), hmc6352_enter_cal(), hmc6352_exit_cal(), hmc6352_get_data(),
hmc6352_read_eeprom(), hmc6352_read_ram(), hmc6352_save_op_mode(), hmc6352_sleep(),
hmc6352_update_bridge_offsets(), hmc6352_wake(), hmc6352_write_eeprom(), hmc6352_write_ram(),
i2c_ack_polling(), i2c_read_eeprom(), i2c_read_eeprom_16bit(), i2c_write_eeprom(),
i2c_write_eeprom_16bit(), tmp75_read(), tmp75_read_16bit(), and tmp75_write().
Here is the caller graph for this function:
189
void i2c_write_eeprom (uns8 device_address, uns8 mem_address, uns8 data)
Write a byte to a given device address at the memory address
Definition at line 51 of file i2c.c.
References i2c_send_byte(), i2c_start(), and i2c_stop().
Referenced by ds1631_set_config(), lm75_set_config(), rtc_set_config(), rtc_set_date(), rtc_set_day(),
rtc_set_hours(), rtc_set_minutes(), rtc_set_month(), rtc_set_register(), rtc_set_seconds(), rtc_set_year(),
rtc_start_clock(), and rtc_stop_clock().
Here is the call graph for this function:
Here is the caller graph for this function:
190
void i2c_write_eeprom_16bit (uns8 device_address, uns8 mem_address, uns16 data)
Write a byte to a given device address at the memory address
Definition at line 63 of file i2c.c.
References i2c_send_byte(), i2c_start(), and i2c_stop().
Referenced by ar1000_init(), ar1000_seek(), ar1000_test(), ar1000_tune(), and ar1000_write_register().
Here is the call graph for this function:
191
Here is the caller graph for this function:
i2c.h File Reference
I2C software routines. #include "config.h" #include "pic_utils.h" Include dependency graph for i2c.h:
192
This graph shows which files directly or indirectly include this file:
Defines
#define __i2c_h defined
#define i2c_read_sda() set_bit(tris_array[i2c_sda_port - PORTA], i2c_sda_pin);
#define i2c_setup() i2c_setup_io()
#define i2c_write_sda() clear_bit(tris_array[i2c_sda_port - PORTA], i2c_sda_pin);
Functions
uns8 i2c_read_eeprom (uns8 device_address, uns8 mem_address)
Read an 8 bit byte over I2C buss. uns16 i2c_read_eeprom_16bit (uns8 device_address, uns8 mem_address)
Read 16 bits of data over I2C buss. uns8 i2c_receive_byte ()
Receive byte from I2C buss. void i2c_send_ack (void)
Send an ACK. void i2c_send_byte (uns8 data)
Send a byte to I2C buss. void i2c_setup_io ()
Setup ports and pins for I2C communication. void i2c_start (void)
Send start signal to I2C buss. void i2c_stop (void)
Send stop signal to I2C buss. void i2c_write_eeprom (uns8 device_address, uns8 mem_address, uns8 data)
Write an 8 bit byte ove I2C buss. void i2c_write_eeprom_16bit (uns8 device_address, uns8 mem_address,
uns16 data)
Write a 16 bit value over I2C buss.
Detailed Description
I2C communication routines. Although all standard functions are provided, you should only need to use
i2c_setup, i2c_read_eeprom and i2c_write_eeprom
Definition in file i2c.h.
193
Define Documentation
#define __i2c_h defined
Definition at line 45 of file i2c.h.
#define i2c_read_sda() set_bit(tris_array[i2c_sda_port - PORTA], i2c_sda_pin);
Change SDA line to read mode
Definition at line 70 of file i2c.h.
Referenced by i2c_receive_byte(), and i2c_send_byte().
#define i2c_setup() i2c_setup_io()
Definition at line 140 of file i2c.h.
Referenced by ar1000_setup_io(), ds1631_setup(), lm75_setup(), and tmp75_setup().
#define i2c_write_sda() clear_bit(tris_array[i2c_sda_port - PORTA], i2c_sda_pin);
Change SDA line to write mode
Definition at line 68 of file i2c.h.
Referenced by i2c_read_eeprom(), i2c_read_eeprom_16bit(), i2c_send_ack(), i2c_send_byte(), i2c_start(), and
i2c_stop().
Function Documentation
uns8 i2c_read_eeprom (uns8 device_address, uns8 mem_address)
Read an 8 bit byte from the specified device at the memory address
Definition at line 76 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_receive_byte(), i2c_send_byte(), i2c_start(), i2c_stop(),
i2c_write_sda, set_pin, and uns8.
Referenced by ds1631_get_config(), lm75_get_config(), rtc_get_config(), rtc_get_date(), rtc_get_day(),
rtc_get_dow(), rtc_get_hours(), rtc_get_minutes(), rtc_get_month(), rtc_get_register(), rtc_get_seconds(),
rtc_get_year(), rtc_set_hours(), rtc_set_seconds(), rtc_start_clock(), and rtc_stop_clock().
Here is the call graph for this function:
196
uns16 i2c_read_eeprom_16bit (uns8 device_address, uns8 mem_address)
Read a 16 bit chunk of data from the given device and memory address
Definition at line 103 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_receive_byte(), i2c_send_byte(), i2c_start(), i2c_stop(),
i2c_write_sda, set_pin, and uns16.
Referenced by ar1000_read_register(), ar1000_seek(), ar1000_seek_more(), ar1000_test(), ar1000_tune(),
ds1631_get_temp(), and lm75_get_temp().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 i2c_receive_byte ()
Clock in a byte over I2C lines. Note that an acknowledge is not sent/received
Definition at line 186 of file i2c.c.
197
References clear_pin, DELAY_AMOUNT, i2c_read_sda, set_pin, test_pin, and uns8.
Referenced by hmc6352_get_data(), hmc6352_read_eeprom(), hmc6352_read_ram(), i2c_read_eeprom(),
i2c_read_eeprom_16bit(), tmp75_read(), and tmp75_read_16bit().
Here is the caller graph for this function:
199
void i2c_send_ack (void)
Sends an I2C acknowledge (bit)
Definition at line 140 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_write_sda, and set_pin.
Referenced by hmc6352_get_data(), hmc6352_read_eeprom(), hmc6352_read_ram(), and tmp75_read_16bit().
Here is the caller graph for this function:
void i2c_send_byte (uns8 data)
Clock out a byte from the I2C buss. An acknowledge is "received" (although ignored).
Definition at line 206 of file i2c.c.
References change_pin, clear_pin, DELAY_AMOUNT, i2c_read_sda, i2c_write_sda, set_pin, and uns8.
Referenced by ds1631_convert_temp(), hmc6352_enter_cal(), hmc6352_exit_cal(), hmc6352_get_data(),
hmc6352_read_eeprom(), hmc6352_read_ram(), hmc6352_save_op_mode(), hmc6352_sleep(),
hmc6352_update_bridge_offsets(), hmc6352_wake(), hmc6352_write_eeprom(), hmc6352_write_ram(),
i2c_ack_polling(), i2c_read_eeprom(), i2c_read_eeprom_16bit(), i2c_write_eeprom(),
i2c_write_eeprom_16bit(), tmp75_read(), tmp75_read_16bit(), and tmp75_write().
Here is the caller graph for this function:
201
void i2c_setup_io ()
Set port and pins correctly for I2C communication
Definition at line 231 of file i2c.c.
void i2c_start (void)
Signals a start condition on the I2C buss.
Definition at line 155 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_write_sda, and set_pin.
Referenced by ds1631_convert_temp(), hmc6352_enter_cal(), hmc6352_exit_cal(), hmc6352_get_data(),
hmc6352_read_eeprom(), hmc6352_read_ram(), hmc6352_save_op_mode(), hmc6352_sleep(),
hmc6352_update_bridge_offsets(), hmc6352_wake(), hmc6352_write_eeprom(), hmc6352_write_ram(),
i2c_ack_polling(), i2c_read_eeprom(), i2c_read_eeprom_16bit(), i2c_write_eeprom(),
i2c_write_eeprom_16bit(), tmp75_read(), tmp75_read_16bit(), and tmp75_write().
Here is the caller graph for this function:
203
void i2c_stop (void)
Signals a stop condition on the I2C buss.
Definition at line 171 of file i2c.c.
References clear_pin, DELAY_AMOUNT, i2c_write_sda, and set_pin.
Referenced by ds1631_convert_temp(), hmc6352_enter_cal(), hmc6352_exit_cal(), hmc6352_get_data(),
hmc6352_read_eeprom(), hmc6352_read_ram(), hmc6352_save_op_mode(), hmc6352_sleep(),
hmc6352_update_bridge_offsets(), hmc6352_wake(), hmc6352_write_eeprom(), hmc6352_write_ram(),
i2c_ack_polling(), i2c_read_eeprom(), i2c_read_eeprom_16bit(), i2c_write_eeprom(),
i2c_write_eeprom_16bit(), tmp75_read(), tmp75_read_16bit(), and tmp75_write().
Here is the caller graph for this function:
205
void i2c_write_eeprom (uns8 device_address, uns8 mem_address, uns8 data)
Write a byte to a given device address at the memory address
Definition at line 51 of file i2c.c.
References i2c_send_byte(), i2c_start(), and i2c_stop().
Referenced by ds1631_set_config(), lm75_set_config(), rtc_set_config(), rtc_set_date(), rtc_set_day(),
rtc_set_hours(), rtc_set_minutes(), rtc_set_month(), rtc_set_register(), rtc_set_seconds(), rtc_set_year(),
rtc_start_clock(), and rtc_stop_clock().
Here is the call graph for this function:
Here is the caller graph for this function:
206
void i2c_write_eeprom_16bit (uns8 device_address, uns8 mem_address, uns16 data)
Write a byte to a given device address at the memory address
Definition at line 63 of file i2c.c.
References i2c_send_byte(), i2c_start(), and i2c_stop().
Referenced by ar1000_init(), ar1000_seek(), ar1000_test(), ar1000_tune(), and ar1000_write_register().
Here is the call graph for this function:
207
Here is the caller graph for this function:
i2c_hw.c File Reference #include "spi_hw.h" #include "pic_serial.h" Include dependency graph for i2c_hw.c:
208
Functions
void spi_hw_init ()
uns8 spi_hw_receive ()
void spi_hw_setup_io ()
void spi_hw_transmit (uns8 data)
Function Documentation
void spi_hw_init ()
Definition at line 82 of file i2c_hw.c.
uns8 spi_hw_receive ()
Definition at line 106 of file i2c_hw.c.
Referenced by mrf24j40_long_addr_read(), and mrf24j40_short_addr_read().
Here is the caller graph for this function:
209
void spi_hw_setup_io ()
Definition at line 40 of file i2c_hw.c.
void spi_hw_transmit (uns8 data)
Definition at line 91 of file i2c_hw.c.
Referenced by mrf24j40_long_addr_read(), mrf24j40_long_addr_write(), mrf24j40_short_addr_read(),
mrf24j40_short_addr_write(), and spi_hw_receive().
Here is the caller graph for this function:
210
i2c_hw.h File Reference
Outputs i2c interfaces (clock+data). #include "pic_utils.h" #include "config.h" Include dependency graph for i2c_hw.h:
211
Functions
void i2c_pulse_0 ()
i2c test routine void i2c_pulse_1 ()
i2c test routine void i2c_setup_io ()
Setup ports and pins for i2c output. void i2c_write (uns8 data)
Send a byte of data using software i2c. void i2c_write_lsb (uns8 data)
Send a byte of data using software i2c.
Detailed Description
Covers standard i2c-like interfaces (clock + data) and Sure Electronics displays which are a little different
Definition in file i2c_hw.h.
Function Documentation
void i2c_pulse_0 ()
void i2c_pulse_1 ()
void i2c_setup_io ()
Setup ports and pins for i2c output
Setup ports and pins for i2c output.
Set port and pins correctly for I2C communication
Definition at line 231 of file i2c.c.
References make_input, and make_output.
Referenced by hmc6352_setup_io(), and rtc_setup_io().
Here is the caller graph for this function:
void i2c_write (uns8 data)
Sends a byte of data MSB first, data only changes on clock low
void i2c_write_lsb (uns8 data)
Sends a byte of data LSB first, data only changes on clock low
212
its_common.c File Reference #include "its_common.h" #include "mrf24j40.h" #include "pic_serial.h" #include "wpan.h" #include "debug.h" Include dependency graph for its_common.c:
Functions
its_device_handle its_add_local_device (uns16 device_id, uns16 pan_id, uns16 short_address)
its_device_handle its_add_net_device (uns16 device_id, uns16 previous_hop)
its_device_handle its_get_device_handle (uns16 device_id)
uns16 its_get_device_id ()
its_device_info * its_get_device_info (uns8 handle)
uns16 its_get_network_id ()
Retrieve the current network ID. uns8 its_get_next_sequence ()
void its_init ()
Initialise ITS and lower layers. void its_print_devices ()
Print devices currently known to this one. void its_set_device_id (uns16 device_id)
Set the ITS device ID. void its_set_network_id (uns16 network_id)
Set the ITS network ID. void its_transmit_to_ea (uns8 *dest_ea, uns16 dest_its_device_id, uns8 packet_type,
uns8 *data, uns8 data_length)
void its_transmit_to_handle (its_device_handle handle, uns8 packet_type, uns8 *data, uns8 data_length)
void its_transmit_to_sa (uns16 dest_pan_id, uns16 dest_sa, uns16 dest_device_id, uns8 packet_type, uns8
*data, uns8 data_length)
Variables
uns16 its_device_id
its_device_info its_devices [ITS_MAX_KNOWN_DEVICES]
213
uns16 its_network_id
uns8 its_sequence = 0
Function Documentation
its_device_handle its_add_local_device (uns16 device_id, uns16 pan_id, uns16 short_address)
Definition at line 127 of file its_common.c.
References its_device_info::addr, debug_int_hex_16bit, debug_str, its_device_info::its_device_id,
its_device_id, ITS_DEVICE_NONE, its_print_devices(), its_address::local, local_address::pan_id,
local_address::short_address, and uns8.
Referenced by its2_router_handle_association().
Here is the call graph for this function:
Here is the caller graph for this function:
its_device_handle its_add_net_device (uns16 device_id, uns16 previous_hop)
Definition at line 158 of file its_common.c.
References its_device_info::addr, debug_int_hex_16bit, debug_str, its_device_info::its_device_id,
its_device_id, ITS_DEVICE_NONE, its_print_devices(), remote_address::prior_device_id, its_address::remote,
remote_address::remote_indicator, and uns8.
Here is the call graph for this function:
its_device_handle its_get_device_handle (uns16 device_id)
Definition at line 108 of file its_common.c.
References its_device_id, ITS_DEVICE_NONE, and uns8.
Referenced by its2_forward_routed_packet(), and its2_router_handle_association().
Here is the caller graph for this function:
214
uns16 its_get_device_id ()
Definition at line 89 of file its_common.c.
References its_device_id.
Referenced by its2_process_tx_queue(), its2_rebroadcast_net_discover_req(), and its2_router_queue_packet().
Here is the caller graph for this function:
its_device_info* its_get_device_info (uns8 handle)
Definition at line 100 of file its_common.c.
Referenced by its2_forward_routed_packet(), and its2_transmit().
Here is the caller graph for this function:
uns16 its_get_network_id ()
Definition at line 81 of file its_common.c.
References its_network_id.
Referenced by its2_router_queue_packet().
Here is the caller graph for this function:
uns8 its_get_next_sequence ()
215
Definition at line 72 of file its_common.c.
References its_sequence.
Referenced by its2_router_queue_packet().
Here is the caller graph for this function:
void its_init ()
Call before using any ITS functionality
Definition at line 93 of file its_common.c.
References its_device_info::its_device_id, uns8, and wpan_init().
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void its_print_devices ()
Definition at line 51 of file its_common.c.
216
References debug_int_hex_16bit, debug_nl, debug_str, its_device_id, and uns8.
Referenced by its_add_local_device(), and its_add_net_device().
Here is the caller graph for this function:
void its_set_device_id (uns16 device_id)
Set the ITS device ID before sending packets. See also: its_set_network_id(uns16 network_id);
Definition at line 85 of file its_common.c.
References its_device_id.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
Here is the caller graph for this function:
void its_set_network_id (uns16 network_id)
Set the ITS network ID before sending packets See also: its_set_device_id(uns16 device_id);
Definition at line 76 of file its_common.c.
References its_network_id.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
Here is the caller graph for this function:
217
void its_transmit_to_ea (uns8 * dest_ea, uns16 dest_its_device_id, uns8 packet_type, uns8 * data, uns8 data_length)
Definition at line 232 of file its_common.c.
References FRAME_TYPE_DATA, its_device_id, its_network_id, its_sequence,
mrf24j40_transmit_to_extended_address(), MRF_NO_ACK, and uns8.
Referenced by its1_device_process().
Here is the call graph for this function:
Here is the caller graph for this function:
void its_transmit_to_handle (its_device_handle handle, uns8 packet_type, uns8 * data, uns8 data_length)
Definition at line 185 of file its_common.c.
References its_device_info::addr, its_device_info::its_device_id, its_transmit_to_sa(), its_address::local, and
local_address::short_address.
Referenced by its1_controller_handle_association(), its1_controller_transmit(), its1_device_transmit(),
its2_device_transmit(), and its2_router_handle_association().
Here is the call graph for this function:
218
Here is the caller graph for this function:
void its_transmit_to_sa (uns16 dest_pan_id, uns16 dest_sa, uns16 dest_device_id, uns8 packet_type, uns8 * data, uns8 data_length)
Definition at line 195 of file its_common.c.
References FRAME_TYPE_DATA, its_device_id, its_network_id, its_sequence,
mrf24j40_transmit_to_short_address(), MRF_ACK, uns16, and uns8.
Referenced by its2_device_process(), and its_transmit_to_handle().
Here is the call graph for this function:
Here is the caller graph for this function:
219
Variable Documentation
uns16 its_device_id
Definition at line 47 of file its_common.c.
Referenced by its_add_local_device(), its_add_net_device(), its_get_device_handle(), its_get_device_id(),
its_print_devices(), its_set_device_id(), its_transmit_to_ea(), and its_transmit_to_sa().
its_device_info its_devices[ITS_MAX_KNOWN_DEVICES]
Definition at line 44 of file its_common.c.
uns16 its_network_id
Definition at line 46 of file its_common.c.
Referenced by its_get_network_id(), its_set_network_id(), its_transmit_to_ea(), and its_transmit_to_sa().
uns8 its_sequence = 0
Definition at line 49 of file its_common.c.
Referenced by its_get_next_sequence(), its_transmit_to_ea(), and its_transmit_to_sa().
its_common.h File Reference #include "pic_utils.h" Include dependency graph for its_common.h:
220
This graph shows which files directly or indirectly include this file:
Data Structures
union its_address
struct its_device_info
struct local_address
struct remote_address
Defines
#define ITS_ACK 0x03
#define ITS_APP_DATA 0x02
#define ITS_ASSOC_REQ 0x00
#define ITS_ASSOC_RES 0x01
#define ITS_DEVICE_NONE 0xff
#define ITS_ENDPOINT_DATA 0x0c
#define ITS_ENDPOINT_REQ 0x0a
#define ITS_ENDPOINT_RES 0x0b
#define ITS_GENERIC_DATA 0x09
#define ITS_LOCAL_DISCOVER_REQ 0x05
#define ITS_LOCAL_DISCOVER_RES 0x06
#define ITS_NET_DISCOVER_REQ 0x07
#define ITS_NET_DISCOVER_RES 0x08
#define ITS_PENDING_DATA_REQ 0x04
#define ITS_ROUTE_FAILURE 0x0d
Typedefs
typedef uns8 its_device_handle
221
Functions
its_device_handle its_add_local_device (uns16 device_id, uns16 pan_id, uns16 short_address)
its_device_handle its_add_net_device (uns16 device_id, uns16 previous_hop)
its_device_handle its_get_device_handle (uns16 device_id)
uns16 its_get_device_id ()
its_device_info * its_get_device_info (uns8 handle)
uns16 its_get_network_id ()
Retrieve the current network ID. uns8 its_get_next_sequence ()
void its_init ()
Initialise ITS and lower layers. void its_print_devices ()
Print devices currently known to this one. void its_set_device_id (uns16 device_id)
Set the ITS device ID. void its_set_network_id (uns16 network_id)
Set the ITS network ID. void its_transmit_to_ea (uns8 *dest_ea, uns16 dest_its_device_id, uns8 packet_type,
uns8 *data, uns8 data_length)
void its_transmit_to_handle (its_device_handle handle, uns8 packet_type, uns8 *data, uns8 data_length)
void its_transmit_to_sa (uns16 dest_pan_id, uns16 dest_sa, uns16 dest_device_id, uns8 packet_type, uns8
*data, uns8 data_length)
Define Documentation
#define ITS_ACK 0x03
Definition at line 62 of file its_common.h.
#define ITS_APP_DATA 0x02
Definition at line 61 of file its_common.h.
#define ITS_ASSOC_REQ 0x00
Definition at line 59 of file its_common.h.
Referenced by its1_device_process(), and its2_device_process().
#define ITS_ASSOC_RES 0x01
Definition at line 60 of file its_common.h.
Referenced by its1_controller_handle_association(), its2_router_handle_association(), and
wpan_data_received_callback().
#define ITS_DEVICE_NONE 0xff
Definition at line 107 of file its_common.h.
Referenced by its1_controller_handle_association(), its2_forward_routed_packet(),
its2_rebroadcast_net_discover_req(), its2_router_handle_association(), its2_transmit(), its_add_local_device(),
its_add_net_device(), its_get_device_handle(), and wpan_data_received_callback().
222
#define ITS_ENDPOINT_DATA 0x0c
Definition at line 74 of file its_common.h.
#define ITS_ENDPOINT_REQ 0x0a
Definition at line 69 of file its_common.h.
#define ITS_ENDPOINT_RES 0x0b
Definition at line 72 of file its_common.h.
#define ITS_GENERIC_DATA 0x09
Definition at line 68 of file its_common.h.
Referenced by its1_controller_transmit(), its1_device_transmit(), its2_device_transmit(), and
wpan_data_received_callback().
#define ITS_LOCAL_DISCOVER_REQ 0x05
Definition at line 64 of file its_common.h.
Referenced by its2_request_local_addr(), and its2_router_queue_packet().
#define ITS_LOCAL_DISCOVER_RES 0x06
Definition at line 65 of file its_common.h.
Referenced by its2_respond_local_addr().
#define ITS_NET_DISCOVER_REQ 0x07
Definition at line 66 of file its_common.h.
Referenced by its2_request_net_addr(), and its2_router_queue_packet().
#define ITS_NET_DISCOVER_RES 0x08
Definition at line 67 of file its_common.h.
Referenced by its2_respond_net_addr().
#define ITS_PENDING_DATA_REQ 0x04
Definition at line 63 of file its_common.h.
#define ITS_ROUTE_FAILURE 0x0d
223
Definition at line 77 of file its_common.h.
Typedef Documentation
typedef uns8 its_device_handle
Definition of its_device_handle
Definition at line 105 of file its_common.h.
Function Documentation
its_device_handle its_add_local_device (uns16 device_id, uns16 pan_id, uns16 short_address)
Definition at line 127 of file its_common.c.
References its_device_info::addr, debug_int_hex_16bit, debug_str, its_device_info::its_device_id,
its_device_id, ITS_DEVICE_NONE, its_print_devices(), its_address::local, local_address::pan_id,
local_address::short_address, and uns8.
Referenced by its2_router_handle_association().
Here is the call graph for this function:
Here is the caller graph for this function:
its_device_handle its_add_net_device (uns16 device_id, uns16 previous_hop)
Definition at line 158 of file its_common.c.
References its_device_info::addr, debug_int_hex_16bit, debug_str, its_device_info::its_device_id,
its_device_id, ITS_DEVICE_NONE, its_print_devices(), remote_address::prior_device_id, its_address::remote,
remote_address::remote_indicator, and uns8.
Here is the call graph for this function:
its_device_handle its_get_device_handle (uns16 device_id)
Definition at line 108 of file its_common.c.
References its_device_id, ITS_DEVICE_NONE, and uns8.
Referenced by its2_forward_routed_packet(), and its2_router_handle_association().
224
Here is the caller graph for this function:
uns16 its_get_device_id ()
Definition at line 89 of file its_common.c.
References its_device_id.
Referenced by its2_process_tx_queue(), its2_rebroadcast_net_discover_req(), and its2_router_queue_packet().
Here is the caller graph for this function:
its_device_info* its_get_device_info (uns8 handle)
Definition at line 100 of file its_common.c.
Referenced by its2_forward_routed_packet(), and its2_transmit().
Here is the caller graph for this function:
uns16 its_get_network_id ()
Definition at line 81 of file its_common.c.
References its_network_id.
Referenced by its2_router_queue_packet().
Here is the caller graph for this function:
225
uns8 its_get_next_sequence ()
Definition at line 72 of file its_common.c.
References its_sequence.
Referenced by its2_router_queue_packet().
Here is the caller graph for this function:
void its_init ()
Call before using any ITS functionality
Definition at line 93 of file its_common.c.
References its_device_info::its_device_id, uns8, and wpan_init().
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
Here is the call graph for this function:
Here is the caller graph for this function:
226
void its_print_devices ()
Definition at line 51 of file its_common.c.
References debug_int_hex_16bit, debug_nl, debug_str, its_device_id, and uns8.
Referenced by its_add_local_device(), and its_add_net_device().
Here is the caller graph for this function:
void its_set_device_id (uns16 device_id)
Set the ITS device ID before sending packets. See also: its_set_network_id(uns16 network_id);
Definition at line 85 of file its_common.c.
References its_device_id.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
Here is the caller graph for this function:
227
void its_set_network_id (uns16 network_id)
Set the ITS network ID before sending packets See also: its_set_device_id(uns16 device_id);
Definition at line 76 of file its_common.c.
References its_network_id.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
Here is the caller graph for this function:
void its_transmit_to_ea (uns8 * dest_ea, uns16 dest_its_device_id, uns8 packet_type, uns8 * data, uns8 data_length)
Definition at line 232 of file its_common.c.
References FRAME_TYPE_DATA, its_device_id, its_network_id, its_sequence,
mrf24j40_transmit_to_extended_address(), MRF_NO_ACK, and uns8.
Referenced by its1_device_process().
Here is the call graph for this function:
Here is the caller graph for this function:
void its_transmit_to_handle (its_device_handle handle, uns8 packet_type, uns8 * data, uns8 data_length)
Definition at line 185 of file its_common.c.
References its_device_info::addr, its_device_info::its_device_id, its_transmit_to_sa(), its_address::local, and
local_address::short_address.
228
Referenced by its1_controller_handle_association(), its1_controller_transmit(), its1_device_transmit(),
its2_device_transmit(), and its2_router_handle_association().
Here is the call graph for this function:
Here is the caller graph for this function:
void its_transmit_to_sa (uns16 dest_pan_id, uns16 dest_sa, uns16 dest_device_id, uns8 packet_type, uns8 * data, uns8 data_length)
Definition at line 195 of file its_common.c.
References FRAME_TYPE_DATA, its_device_id, its_network_id, its_sequence,
mrf24j40_transmit_to_short_address(), MRF_ACK, uns16, and uns8.
Referenced by its2_device_process(), and its_transmit_to_handle().
Here is the call graph for this function:
Here is the caller graph for this function:
229
its_mode1.c File Reference #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" Include dependency graph for its_mode1.c:
230
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
Function Documentation
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().
Here is the call graph for this function:
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().
Here is the call graph for this function:
231
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().
Here is the call graph for this function:
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().
Here is the call graph for this function:
232
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.
Here is the call graph for this function:
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().
Here is the call graph for this function:
233
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.
Here is the call graph for this function:
void its1_setup_io ()
Definition at line 57 of file its_mode1.c.
References wpan_setup_io().
Here is the call graph for this function:
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().
Here is the call graph for this function:
Here is the caller graph for this function:
234
Variable Documentation
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().
its_mode1.h File Reference
ITS networking mode 1. #include "pic_utils.h" Include dependency graph for its_mode1.h:
235
This graph shows which files directly or indirectly include this file:
Typedefs
typedef enum _its1_result its1_result
typedef enum _its1_state its1_state
Enumerations
enum _its1_result { RESULT_SUCCESSFUL, RESULT_FAILED }
enum _its1_state { STATE_STARTUP, STATE_RUNNING, STATE_SEARCHING, STATE_ASSOCIATED,
STATE_UNASSOCIATED }
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 ()
void its1_device_receive_callback (uns8 *data, uns8 data_length)
its1_result its1_device_transmit (uns8 *data, uns8 data_length)
its1_result its1_find_controller ()
void its1_setup_io ()
Variables
its1_state state
236
Detailed Description
Definition in file its_mode1.h.
Typedef Documentation
typedef enum _its1_result its1_result
Definition at line 59 of file its_mode1.h.
typedef enum _its1_state its1_state
Definition at line 63 of file its_mode1.h.
Enumeration Type Documentation
enum _its1_result
Enumerator:
RESULT_SUCCESSFUL
RESULT_FAILED
Definition at line 58 of file its_mode1.h.
enum _its1_state
Enumerator:
STATE_STARTUP
STATE_RUNNING
STATE_SEARCHING
STATE_ASSOCIATED
STATE_UNASSOCIATED
Definition at line 61 of file its_mode1.h.
Function Documentation
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().
237
Here is the call graph for this function:
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().
Here is the call graph for this function:
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().
Here is the call graph for this function:
238
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().
Here is the call graph for this function:
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.
Here is the call graph for this function:
239
void its1_device_receive_callback (uns8 * data, uns8 data_length)
Referenced by wpan_data_received_callback().
Here is the caller graph for this function:
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().
Here is the call graph for this function:
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.
Here is the call graph for this function:
void its1_setup_io ()
240
Definition at line 57 of file its_mode1.c.
References wpan_setup_io().
Here is the call graph for this function:
Variable Documentation
its1_state state
Definition at line 47 of file its_mode1.c.
its_mode2.c File Reference #include "its_mode2.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" #include "memory.h" #include "debug.h" Include dependency graph for its_mode2.c:
Functions
void its2_delete_item_from_queue (queued_item *item)
its2_result its2_device_init (uns16 my_device_id, uns16 network_id)
void its2_device_process ()
241
its2_result its2_device_transmit (uns8 *data, uns8 data_length)
its2_result its2_find_controller ()
uns8 its2_find_free_queue_slot ()
its2_result its2_forward_routed_packet (its2_packet *pkt, uns8 *data, uns8 data_length)
void its2_print_packet (its2_packet *pkt)
void its2_print_queue ()
void its2_process_tx_queue ()
void its2_rebroadcast_net_addr_req ()
its2_result its2_rebroadcast_net_discover_req (its2_packet *pkt)
void its2_request_local_addr (uns16 device_id)
void its2_request_net_addr (uns16 device_id)
void its2_respond_local_addr (uns16 device_id)
void its2_respond_net_addr (uns16 device_id)
its2_result its2_router_handle_association (uns16 pan_id, uns16 its_device_id)
uns8 its2_router_init (uns16 my_device_id, uns16 network_id)
void its2_router_process (queued_item *item)
void its2_router_process ()
its2_result its2_router_queue_packet (uns16 device_id, uns8 packet_type, uns8 *data, uns8 data_length, uns8
ack)
void its2_setup_io ()
void its2_transmit (queued_item *item)
void turn_off_mrf_interrupts ()
void turn_on_mrf_interrupts ()
void wpan_data_received_callback (wpan_address *addr, uns8 *data, uns8 data_size)
void wpan_data_transmitted_callback (uns8 status, uns8 retries, uns8 channel_busy)
Callback for data transmitted. Variables
uns8 channel
uns8 controller_handle
bit debug_module = 0
uns8 its2_seen_index
static seen_packet its2_seen_list [ITS2_SEEN_LIST_SIZE]
bit its2_transmitting = 0
static queued_item its2_tx_queue [ITS2_TX_QUEUE_SIZE]
bit queue_processing = 0
its2_state state = STATE_STARTUP
uns16 state_timeout
uns16 tick_marker
Function Documentation
void its2_delete_item_from_queue (queued_item * item)
Definition at line 1025 of file its_mode2.c.
References queued_item::data, queued_item::data_length, queued_item::flag, and ITS2_FLAG_DELETED.
Referenced by its2_process_tx_queue().
Here is the caller graph for this function:
242
its2_result its2_device_init (uns16 my_device_id, uns16 network_id)
Definition at line 1136 of file its_mode2.c.
References debug_str, its_init(), its_set_device_id(), its_set_network_id(), mrf24j40_set_pan_id(),
mrf24j40_set_short_address(), state, STATE_UNASSOCIATED, and wpan_init().
Here is the call graph for this function:
void its2_device_process ()
Definition at line 1163 of file its_mode2.c.
References channel, debug_nl, debug_str, debug_var, ITS_ASSOC_REQ, its_transmit_to_sa(),
mrf24j40_set_channel(), MRF_FIRST_CHANNEL, MRF_LAST_CHANNEL, state, STATE_SEARCHING,
STATE_UNASSOCIATED, tick_calc_diff(), tick_get_count(), tick_marker, and uns16.
Here is the call graph for this function:
its2_result its2_device_transmit (uns8 * data, uns8 data_length)
Definition at line 1199 of file its_mode2.c.
References controller_handle, ITS_GENERIC_DATA, and its_transmit_to_handle().
Here is the call graph for this function:
243
its2_result its2_find_controller ()
Definition at line 1157 of file its_mode2.c.
References channel, state, STATE_SEARCHING, tick_get_count(), and tick_marker.
Here is the call graph for this function:
uns8 its2_find_free_queue_slot ()
Definition at line 99 of file its_mode2.c.
References ITS2_FLAG_DELETED, and uns8.
Referenced by its2_forward_routed_packet(), and its2_rebroadcast_net_discover_req().
Here is the caller graph for this function:
its2_result its2_forward_routed_packet (its2_packet * pkt, uns8 * data, uns8 data_length)
Definition at line 653 of file its_mode2.c.
References its_device_info::addr, queued_item::data, queued_item::data_length, debug_int,
debug_int_hex_16bit, debug_spc, debug_str, debug_var, queued_item::dest_device_handle,
queued_item::dest_its_device_id, queued_item::flag, its2_packet::hop_count, ITEM_QUEUED,
its2_find_free_queue_slot(), ITS2_FLAG_DELETED, ITS2_FLAG_NO_ACK,
ITS2_NO_AVAILABLE_SLOTS, its2_print_packet(), its2_packet::its_dest_id, ITS_DEVICE_NONE,
its_get_device_handle(), its_get_device_info(), NEXT_HOP_NOT_LOCAL, its2_packet::num_routes,
queued_item::packet, QS_READY_TO_SEND, QS_WAITING_ON_LOCAL_ADDR, QUEUE_FULL,
its_address::remote, remote_address::remote_indicator, its2_packet::routers, queued_item::sent_count,
queued_item::status, and uns8.
Here is the call graph for this function:
244
void its2_print_packet (its2_packet * pkt)
Definition at line 580 of file its_mode2.c.
References debug_int, debug_int_hex_16bit, debug_putc, debug_str, its2_packet::hop_count,
its2_packet::its_dest_id, its2_packet::its_network_id, its2_packet::its_source_id, its2_packet::max_hop_count,
its2_packet::num_routes, its2_packet::packet_type, its2_packet::routers, its2_packet::sequence, and uns8.
Referenced by its2_forward_routed_packet(), and its2_transmit().
Here is the caller graph for this function:
void its2_print_queue ()
Definition at line 1106 of file its_mode2.c.
References debug_nl, debug_var, queued_item::flag, ITS2_FLAG_DELETED, its2_packet::its_dest_id,
its2_packet::its_source_id, queued_item::packet, queued_item::sent_count, queued_item::status,
tick_get_count(), queued_item::tick_sent, and uns8.
Here is the call graph for this function:
void its2_process_tx_queue ()
Definition at line 904 of file its_mode2.c.
References debug_int, debug_int_hex_16bit, debug_str, queued_item::dest_its_device_id, queued_item::flag,
its2_delete_item_from_queue(), ITS2_FLAG_DELETED, its2_request_local_addr(), its2_request_net_addr(),
its2_transmit(), its2_transmit_status_callback(), its2_transmitting,
ITS2_TX_STATUS_NEXT_HOP_UNKNOWN, ITS2_TX_STATUS_NO_ACK,
ITS2_TX_STATUS_NO_ROUTE, ITS2_TX_STATUS_SUCCESS, its_get_device_id(),
its2_packet::its_source_id, queued_item::packet, QS_ACK_RECEIVED, QS_READY_TO_SEND,
245
QS_ROUTING_FAILED, QS_SENT, QS_WAITING_ON_ACK, QS_WAITING_ON_LOCAL_ADDR,
QS_WAITING_ON_NETWORK_ADDR, queued_item::sent_count, queued_item::status, tick_calc_diff(),
tick_get_count(), queued_item::tick_sent, uns16, and uns8.
Referenced by its2_router_process().
Here is the call graph for this function:
Here is the caller graph for this function:
void its2_rebroadcast_net_addr_req ()
Definition at line 800 of file its_mode2.c.
its2_result its2_rebroadcast_net_discover_req (its2_packet * pkt)
Definition at line 613 of file its_mode2.c.
References queued_item::data, queued_item::data_length, debug_str, debug_var,
queued_item::dest_device_handle, queued_item::dest_its_device_id, queued_item::flag,
its2_packet::hop_count, ITEM_QUEUED, its2_find_free_queue_slot(), ITS2_FLAG_NO_ACK,
ITS2_NO_AVAILABLE_SLOTS, ITS_DEVICE_NONE, its_get_device_id(), its2_packet::its_source_id,
its2_packet::max_hop_count, its2_packet::num_routes, queued_item::packet, QS_READY_TO_SEND,
QUEUE_FULL, its2_packet::routers, ROUTING_TOO_MANY_HOPS, queued_item::sent_count,
its2_packet::sequence, queued_item::status, and uns8.
Here is the call graph for this function:
246
void its2_request_local_addr (uns16 device_id)
Definition at line 779 of file its_mode2.c.
References ITS2_FLAG_NO_ACK, its2_router_queue_packet(), and ITS_LOCAL_DISCOVER_REQ.
Referenced by its2_process_tx_queue().
Here is the call graph for this function:
Here is the caller graph for this function:
void its2_request_net_addr (uns16 device_id)
Definition at line 792 of file its_mode2.c.
References ITS2_FLAG_NO_ACK, its2_router_queue_packet(), and ITS_NET_DISCOVER_REQ.
Referenced by its2_process_tx_queue().
Here is the call graph for this function:
247
Here is the caller graph for this function:
void its2_respond_local_addr (uns16 device_id)
Definition at line 783 of file its_mode2.c.
References debug_module, debug_str, ITS2_FLAG_NO_ACK, its2_router_queue_packet(), and
ITS_LOCAL_DISCOVER_RES.
Here is the call graph for this function:
void its2_respond_net_addr (uns16 device_id)
Definition at line 796 of file its_mode2.c.
References ITS2_FLAG_NO_ACK, its2_router_queue_packet(), and ITS_NET_DISCOVER_RES.
Here is the call graph for this function:
248
its2_result its2_router_handle_association (uns16 pan_id, uns16 its_device_id)
Definition at line 118 of file its_mode2.c.
References debug_str, its_add_local_device(), ITS_ASSOC_RES, ITS_DEVICE_NONE,
its_get_device_handle(), its_transmit_to_handle(), RESULT_FAILED, and RESULT_SUCCESSFUL.
Here is the call graph for this function:
uns8 its2_router_init (uns16 my_device_id, uns16 network_id)
Definition at line 743 of file its_mode2.c.
References debug_nl, debug_str, debug_var, queued_item::flag, ITS2_FLAG_DELETED, its2_seen_index,
its_init(), its_set_device_id(), its_set_network_id(), seen_packet::its_source_id, mrf24j40_set_channel(),
mrf24j40_set_pan_id(), mrf24j40_set_short_address(), and uns8.
Here is the call graph for this function:
249
void its2_router_process (queued_item * item)
Definition at line 1102 of file its_mode2.c.
void its2_router_process ()
Definition at line 808 of file its_mode2.c.
References its2_process_tx_queue(), state_timeout, tick_calc_diff(), tick_get_count(), tick_marker,
turn_off_mrf_interrupts(), turn_on_mrf_interrupts(), and uns16.
Here is the call graph for this function:
its2_result its2_router_queue_packet (uns16 device_id, uns8 packet_type, uns8 * data, uns8 data_length, uns8 ack)
Definition at line 823 of file its_mode2.c.
References queued_item::data, queued_item::data_length, debug_str, debug_var,
queued_item::dest_its_device_id, queued_item::flag, its2_packet::hop_count, ITEM_QUEUED,
ITS2_FLAG_DELETED, ITS2_UPDATE_ROUTE_FAIL, its2_packet::its_dest_id, its_get_device_id(),
its_get_network_id(), its_get_next_sequence(), ITS_LOCAL_DISCOVER_REQ,
ITS_NET_DISCOVER_REQ, its2_packet::its_network_id, its2_packet::its_source_id,
its2_packet::max_hop_count, queued_item::packet, its2_packet::packet_type, QUEUE_FULL,
ROUTING_TOO_MANY_HOPS, queued_item::sent_count, its2_packet::sequence, turn_off_mrf_interrupts(),
turn_on_mrf_interrupts(), and uns8.
Referenced by its2_request_local_addr(), its2_request_net_addr(), its2_respond_local_addr(), and
its2_respond_net_addr().
Here is the call graph for this function:
250
Here is the caller graph for this function:
void its2_setup_io ()
Definition at line 95 of file its_mode2.c.
References wpan_setup_io().
Here is the call graph for this function:
void its2_transmit (queued_item * item)
Definition at line 1035 of file its_mode2.c.
References its_device_info::addr, queued_item::data, queued_item::data_length, debug_int,
debug_int_hex_16bit, debug_putc, debug_str, debug_var, queued_item::dest_device_handle,
queued_item::dest_its_device_id, queued_item::flag, FRAME_TYPE_DATA, ITS2_FLAG_ACK,
its2_print_packet(), its2_transmitting, ITS_DEVICE_NONE, its_get_device_info(), its_address::local,
mrf24j40_transmit_to_short_address(), MRF_ACK, MRF_NO_ACK, its2_packet::num_routes,
queued_item::packet, local_address::pan_id, QS_SENT, QS_WAITING_ON_ACK, its2_packet::routers,
queued_item::sent_count, local_address::short_address, queued_item::status, tick_get_count(),
queued_item::tick_sent, and uns8.
251
Referenced by its2_process_tx_queue().
Here is the call graph for this function:
Here is the caller graph for this function:
void turn_off_mrf_interrupts ()
!clear_bit(intcon, INT0IE);
Definition at line 82 of file its_mode2.c.
Referenced by its2_router_process(), and its2_router_queue_packet().
Here is the caller graph for this function:
void turn_on_mrf_interrupts ()
!set_bit(intcon, INT0IE);
Definition at line 90 of file its_mode2.c.
Referenced by its2_router_process(), and its2_router_queue_packet().
Here is the caller graph for this function:
252
void wpan_data_received_callback (wpan_address * addr, uns8 * data, uns8 data_size)
Definition at line 508 of file its_mode2.c.
References controller_handle, debug_int_hex, debug_nl, debug_putc, debug_str,
its2_device_receive_callback(), ITS_ASSOC_RES, ITS_DEVICE_NONE, ITS_GENERIC_DATA,
wpan_address::source_pan_id, state, STATE_ASSOCIATED, STATE_SEARCHING,
STATE_UNASSOCIATED, uns16, uns8, and wpan_print_address().
Here is the call graph for this function:
void wpan_data_transmitted_callback (uns8 status, uns8 retries, uns8 channel_busy)
Once the lower layers have attempted to transmit the packet, the results will be presented to the
callback.
Parameters:
status Set to 0 for success or 1 for failure
retries Set to the number of retries
channel_busy Set to 1 if failure was due to the channel being busy.
Definition at line 804 of file its_mode2.c.
References its2_transmitting.
Referenced by mrf24j40_transmit_callback().
Here is the caller graph for this function:
Variable Documentation
uns8 channel
Definition at line 71 of file its_mode2.c.
253
uns8 controller_handle
Definition at line 67 of file its_mode2.c.
bit debug_module = 0
Definition at line 64 of file its_mode2.c.
Referenced by its2_respond_local_addr().
uns8 its2_seen_index
Definition at line 73 of file its_mode2.c.
Referenced by its2_router_init().
seen_packet its2_seen_list[ITS2_SEEN_LIST_SIZE] [static]
Definition at line 75 of file its_mode2.c.
bit its2_transmitting = 0
Definition at line 72 of file its_mode2.c.
Referenced by its2_process_tx_queue(), its2_transmit(), and wpan_data_transmitted_callback().
queued_item its2_tx_queue[ITS2_TX_QUEUE_SIZE] [static]
Definition at line 76 of file its_mode2.c.
bit queue_processing = 0
Definition at line 65 of file its_mode2.c.
its2_state state = STATE_STARTUP
Definition at line 62 of file its_mode2.c.
uns16 state_timeout
Definition at line 69 of file its_mode2.c.
Referenced by its2_router_process().
uns16 tick_marker
Definition at line 68 of file its_mode2.c.
254
its_mode2.h File Reference
ITS Mesh networking mode 2. #include "pic_utils.h" Include dependency graph for its_mode2.h:
This graph shows which files directly or indirectly include this file:
Data Structures
struct its2_packet
struct queued_item
struct seen_packet
Defines
#define ITS2_FLAG_ACK 0x01
#define ITS2_FLAG_DELETED 0xff
#define ITS2_FLAG_NO_ACK 0x02
#define ITS2_NO_AVAILABLE_SLOTS 0xff
#define ITS2_STATUS_QUEUED 0x00
#define ITS2_STATUS_TX_QUEUE_FULL 0x01
#define ITS2_TX_STATUS_NEXT_HOP_UNKNOWN 0x04
#define ITS2_TX_STATUS_NO_ACK 0x02
#define ITS2_TX_STATUS_NO_ROUTE 0x01
#define ITS2_TX_STATUS_REMOTE_NO_ACK 0x03
#define ITS2_TX_STATUS_SUCCESS 0x00
#define ITS2_UPDATE_ROUTE_FAIL 0x01
#define ITS2_UPDATE_ROUTE_SUCCESS 0x00
255
#define POS_DEST_H 0x0a
#define POS_DEST_L 0x09
#define POS_HOP_COUNT 0x0d
#define POS_KEY1 0x00
!! look at the adding in routes bit... #define POS_KEY2 0x01
#define POS_LENGTH_HEADER 0x02
#define POS_MAX_HOP_COUNT 0x0b
#define POS_NETWORK_H 0x06
#define POS_NETWORK_L 0x05
#define POS_NUM_ROUTES 0x0c
#define POS_PKT_TYPE 0x03
#define POS_ROUTE_START 0x0e
#define POS_SEQUENCE 0x04
#define POS_SOURCE_H 0x08
#define POS_SOURCE_L 0x07
#define QS_ACK_RECEIVED 0x04
#define QS_READY_TO_SEND 0x02
#define QS_ROUTING_FAILED 0x06
#define QS_SENT 0x05
#define QS_WAITING_ON_ACK 0x03
#define QS_WAITING_ON_LOCAL_ADDR 0x00
#define QS_WAITING_ON_NETWORK_ADDR 0x01
#define REMOTE_DEVICE 0xffff
Typedefs
typedef enum _its2_result its2_result
typedef enum _its2_state its2_state
Enumerations
enum _its2_result { RESULT_SUCCESSFUL, RESULT_FAILED, ITEM_QUEUED, QUEUE_FULL,
ROUTING_TOO_MANY_HOPS, NEXT_HOP_NOT_LOCAL }
enum _its2_state { STATE_STARTUP, STATE_RUNNING, STATE_SEARCHING, STATE_ASSOCIATED,
STATE_UNASSOCIATED }
Functions
void its2_delete_item_from_queue (queued_item *item)
its2_result its2_device_init (uns16 my_device_id, uns16 network_id)
void its2_device_process ()
void its2_device_receive_callback (uns8 *data, uns8 data_length)
its2_result its2_device_transmit (uns16 device_id, uns8 *data, uns8 data_length)
its2_result its2_find_coordinator ()
its2_result its2_forward_routed_packet (its2_packet *pkt, uns8 *data, uns8 data_length)
void its2_print_packet (its2_packet *pkt)
void its2_print_queue ()
void its2_process_tx_queue ()
its2_result its2_rebroadcast_net_discover_req (its2_packet *pkt)
void its2_request_local_addr (uns16 device_id)
void its2_request_net_addr (uns16 device_id)
void its2_respond_local_addr (uns16 device_id)
void its2_respond_net_addr (uns16 device_id)
its2_result its2_router_handle_association (uns16 pan_id, uns16 its_device_id)
uns8 its2_router_init (uns16 my_device_id, uns16 network_id)
256
void its2_router_process ()
its2_result its2_router_queue_packet (uns16 device_id, uns8 packet_type, uns8 *data, uns8 data_length, uns8
ack)
void its2_router_receive_callback (uns16 device_id, uns8 *data, uns8 data_length)
void its2_setup_io ()
void its2_transmit (queued_item *item)
void its2_transmit_status_callback (its2_packet *pkt, uns8 status)
Variables
bit debug_module
its2_state state
Detailed Description
Definition in file its_mode2.h.
Define Documentation
#define ITS2_FLAG_ACK 0x01
Definition at line 112 of file its_mode2.h.
Referenced by its2_transmit().
#define ITS2_FLAG_DELETED 0xff
Definition at line 114 of file its_mode2.h.
Referenced by its2_delete_item_from_queue(), its2_find_free_queue_slot(), its2_forward_routed_packet(),
its2_print_queue(), its2_process_tx_queue(), its2_router_init(), and its2_router_queue_packet().
#define ITS2_FLAG_NO_ACK 0x02
Definition at line 113 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_rebroadcast_net_discover_req(), its2_request_local_addr(),
its2_request_net_addr(), its2_respond_local_addr(), and its2_respond_net_addr().
#define ITS2_NO_AVAILABLE_SLOTS 0xff
Definition at line 109 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), and its2_rebroadcast_net_discover_req().
#define ITS2_STATUS_QUEUED 0x00
Definition at line 107 of file its_mode2.h.
257
#define ITS2_STATUS_TX_QUEUE_FULL 0x01
Definition at line 108 of file its_mode2.h.
#define ITS2_TX_STATUS_NEXT_HOP_UNKNOWN 0x04
Definition at line 100 of file its_mode2.h.
Referenced by its2_process_tx_queue().
#define ITS2_TX_STATUS_NO_ACK 0x02
Definition at line 98 of file its_mode2.h.
Referenced by its2_process_tx_queue().
#define ITS2_TX_STATUS_NO_ROUTE 0x01
Definition at line 97 of file its_mode2.h.
Referenced by its2_process_tx_queue().
#define ITS2_TX_STATUS_REMOTE_NO_ACK 0x03
Definition at line 99 of file its_mode2.h.
#define ITS2_TX_STATUS_SUCCESS 0x00
Definition at line 96 of file its_mode2.h.
Referenced by its2_process_tx_queue().
#define ITS2_UPDATE_ROUTE_FAIL 0x01
Definition at line 104 of file its_mode2.h.
Referenced by its2_router_queue_packet().
#define ITS2_UPDATE_ROUTE_SUCCESS 0x00
Definition at line 103 of file its_mode2.h.
#define POS_DEST_H 0x0a
Definition at line 78 of file its_mode2.h.
#define POS_DEST_L 0x09
258
Definition at line 77 of file its_mode2.h.
#define POS_HOP_COUNT 0x0d
Definition at line 81 of file its_mode2.h.
#define POS_KEY1 0x00
Definition at line 68 of file its_mode2.h.
#define POS_KEY2 0x01
Definition at line 69 of file its_mode2.h.
#define POS_LENGTH_HEADER 0x02
Definition at line 70 of file its_mode2.h.
#define POS_MAX_HOP_COUNT 0x0b
Definition at line 79 of file its_mode2.h.
#define POS_NETWORK_H 0x06
Definition at line 74 of file its_mode2.h.
#define POS_NETWORK_L 0x05
Definition at line 73 of file its_mode2.h.
#define POS_NUM_ROUTES 0x0c
Definition at line 80 of file its_mode2.h.
#define POS_PKT_TYPE 0x03
Definition at line 71 of file its_mode2.h.
#define POS_ROUTE_START 0x0e
Definition at line 82 of file its_mode2.h.
#define POS_SEQUENCE 0x04
259
Definition at line 72 of file its_mode2.h.
#define POS_SOURCE_H 0x08
Definition at line 76 of file its_mode2.h.
#define POS_SOURCE_L 0x07
Definition at line 75 of file its_mode2.h.
#define QS_ACK_RECEIVED 0x04
Definition at line 89 of file its_mode2.h.
Referenced by its2_process_tx_queue().
#define QS_READY_TO_SEND 0x02
Definition at line 87 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), its2_process_tx_queue(), and
its2_rebroadcast_net_discover_req().
#define QS_ROUTING_FAILED 0x06
Definition at line 91 of file its_mode2.h.
Referenced by its2_process_tx_queue().
#define QS_SENT 0x05
Definition at line 90 of file its_mode2.h.
Referenced by its2_process_tx_queue(), and its2_transmit().
#define QS_WAITING_ON_ACK 0x03
Definition at line 88 of file its_mode2.h.
Referenced by its2_process_tx_queue(), and its2_transmit().
#define QS_WAITING_ON_LOCAL_ADDR 0x00
Definition at line 85 of file its_mode2.h.
Referenced by its2_forward_routed_packet(), and its2_process_tx_queue().
#define QS_WAITING_ON_NETWORK_ADDR 0x01
Definition at line 86 of file its_mode2.h.
260
Referenced by its2_process_tx_queue().
#define REMOTE_DEVICE 0xffff
Definition at line 94 of file its_mode2.h.
Typedef Documentation
typedef enum _its2_result its2_result
Definition at line 152 of file its_mode2.h.
typedef enum _its2_state its2_state
Definition at line 162 of file its_mode2.h.
Enumeration Type Documentation
enum _its2_result
Enumerator:
RESULT_SUCCESSFUL
RESULT_FAILED
ITEM_QUEUED
QUEUE_FULL
ROUTING_TOO_MANY_HOPS
NEXT_HOP_NOT_LOCAL
Definition at line 150 of file its_mode2.h.
enum _its2_state
Enumerator:
STATE_STARTUP
STATE_RUNNING
STATE_SEARCHING
STATE_ASSOCIATED
STATE_UNASSOCIATED
Definition at line 154 of file its_mode2.h.
261
Function Documentation
void its2_delete_item_from_queue (queued_item * item)
Definition at line 1025 of file its_mode2.c.
References queued_item::data, queued_item::data_length, queued_item::flag, and ITS2_FLAG_DELETED.
Referenced by its2_process_tx_queue().
Here is the caller graph for this function:
its2_result its2_device_init (uns16 my_device_id, uns16 network_id)
Definition at line 1136 of file its_mode2.c.
References debug_str, its_init(), its_set_device_id(), its_set_network_id(), mrf24j40_set_pan_id(),
mrf24j40_set_short_address(), state, STATE_UNASSOCIATED, and wpan_init().
Here is the call graph for this function:
void its2_device_process ()
Definition at line 1163 of file its_mode2.c.
References channel, debug_nl, debug_str, debug_var, ITS_ASSOC_REQ, its_transmit_to_sa(),
mrf24j40_set_channel(), MRF_FIRST_CHANNEL, MRF_LAST_CHANNEL, state, STATE_SEARCHING,
STATE_UNASSOCIATED, tick_calc_diff(), tick_get_count(), tick_marker, and uns16.
Here is the call graph for this function:
262
void its2_device_receive_callback (uns8 * data, uns8 data_length)
Referenced by wpan_data_received_callback().
Here is the caller graph for this function:
its2_result its2_device_transmit (uns16 device_id, uns8 * data, uns8 data_length)
its2_result its2_find_coordinator ()
its2_result its2_forward_routed_packet (its2_packet * pkt, uns8 * data, uns8 data_length)
Definition at line 653 of file its_mode2.c.
References its_device_info::addr, queued_item::data, queued_item::data_length, debug_int,
debug_int_hex_16bit, debug_spc, debug_str, debug_var, queued_item::dest_device_handle,
queued_item::dest_its_device_id, queued_item::flag, its2_packet::hop_count, ITEM_QUEUED,
its2_find_free_queue_slot(), ITS2_FLAG_DELETED, ITS2_FLAG_NO_ACK,
ITS2_NO_AVAILABLE_SLOTS, its2_print_packet(), its2_packet::its_dest_id, ITS_DEVICE_NONE,
its_get_device_handle(), its_get_device_info(), NEXT_HOP_NOT_LOCAL, its2_packet::num_routes,
queued_item::packet, QS_READY_TO_SEND, QS_WAITING_ON_LOCAL_ADDR, QUEUE_FULL,
its_address::remote, remote_address::remote_indicator, its2_packet::routers, queued_item::sent_count,
queued_item::status, and uns8.
Here is the call graph for this function:
void its2_print_packet (its2_packet * pkt)
Definition at line 580 of file its_mode2.c.
References debug_int, debug_int_hex_16bit, debug_putc, debug_str, its2_packet::hop_count,
its2_packet::its_dest_id, its2_packet::its_network_id, its2_packet::its_source_id, its2_packet::max_hop_count,
its2_packet::num_routes, its2_packet::packet_type, its2_packet::routers, its2_packet::sequence, and uns8.
Referenced by its2_forward_routed_packet(), and its2_transmit().
Here is the caller graph for this function:
263
void its2_print_queue ()
Definition at line 1106 of file its_mode2.c.
References debug_nl, debug_var, queued_item::flag, ITS2_FLAG_DELETED, its2_packet::its_dest_id,
its2_packet::its_source_id, queued_item::packet, queued_item::sent_count, queued_item::status,
tick_get_count(), queued_item::tick_sent, and uns8.
Here is the call graph for this function:
void its2_process_tx_queue ()
Definition at line 904 of file its_mode2.c.
References debug_int, debug_int_hex_16bit, debug_str, queued_item::dest_its_device_id, queued_item::flag,
its2_delete_item_from_queue(), ITS2_FLAG_DELETED, its2_request_local_addr(), its2_request_net_addr(),
its2_transmit(), its2_transmit_status_callback(), its2_transmitting,
ITS2_TX_STATUS_NEXT_HOP_UNKNOWN, ITS2_TX_STATUS_NO_ACK,
ITS2_TX_STATUS_NO_ROUTE, ITS2_TX_STATUS_SUCCESS, its_get_device_id(),
its2_packet::its_source_id, queued_item::packet, QS_ACK_RECEIVED, QS_READY_TO_SEND,
QS_ROUTING_FAILED, QS_SENT, QS_WAITING_ON_ACK, QS_WAITING_ON_LOCAL_ADDR,
QS_WAITING_ON_NETWORK_ADDR, queued_item::sent_count, queued_item::status, tick_calc_diff(),
tick_get_count(), queued_item::tick_sent, uns16, and uns8.
Referenced by its2_router_process().
Here is the call graph for this function:
Here is the caller graph for this function:
264
its2_result its2_rebroadcast_net_discover_req (its2_packet * pkt)
Definition at line 613 of file its_mode2.c.
References queued_item::data, queued_item::data_length, debug_str, debug_var,
queued_item::dest_device_handle, queued_item::dest_its_device_id, queued_item::flag,
its2_packet::hop_count, ITEM_QUEUED, its2_find_free_queue_slot(), ITS2_FLAG_NO_ACK,
ITS2_NO_AVAILABLE_SLOTS, ITS_DEVICE_NONE, its_get_device_id(), its2_packet::its_source_id,
its2_packet::max_hop_count, its2_packet::num_routes, queued_item::packet, QS_READY_TO_SEND,
QUEUE_FULL, its2_packet::routers, ROUTING_TOO_MANY_HOPS, queued_item::sent_count,
its2_packet::sequence, queued_item::status, and uns8.
Here is the call graph for this function:
void its2_request_local_addr (uns16 device_id)
Definition at line 779 of file its_mode2.c.
References ITS2_FLAG_NO_ACK, its2_router_queue_packet(), and ITS_LOCAL_DISCOVER_REQ.
Referenced by its2_process_tx_queue().
Here is the call graph for this function:
Here is the caller graph for this function:
265
void its2_request_net_addr (uns16 device_id)
Definition at line 792 of file its_mode2.c.
References ITS2_FLAG_NO_ACK, its2_router_queue_packet(), and ITS_NET_DISCOVER_REQ.
Referenced by its2_process_tx_queue().
Here is the call graph for this function:
Here is the caller graph for this function:
void its2_respond_local_addr (uns16 device_id)
Definition at line 783 of file its_mode2.c.
References debug_module, debug_str, ITS2_FLAG_NO_ACK, its2_router_queue_packet(), and
ITS_LOCAL_DISCOVER_RES.
Here is the call graph for this function:
266
void its2_respond_net_addr (uns16 device_id)
Definition at line 796 of file its_mode2.c.
References ITS2_FLAG_NO_ACK, its2_router_queue_packet(), and ITS_NET_DISCOVER_RES.
Here is the call graph for this function:
its2_result its2_router_handle_association (uns16 pan_id, uns16 its_device_id)
Definition at line 118 of file its_mode2.c.
References debug_str, its_add_local_device(), ITS_ASSOC_RES, ITS_DEVICE_NONE,
its_get_device_handle(), its_transmit_to_handle(), RESULT_FAILED, and RESULT_SUCCESSFUL.
Here is the call graph for this function:
267
uns8 its2_router_init (uns16 my_device_id, uns16 network_id)
Definition at line 743 of file its_mode2.c.
References debug_nl, debug_str, debug_var, queued_item::flag, ITS2_FLAG_DELETED, its2_seen_index,
its_init(), its_set_device_id(), its_set_network_id(), seen_packet::its_source_id, mrf24j40_set_channel(),
mrf24j40_set_pan_id(), mrf24j40_set_short_address(), and uns8.
Here is the call graph for this function:
void its2_router_process ()
Definition at line 808 of file its_mode2.c.
References its2_process_tx_queue(), state_timeout, tick_calc_diff(), tick_get_count(), tick_marker,
turn_off_mrf_interrupts(), turn_on_mrf_interrupts(), and uns16.
Here is the call graph for this function:
268
its2_result its2_router_queue_packet (uns16 device_id, uns8 packet_type, uns8 * data, uns8 data_length, uns8 ack)
Definition at line 823 of file its_mode2.c.
References queued_item::data, queued_item::data_length, debug_str, debug_var,
queued_item::dest_its_device_id, queued_item::flag, its2_packet::hop_count, ITEM_QUEUED,
ITS2_FLAG_DELETED, ITS2_UPDATE_ROUTE_FAIL, its2_packet::its_dest_id, its_get_device_id(),
its_get_network_id(), its_get_next_sequence(), ITS_LOCAL_DISCOVER_REQ,
ITS_NET_DISCOVER_REQ, its2_packet::its_network_id, its2_packet::its_source_id,
its2_packet::max_hop_count, queued_item::packet, its2_packet::packet_type, QUEUE_FULL,
ROUTING_TOO_MANY_HOPS, queued_item::sent_count, its2_packet::sequence, turn_off_mrf_interrupts(),
turn_on_mrf_interrupts(), and uns8.
Referenced by its2_request_local_addr(), its2_request_net_addr(), its2_respond_local_addr(), and
its2_respond_net_addr().
Here is the call graph for this function:
269
Here is the caller graph for this function:
void its2_router_receive_callback (uns16 device_id, uns8 * data, uns8 data_length)
void its2_setup_io ()
Definition at line 95 of file its_mode2.c.
References wpan_setup_io().
Here is the call graph for this function:
void its2_transmit (queued_item * item)
Definition at line 1035 of file its_mode2.c.
References its_device_info::addr, queued_item::data, queued_item::data_length, debug_int,
debug_int_hex_16bit, debug_putc, debug_str, debug_var, queued_item::dest_device_handle,
queued_item::dest_its_device_id, queued_item::flag, FRAME_TYPE_DATA, ITS2_FLAG_ACK,
its2_print_packet(), its2_transmitting, ITS_DEVICE_NONE, its_get_device_info(), its_address::local,
mrf24j40_transmit_to_short_address(), MRF_ACK, MRF_NO_ACK, its2_packet::num_routes,
queued_item::packet, local_address::pan_id, QS_SENT, QS_WAITING_ON_ACK, its2_packet::routers,
queued_item::sent_count, local_address::short_address, queued_item::status, tick_get_count(),
queued_item::tick_sent, and uns8.
Referenced by its2_process_tx_queue().
Here is the call graph for this function:
Here is the caller graph for this function:
270
void its2_transmit_status_callback (its2_packet * pkt, uns8 status)
Referenced by its2_process_tx_queue().
Here is the caller graph for this function:
Variable Documentation
bit debug_module
Definition at line 64 of file its_mode2.c.
Referenced by its2_respond_local_addr().
its2_state state
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().
lcd.c File Reference #include "lcd.h" #include <string.h> #include <stdlib.h> Include dependency graph for lcd.c:
271
Functions
void lcd_cursor_home ()
void lcd_init ()
Initialise LCD ready for display. void lcd_set_cgram_pos (uns8 x)
void lcd_set_ddram_pos (uns8 x)
void lcd_setup ()
Setup port and pins to talk to LCD. void lcd_toggle_e ()
void lcd_wait_busy ()
Wait while LCD is busy. void lcd_write_byte (uns8 data)
void lcd_write_command (uns8 data)
Sends a command to the LCD. void lcd_write_data (uns8 data)
Send one byte of data to the LCD. void lcd_write_data_int (uns16 i)
Print a 16 bit integer the the LCD. void lcd_write_data_str (char *str)
Print a string to the LCD. void lcd_write_nibble (uns8 data)
Function Documentation
void lcd_cursor_home ()
Definition at line 204 of file lcd.c.
References LCD_CLEAR_DISP, and lcd_write_command().
Here is the call graph for this function:
272
void lcd_init ()
Configures LCD for 4 bit operation and gets ready for displaying text
Definition at line 84 of file lcd.c.
References LCD_CLEAR_DISP, LCD_RETURN_HOME, lcd_toggle_e(), lcd_write_command(), and
lcd_write_nibble().
Here is the call graph for this function:
void lcd_set_cgram_pos (uns8 x)
Definition at line 198 of file lcd.c.
References lcd_write_command().
Here is the call graph for this function:
void lcd_set_ddram_pos (uns8 x)
Definition at line 193 of file lcd.c.
References lcd_write_command().
Here is the call graph for this function:
void lcd_setup ()
Call this routine first, to set up tris bits correctly to talk to the LCD
Definition at line 67 of file lcd.c.
References clear_pin, and make_output.
273
void lcd_toggle_e ()
Definition at line 40 of file lcd.c.
References clear_pin, and set_pin.
Referenced by lcd_init(), and lcd_write_byte().
Here is the caller graph for this function:
void lcd_wait_busy ()
Internal routine to wait while the LCD is busy and unable to accept more data
Definition at line 154 of file lcd.c.
References clear_pin, set_pin, and test_pin.
Referenced by lcd_write_command(), lcd_write_data(), and lcd_write_data_str().
Here is the caller graph for this function:
void lcd_write_byte (uns8 data)
274
Definition at line 58 of file lcd.c.
References lcd_toggle_e(), and lcd_write_nibble().
Referenced by lcd_write_command(), lcd_write_data(), and lcd_write_data_str().
Here is the call graph for this function:
Here is the caller graph for this function:
void lcd_write_command (uns8 data)
Use this to send commands to the LCD, eg, changing cursor position
Definition at line 113 of file lcd.c.
References clear_pin, lcd_wait_busy(), and lcd_write_byte().
Referenced by lcd_cursor_home(), lcd_init(), lcd_set_cgram_pos(), and lcd_set_ddram_pos().
Here is the call graph for this function:
Here is the caller graph for this function:
275
void lcd_write_data (uns8 data)
Definition at line 123 of file lcd.c.
References clear_pin, lcd_wait_busy(), lcd_write_byte(), and set_pin.
Here is the call graph for this function:
void lcd_write_data_int (uns16 i)
Displays an unsigned 16 bit integer on the LCD
Definition at line 145 of file lcd.c.
References lcd_write_data_str().
Here is the call graph for this function:
void lcd_write_data_str (char * str)
Display the string on the LCD from the current cursor position
Definition at line 132 of file lcd.c.
References clear_pin, lcd_wait_busy(), lcd_write_byte(), and set_pin.
Referenced by lcd_write_data_int().
276
Here is the call graph for this function:
Here is the caller graph for this function:
void lcd_write_nibble (uns8 data)
Definition at line 47 of file lcd.c.
References change_pin.
Referenced by lcd_init(), and lcd_write_byte().
Here is the caller graph for this function:
lcd.h File Reference
LCD routines. #include "config.h" #include "pic_utils.h" Include dependency graph for lcd.h:
277
This graph shows which files directly or indirectly include this file:
Defines
#define __lcd_h include
#define LCD_CLEAR_DISP 0b00000001
#define lcd_clear_display() lcd_write_command(LCD_CLEAR_DISP);
Clear LCD display. #define LCD_LINE1 0b10000000
#define LCD_LINE2 0b11000000
#define LCD_LINE3 0b10010100
#define LCD_LINE4 0b11010100
#define lcd_return_home() lcd_write_command(LCD_RETURN_HOME);
Return cursor home. #define LCD_RETURN_HOME 0b00000010
#define LCD_SET_DRAM_ADDR 0b10000000
Functions
void lcd_init ()
Initialise LCD ready for display. void lcd_setup ()
Setup port and pins to talk to LCD. void lcd_wait_busy ()
Wait while LCD is busy. void lcd_write_command (uns8 data)
Sends a command to the LCD. void lcd_write_data (uns8 data)
Send one byte of data to the LCD. void lcd_write_data_int (uns16 i)
Print a 16 bit integer the the LCD. void lcd_write_data_str (char *str)
Print a string to the LCD.
Detailed Description
This module contains routines to communicate with an LCD via the 4 bit parallel mode. All pins are
protected from read-before-write problems with picpack's port latch simulation. Reads ready flag to check
LCD isn't busy before sending more data.
Definition in file lcd.h.
278
Define Documentation
#define __lcd_h include
Definition at line 47 of file lcd.h.
#define LCD_CLEAR_DISP 0b00000001
Clear LCD display
Definition at line 77 of file lcd.h.
Referenced by lcd_cursor_home(), and lcd_init().
#define lcd_clear_display() lcd_write_command(LCD_CLEAR_DISP);
Definition at line 140 of file lcd.h.
#define LCD_LINE1 0b10000000
Move cursor to line 1
Definition at line 83 of file lcd.h.
#define LCD_LINE2 0b11000000
Move cursor to line 2
Definition at line 85 of file lcd.h.
#define LCD_LINE3 0b10010100
Move cursor to line 3
Definition at line 87 of file lcd.h.
#define LCD_LINE4 0b11010100
Move cursor to line 4
Definition at line 89 of file lcd.h.
#define lcd_return_home() lcd_write_command(LCD_RETURN_HOME);
Definition at line 142 of file lcd.h.
#define LCD_RETURN_HOME 0b00000010
Move cursor to top left position
Definition at line 79 of file lcd.h.
Referenced by lcd_init().
279
#define LCD_SET_DRAM_ADDR 0b10000000
Move to DRAM address (cursor position)
Definition at line 81 of file lcd.h.
Function Documentation
void lcd_init ()
Configures LCD for 4 bit operation and gets ready for displaying text
Definition at line 84 of file lcd.c.
References LCD_CLEAR_DISP, LCD_RETURN_HOME, lcd_toggle_e(), lcd_write_command(), and
lcd_write_nibble().
Here is the call graph for this function:
void lcd_setup ()
Call this routine first, to set up tris bits correctly to talk to the LCD
Definition at line 67 of file lcd.c.
References clear_pin, and make_output.
void lcd_wait_busy ()
Internal routine to wait while the LCD is busy and unable to accept more data
Definition at line 154 of file lcd.c.
References clear_pin, set_pin, and test_pin.
Referenced by lcd_write_command(), lcd_write_data(), and lcd_write_data_str().
Here is the caller graph for this function:
280
void lcd_write_command (uns8 data)
Use this to send commands to the LCD, eg, changing cursor position
Definition at line 113 of file lcd.c.
References clear_pin, lcd_wait_busy(), and lcd_write_byte().
Referenced by lcd_cursor_home(), lcd_init(), lcd_set_cgram_pos(), and lcd_set_ddram_pos().
Here is the call graph for this function:
Here is the caller graph for this function:
void lcd_write_data (uns8 data)
Definition at line 123 of file lcd.c.
281
References clear_pin, lcd_wait_busy(), lcd_write_byte(), and set_pin.
Here is the call graph for this function:
void lcd_write_data_int (uns16 i)
Displays an unsigned 16 bit integer on the LCD
Definition at line 145 of file lcd.c.
References lcd_write_data_str().
Here is the call graph for this function:
void lcd_write_data_str (char * str)
Display the string on the LCD from the current cursor position
Definition at line 132 of file lcd.c.
References clear_pin, lcd_wait_busy(), lcd_write_byte(), and set_pin.
Referenced by lcd_write_data_int().
Here is the call graph for this function:
Here is the caller graph for this function:
282
lm75.c File Reference #include "lm75.h" Include dependency graph for lm75.c:
Functions
uns8 lm75_get_config (uns8 addr)
Get LM75 config register. uns16 lm75_get_temp (uns8 addr)
Request temperature from LM75. void lm75_set_config (uns8 addr, uns8 config)
Set LM75 config register. void lm75_setup ()
Setup lm75 ports and pins.
Function Documentation
uns8 lm75_get_config (uns8 addr)
Gets the LM75 config register (memory location 0x01)
Definition at line 48 of file lm75.c.
References i2c_read_eeprom().
Here is the call graph for this function:
283
uns16 lm75_get_temp (uns8 addr)
Returns 16bit raw temperature register from LM75
Definition at line 54 of file lm75.c.
References i2c_read_eeprom_16bit().
Here is the call graph for this function:
void lm75_set_config (uns8 addr, uns8 config)
Sets the LM75 config register (memory location 0x01)
Definition at line 43 of file lm75.c.
References i2c_write_eeprom().
Here is the call graph for this function:
284
void lm75_setup (void)
Definition at line 39 of file lm75.c.
References i2c_setup.
lm75.h File Reference
LM75 temperature sensor routines. #include "pic_utils.h" #include "i2c.h" Include dependency graph for lm75.h:
This graph shows which files directly or indirectly include this file:
Defines
#define LM75_NORMAL 0
#define LM75_SHUTDOWN 1
Functions
uns8 lm75_get_config (uns8 addr)
Get LM75 config register. uns16 lm75_get_temp (uns8 addr)
285
Request temperature from LM75. void lm75_set_config (uns8 addr, uns8 config)
Set LM75 config register. void lm75_setup (void)
Setup lm75 ports and pins.
Detailed Description
A library to communicate with the LM75 sensor
Definition in file lm75.h.
Define Documentation
#define LM75_NORMAL 0
config define for normal mode
Definition at line 49 of file lm75.h.
#define LM75_SHUTDOWN 1
Config define for low power mode
Definition at line 47 of file lm75.h.
Function Documentation
uns8 lm75_get_config (uns8 addr)
Gets the LM75 config register (memory location 0x01)
Definition at line 48 of file lm75.c.
References i2c_read_eeprom().
Here is the call graph for this function:
uns16 lm75_get_temp (uns8 addr)
Returns 16bit raw temperature register from LM75
Definition at line 54 of file lm75.c.
References i2c_read_eeprom_16bit().
Here is the call graph for this function:
286
void lm75_set_config (uns8 addr, uns8 config)
Sets the LM75 config register (memory location 0x01)
Definition at line 43 of file lm75.c.
References i2c_write_eeprom().
Here is the call graph for this function:
void lm75_setup (void)
Definition at line 39 of file lm75.c.
References i2c_setup.
m41t81s.c File Reference #include "m41t81s.h" #include "pic_serial.h" Include dependency graph for m41t81s.c:
287
Functions
uns8 bcd_to_dec (uns8 bcd)
uns8 dec_to_bcd (uns8 dec)
uns8 rtc_get_date ()
Get the date register from the ds1307. uns8 rtc_get_dow ()
Get the day register from the m41t81s. uns8 rtc_get_hours ()
Get the decoded hours register from the ds1307. uns8 rtc_get_minutes ()
Get the decoded minutes register from the ds1307. uns8 rtc_get_month ()
Get the month register from the ds1307. uns8 rtc_get_register (uns8 reg)
uns8 rtc_get_seconds ()
Get the decoded seconds register from the ds1307. uns8 rtc_get_year ()
Get the year register from the ds1307. void rtc_set_date (uns8 date)
Set the date register from the ds1307. void rtc_set_day (uns8 day)
Set the day of the week register from the ds1307. void rtc_set_hours (uns8 hours)
Set the hours register in the ds1307. void rtc_set_minutes (uns8 minutes)
Set the minutes register from the m41t81s. void rtc_set_month (uns8 month)
Set the month register in the ds1307. void rtc_set_register (uns8 reg, uns8 data)
void rtc_set_seconds (uns8 seconds)
Set the seconds register in the ds1307. void rtc_set_sqw_freq (uns8 freq)
Set the frequence of the square wave output pin. void rtc_set_year (uns8 year)
Set the year register from the m41t81s. void rtc_setup_io ()
Setup ports and pins for use in the ds1307. void rtc_start_clock ()
Starts the clock in the ds1307. void rtc_start_sqw_output ()
Start pulsing on square wave output pin. void rtc_stop_clock ()
Stop the clock in the ds1307. void rtc_stop_sqw_output ()
Stop pulsing on square wave output pin.
288
Function Documentation
uns8 bcd_to_dec (uns8 bcd)
Definition at line 40 of file m41t81s.c.
uns8 dec_to_bcd (uns8 dec)
Definition at line 44 of file m41t81s.c.
uns8 rtc_get_date ()
Get the date register from the m41t81s.
Returns the date in month from the ds1307. The result is coverted to decimal from BCD and is ready
to use. Range 1 through 28/29/30/31 depending on month
Definition at line 66 of file m41t81s.c.
References bcd_to_dec(), ds1307_date_register, ds1307_device, i2c_read_eeprom(), m41t81s_date_reg, and
m41t81s_device_addr.
Here is the call graph for this function:
uns8 rtc_get_dow ()
Returns the day of the week from the m41t81s. The result is coverted to decimal from BCD and is
ready to use. Range - 1 through 7
Definition at line 62 of file m41t81s.c.
References bcd_to_dec(), i2c_read_eeprom(), m41t81s_device_addr, and m41t81s_dow_reg.
Here is the call graph for this function:
289
uns8 rtc_get_hours ()
Get the decoded hours register from the m41t81s.
Returns hour from the ds1307. The result is coverted to decimal from BCD and is ready to use. These
routines assume the ds1307 is running in 24 hour mode. Range - 0 through 23
Definition at line 51 of file m41t81s.c.
References bcd_to_dec(), ds1307_device, ds1307_hours_register, i2c_read_eeprom(), m41t81s_device_addr,
and m41t81s_hours_reg.
Here is the call graph for this function:
uns8 rtc_get_minutes ()
Get the decoded minutes register from the m41t81s.
Returns the number of minutes past the hour from the ds1307. The result is coverted to decimal from
BCD and is ready to use. Range - 0 through 59
Definition at line 48 of file m41t81s.c.
References bcd_to_dec(), ds1307_device, ds1307_minutes_register, i2c_read_eeprom(), m41t81s_device_addr,
and m41t81s_minutes_reg.
Here is the call graph for this function:
290
uns8 rtc_get_month ()
Get the month register from the m41t81s.
Returns the month of the year from the ds1307. The result is coverted to decimal from BCD and is
ready to use. Range 1 through 12
Definition at line 70 of file m41t81s.c.
References bcd_to_dec(), ds1307_device, ds1307_month_register, i2c_read_eeprom(), m41t81s_device_addr,
and m41t81s_month_reg.
Here is the call graph for this function:
uns8 rtc_get_register (uns8 reg)
Definition at line 78 of file m41t81s.c.
References i2c_read_eeprom(), and m41t81s_device_addr.
Referenced by rtc_start_sqw_output(), and rtc_stop_sqw_output().
Here is the call graph for this function:
291
Here is the caller graph for this function:
uns8 rtc_get_seconds ()
Get the decoded seconds register from the m41t81s.
Returns seconds from the ds1307. The result is coverted to decimal from BCD and is ready to use.
Range - 0 through 59
Definition at line 58 of file m41t81s.c.
References bcd_to_dec(), ds1307_device, ds1307_seconds_register, i2c_read_eeprom(), m41t81s_device_addr,
and m41t81s_seconds_reg.
Here is the call graph for this function:
uns8 rtc_get_year ()
Get the year register from the m41t81s.
Returns the year from the ds1307. The result is coverted to decimal from BCD and is ready to use.
Range 0 through 99
Definition at line 74 of file m41t81s.c.
292
References bcd_to_dec(), ds1307_device, ds1307_year_register, i2c_read_eeprom(), m41t81s_device_addr, and
m41t81s_year_reg.
Here is the call graph for this function:
void rtc_set_date (uns8 date)
Set the date register from the m41t81s.
Changes the date in the ds1307.
Parameters:
seconds Value to set date to
Definition at line 107 of file m41t81s.c.
References dec_to_bcd(), ds1307_date_register, ds1307_device, i2c_write_eeprom(), m41t81s_date_reg, and
m41t81s_device_addr.
Here is the call graph for this function:
void rtc_set_day (uns8 day)
Set the day of the week register from the m41t81s.
Changes the day of the week in the ds1307.
Parameters:
seconds Value to set day to
Definition at line 104 of file m41t81s.c.
References dec_to_bcd(), ds1307_day_register, ds1307_device, i2c_write_eeprom(), m41t81s_device_addr,
and m41t81s_dow_reg.
Here is the call graph for this function:
293
void rtc_set_hours (uns8 hours)
Set the hours register in the m41t81s.
Changes the hours in the ds1307. Forces the ds1307 into 24 hour mode.
Definition at line 116 of file m41t81s.c.
References dec_to_bcd(), ds1307_device, ds1307_hours_register, i2c_read_eeprom(), i2c_write_eeprom(),
m41t81s_device_addr, and m41t81s_hours_reg.
Here is the call graph for this function:
void rtc_set_minutes (uns8 minutes)
Changes the minutes in the m41t81s.
Parameters:
seconds Value to set minutes to
Definition at line 101 of file m41t81s.c.
References dec_to_bcd(), i2c_write_eeprom(), m41t81s_device_addr, and m41t81s_minutes_reg.
Here is the call graph for this function:
294
void rtc_set_month (uns8 month)
Set the month register in the m41t81s.
Changes the month in the ds1307.
Definition at line 121 of file m41t81s.c.
References dec_to_bcd(), ds1307_device, ds1307_month_register, i2c_write_eeprom(), m41t81s_device_addr,
and m41t81s_month_reg.
Here is the call graph for this function:
void rtc_set_register (uns8 reg, uns8 data)
Definition at line 82 of file m41t81s.c.
References i2c_write_eeprom(), and m41t81s_device_addr.
Referenced by rtc_set_sqw_freq(), rtc_start_sqw_output(), and rtc_stop_sqw_output().
Here is the call graph for this function:
Here is the caller graph for this function:
void rtc_set_seconds (uns8 seconds)
Set the seconds register in the m41t81s.
295
Changes the seconds in the ds1307.
Parameters:
seconds Value to set seconds to
Definition at line 111 of file m41t81s.c.
References dec_to_bcd(), ds1307_device, ds1307_seconds_register, i2c_read_eeprom(), i2c_write_eeprom(),
m41t81s_device_addr, and m41t81s_seconds_reg.
Here is the call graph for this function:
void rtc_set_sqw_freq (uns8 freq)
Use one of the following self explanitory defines:
rtc_sqw_freq_32768Hz rtc_sqw_freq_8192Hz rtc_sqw_freq_4096Hz rtc_sqw_freq_2048Hz
rtc_sqw_freq_1024Hz rtc_sqw_freq_512Hz rtc_sqw_freq_256Hz rtc_sqw_freq_128Hz
rtc_sqw_freq_64Hz rtc_sqw_freq_32Hz rtc_sqw_freq_16Hz rtc_sqw_freq_8Hz rtc_sqw_freq_4Hz
rtc_sqw_freq_2Hz rtc_sqw_freq_1Hz
Note that on the m41t81s 18384Hz is not available.
Definition at line 125 of file m41t81s.c.
References m41t81s_sqw_reg, and rtc_set_register().
Here is the call graph for this function:
void rtc_set_year (uns8 year)
Changes the year in the m41t81s.
Definition at line 98 of file m41t81s.c.
References dec_to_bcd(), i2c_write_eeprom(), m41t81s_device_addr, and m41t81s_year_reg.
Here is the call graph for this function:
296
void rtc_setup_io ()
Setup ports and pins for use in the m41t81s.
Calls i2c_setup() to configure ports and pins ready for use
Definition at line 143 of file m41t81s.c.
References i2c_setup_io().
Here is the call graph for this function:
void rtc_start_clock ()
Starts the clock in the m41t81s.
Resume time in the ds1307
Definition at line 91 of file m41t81s.c.
References ds1307_device, ds1307_seconds_register, i2c_read_eeprom(), i2c_write_eeprom(),
m41t81s_alarm_hour_reg, m41t81s_device_addr, and m41t81s_seconds_reg.
Here is the call graph for this function:
void rtc_start_sqw_output ()
Outputs desired frequency on the SQW output pin. To set the frequency, see rtc_set_sqw_freq(uns8
freq);
Definition at line 131 of file m41t81s.c.
References m41t81s_alarm_month_reg, rtc_get_register(), and rtc_set_register().
297
Here is the call graph for this function:
void rtc_stop_clock ()
Stop the clock in the m41t81s.
Pauses time in the ds1307
Definition at line 87 of file m41t81s.c.
References ds1307_device, ds1307_seconds_register, i2c_read_eeprom(), i2c_write_eeprom(),
m41t81s_device_addr, and m41t81s_seconds_reg.
Here is the call graph for this function:
void rtc_stop_sqw_output ()
Stops square wave output
Definition at line 136 of file m41t81s.c.
References m41t81s_alarm_month_reg, rtc_get_register(), and rtc_set_register().
Here is the call graph for this function:
298
m41t81s.h File Reference
Routines for communicating with the m41t81s real time clock. #include "i2c.h" #include "pic_utils.h" Include dependency graph for m41t81s.h:
This graph shows which files directly or indirectly include this file:
299
Defines
#define __m41t81s_h defined
#define m41t81s_alarm_date_reg 0x0B
#define m41t81s_alarm_hour_reg 0x0C
#define m41t81s_alarm_min_reg 0x0D
#define m41t81s_alarm_month_reg 0x0A
#define m41t81s_alarm_seconds_reg 0x0E
#define m41t81s_calibration_reg 0x08
#define m41t81s_date_reg 0x05
#define m41t81s_device_addr 0xD0
#define m41t81s_dow_reg 0x04
#define m41t81s_flags_reg 0x0F
#define m41t81s_hours_reg 0x03
#define m41t81s_minutes_reg 0x02
#define m41t81s_month_reg 0x06
#define m41t81s_part_seconds_reg 0x00
#define m41t81s_reserved1_reg 0x10
#define m41t81s_reserved2_reg 0x11
#define m41t81s_reserved3_reg 0x12
#define m41t81s_seconds_reg 0x01
#define m41t81s_sqw_reg 0x13
#define m41t81s_watchdog_reg 0x09
#define m41t81s_year_reg 0x07
#define rtc_setup() rtc_setup_io()
#define rtc_sqw_freq_1024Hz 0b00000101
#define rtc_sqw_freq_128Hz 0b00001000
#define rtc_sqw_freq_16Hz 0b00001011
#define rtc_sqw_freq_1Hz 0b00001111
#define rtc_sqw_freq_2048Hz 0b00000100
#define rtc_sqw_freq_256Hz 0b00000111
#define rtc_sqw_freq_2Hz 0b00001110
#define rtc_sqw_freq_32768Hz 0b00000001
#define rtc_sqw_freq_32Hz 0b00001010
#define rtc_sqw_freq_4096Hz 0b00000011
#define rtc_sqw_freq_4Hz 0b00001101
#define rtc_sqw_freq_512Hz 0b00000110
#define rtc_sqw_freq_64Hz 0b00001001
#define rtc_sqw_freq_8192Hz 0b00000010
#define rtc_sqw_freq_8Hz 0b00001100
Functions
uns8 rtc_get_date ()
Get the date register from the m41t81s. uns8 rtc_get_dow ()
Get the day register from the m41t81s. uns8 rtc_get_hours ()
Get the decoded hours register from the m41t81s. uns8 rtc_get_minutes ()
Get the decoded minutes register from the m41t81s. uns8 rtc_get_month ()
Get the month register from the m41t81s. uns8 rtc_get_register (uns8 reg)
uns8 rtc_get_seconds ()
Get the decoded seconds register from the m41t81s. uns8 rtc_get_year ()
Get the year register from the m41t81s. uns8 rtc_set_config (uns8 config)
Set the config register in the m41t81s. void rtc_set_date (uns8 date)
Set the date register from the m41t81s. void rtc_set_day (uns8 day)
300
Set the day of the week register from the m41t81s. void rtc_set_hours (uns8 hours)
Set the hours register in the m41t81s. void rtc_set_minutes (uns8 minutes)
Set the minutes register from the m41t81s. void rtc_set_month (uns8 month)
Set the month register in the m41t81s. void rtc_set_register (uns8 reg, uns8 data)
void rtc_set_seconds (uns8 seconds)
Set the seconds register in the m41t81s. void rtc_set_sqw_freq (uns8 freq)
Set the frequence of the square wave output pin. void rtc_set_year (uns8 year)
Set the year register from the m41t81s. void rtc_setup_io ()
Setup ports and pins for use in the m41t81s. void rtc_start_clock ()
Starts the clock in the m41t81s. void rtc_start_sqw_output ()
Start pulsing on square wave output pin. void rtc_stop_clock ()
Stop the clock in the m41t81s. void rtc_stop_sqw_output ()
Stop pulsing on square wave output pin.
Detailed Description
Definition in file m41t81s.h.
Define Documentation
#define __m41t81s_h defined
Definition at line 44 of file m41t81s.h.
#define m41t81s_alarm_date_reg 0x0B
m41t81s alarm date register (D7=RPT4, D6=RPT5, D5-D4=ABE, D4=AL 10M, D3-D0=Alarm
month)
Definition at line 95 of file m41t81s.h.
#define m41t81s_alarm_hour_reg 0x0C
m41t81s alarm hour register (D7=RPT3, D6=HT, D5-D4=Alarm 10 Hour, D3-D0=Alarm Hour)
Definition at line 97 of file m41t81s.h.
Referenced by rtc_start_clock().
#define m41t81s_alarm_min_reg 0x0D
m41t81s alarm min register (D7=RPT2, D6-D4=Alarm 10 Minutes, D3-D0=Alarm Minutes)
Definition at line 99 of file m41t81s.h.
#define m41t81s_alarm_month_reg 0x0A
m41t81s alarm month register (D7=AFE, D6=SQWE, D5=ABE, D4=AL 10M, D3-D0=Alarm
month)
Definition at line 93 of file m41t81s.h.
Referenced by rtc_start_sqw_output(), and rtc_stop_sqw_output().
301
#define m41t81s_alarm_seconds_reg 0x0E
m41t81s alarm seconds register (D7=RPT1, D6-D4=Alarm 10 Seconds, D3-D0=Alarm Seconds)
Definition at line 101 of file m41t81s.h.
#define m41t81s_calibration_reg 0x08
m41t81s calibration register (D7=OUT, D6=FT, D5=S D4-D0=Calibration)
Definition at line 89 of file m41t81s.h.
#define m41t81s_date_reg 0x05
m41t81s date in month register
Definition at line 83 of file m41t81s.h.
Referenced by rtc_get_date(), and rtc_set_date().
#define m41t81s_device_addr 0xD0
The m41t81s device address
Definition at line 70 of file m41t81s.h.
Referenced by rtc_get_date(), rtc_get_dow(), rtc_get_hours(), rtc_get_minutes(), rtc_get_month(),
rtc_get_register(), rtc_get_seconds(), rtc_get_year(), rtc_set_date(), rtc_set_day(), rtc_set_hours(),
rtc_set_minutes(), rtc_set_month(), rtc_set_register(), rtc_set_seconds(), rtc_set_year(), rtc_start_clock(), and
rtc_stop_clock().
#define m41t81s_dow_reg 0x04
m41t81s day of week register
Definition at line 81 of file m41t81s.h.
Referenced by rtc_get_dow(), and rtc_set_day().
#define m41t81s_flags_reg 0x0F
m41t81s flags register (D7=WDF, D6=AF, D5=0, D4=BL, D3=0, D2=OF, D1=0, D0=0 -D4=Alarm
10 Seconds, D3-D0=Alarm Seconds)
Definition at line 103 of file m41t81s.h.
#define m41t81s_hours_reg 0x03
m41t81s hours register (D7=CEB, D6=CB)
Definition at line 79 of file m41t81s.h.
Referenced by rtc_get_hours(), and rtc_set_hours().
#define m41t81s_minutes_reg 0x02
m41t81s minutes register
Definition at line 77 of file m41t81s.h.
Referenced by rtc_get_minutes(), and rtc_set_minutes().
#define m41t81s_month_reg 0x06
m41t81s month register
302
Definition at line 85 of file m41t81s.h.
Referenced by rtc_get_month(), and rtc_set_month().
#define m41t81s_part_seconds_reg 0x00
m41t81s tenths and hundreths of seconds register
Definition at line 73 of file m41t81s.h.
#define m41t81s_reserved1_reg 0x10
m41t81s reserved register
Definition at line 105 of file m41t81s.h.
#define m41t81s_reserved2_reg 0x11
m41t81s reserved register
Definition at line 107 of file m41t81s.h.
#define m41t81s_reserved3_reg 0x12
m41t81s reserved register
Definition at line 109 of file m41t81s.h.
#define m41t81s_seconds_reg 0x01
m41t81s seconds register (D7=ST)
Definition at line 75 of file m41t81s.h.
Referenced by rtc_get_seconds(), rtc_set_seconds(), rtc_start_clock(), and rtc_stop_clock().
#define m41t81s_sqw_reg 0x13
m41t81s SQW register (D7-D4=RS3-RS0)
Definition at line 111 of file m41t81s.h.
Referenced by rtc_set_sqw_freq().
#define m41t81s_watchdog_reg 0x09
m41t81s watchdog register (D7=OFIE, D6-D2=BMB, D1-D0=RB
Definition at line 91 of file m41t81s.h.
#define m41t81s_year_reg 0x07
m41t81s year register
Definition at line 87 of file m41t81s.h.
Referenced by rtc_get_year(), and rtc_set_year().
#define rtc_setup() rtc_setup_io()
Definition at line 356 of file m41t81s.h.
303
#define rtc_sqw_freq_1024Hz 0b00000101
Definition at line 56 of file m41t81s.h.
#define rtc_sqw_freq_128Hz 0b00001000
Definition at line 59 of file m41t81s.h.
#define rtc_sqw_freq_16Hz 0b00001011
Definition at line 62 of file m41t81s.h.
#define rtc_sqw_freq_1Hz 0b00001111
Definition at line 66 of file m41t81s.h.
#define rtc_sqw_freq_2048Hz 0b00000100
Definition at line 55 of file m41t81s.h.
#define rtc_sqw_freq_256Hz 0b00000111
Definition at line 58 of file m41t81s.h.
#define rtc_sqw_freq_2Hz 0b00001110
Definition at line 65 of file m41t81s.h.
#define rtc_sqw_freq_32768Hz 0b00000001
Definition at line 51 of file m41t81s.h.
#define rtc_sqw_freq_32Hz 0b00001010
Definition at line 61 of file m41t81s.h.
#define rtc_sqw_freq_4096Hz 0b00000011
Definition at line 54 of file m41t81s.h.
#define rtc_sqw_freq_4Hz 0b00001101
Definition at line 64 of file m41t81s.h.
304
#define rtc_sqw_freq_512Hz 0b00000110
Definition at line 57 of file m41t81s.h.
#define rtc_sqw_freq_64Hz 0b00001001
Definition at line 60 of file m41t81s.h.
#define rtc_sqw_freq_8192Hz 0b00000010
Definition at line 53 of file m41t81s.h.
#define rtc_sqw_freq_8Hz 0b00001100
Definition at line 63 of file m41t81s.h.
Function Documentation
uns8 rtc_get_date ()
Returns the date in month from the m41t81s. The result is coverted to decimal from BCD and is ready
to use. Range 1 through 28/29/30/31 depending on month
Get the date register from the m41t81s.
Returns the date in month from the ds1307. The result is coverted to decimal from BCD and is ready
to use. Range 1 through 28/29/30/31 depending on month
Definition at line 65 of file ds1307.c.
References bcd_to_dec(), ds1307_date_register, ds1307_device, i2c_read_eeprom(), m41t81s_date_reg, and
m41t81s_device_addr.
Here is the call graph for this function:
uns8 rtc_get_dow ()
Returns the day of the week from the m41t81s. The result is coverted to decimal from BCD and is
ready to use. Range - 1 through 7
305
Definition at line 62 of file m41t81s.c.
References bcd_to_dec(), i2c_read_eeprom(), m41t81s_device_addr, and m41t81s_dow_reg.
Here is the call graph for this function:
uns8 rtc_get_hours ()
Returns hour from the m41t81s. The result is coverted to decimal from BCD and is ready to use.
These routines assume the m41t81s is running in 24 hour mode. Range - 0 through 23
Get the decoded hours register from the m41t81s.
Returns hour from the ds1307. The result is coverted to decimal from BCD and is ready to use. These
routines assume the ds1307 is running in 24 hour mode. Range - 0 through 23
Definition at line 50 of file ds1307.c.
References bcd_to_dec(), ds1307_device, ds1307_hours_register, i2c_read_eeprom(), m41t81s_device_addr,
and m41t81s_hours_reg.
Here is the call graph for this function:
uns8 rtc_get_minutes ()
Returns the number of minutes past the hour from the m41t81s. The result is coverted to decimal
from BCD and is ready to use. Range - 0 through 59
Get the decoded minutes register from the m41t81s.
Returns the number of minutes past the hour from the ds1307. The result is coverted to decimal from
BCD and is ready to use. Range - 0 through 59
306
Definition at line 47 of file ds1307.c.
References bcd_to_dec(), ds1307_device, ds1307_minutes_register, i2c_read_eeprom(), m41t81s_device_addr,
and m41t81s_minutes_reg.
Here is the call graph for this function:
uns8 rtc_get_month ()
Returns the month of the year from the m41t81s. The result is coverted to decimal from BCD and is
ready to use. Range 1 through 12
Get the month register from the m41t81s.
Returns the month of the year from the ds1307. The result is coverted to decimal from BCD and is
ready to use. Range 1 through 12
Definition at line 69 of file ds1307.c.
References bcd_to_dec(), ds1307_device, ds1307_month_register, i2c_read_eeprom(), m41t81s_device_addr,
and m41t81s_month_reg.
Here is the call graph for this function:
uns8 rtc_get_register (uns8 reg)
Definition at line 78 of file m41t81s.c.
References i2c_read_eeprom(), and m41t81s_device_addr.
Referenced by rtc_start_sqw_output(), and rtc_stop_sqw_output().
Here is the call graph for this function:
307
Here is the caller graph for this function:
uns8 rtc_get_seconds ()
Returns seconds from the m41t81s. The result is coverted to decimal from BCD and is ready to use.
Range - 0 through 59
Get the decoded seconds register from the m41t81s.
Returns seconds from the ds1307. The result is coverted to decimal from BCD and is ready to use.
Range - 0 through 59
Definition at line 57 of file ds1307.c.
References bcd_to_dec(), ds1307_device, ds1307_seconds_register, i2c_read_eeprom(), m41t81s_device_addr,
and m41t81s_seconds_reg.
Here is the call graph for this function:
uns8 rtc_get_year ()
Returns the year from the m41t81s. The result is coverted to decimal from BCD and is ready to use.
Range 0 through 99
308
Get the year register from the m41t81s.
Returns the year from the ds1307. The result is coverted to decimal from BCD and is ready to use.
Range 0 through 99
Definition at line 72 of file ds1307.c.
References bcd_to_dec(), ds1307_device, ds1307_year_register, i2c_read_eeprom(), m41t81s_device_addr, and
m41t81s_year_reg.
Here is the call graph for this function:
uns8 rtc_set_config (uns8 config)
Parameters:
config Value to set the config register to
Set the config register in the m41t81s.
Sets the config register in the ds1307.
Bit 7 - Out - Value on SQWE pin if not outputting square wave Bit 6 - 0 Bit 5 - 0 Bit 4 - SQWE -
Enable square wave output Bit 3 - 0 Bit 2 - 0 Bit 1 - RS1 Bit 0 - RS0
RS1/0 determin the speed of the square wave output. Set to 0/0 for 1 Hz.
Parameters:
config Value to set the config register to
Definition at line 80 of file ds1307.c.
References ds1307_control_register, ds1307_device, and i2c_write_eeprom().
Here is the call graph for this function:
309
void rtc_set_date (uns8 date)
Changes the date in the m41t81s.
Parameters:
seconds Value to set date to
Set the date register from the m41t81s.
Changes the date in the ds1307.
Parameters:
seconds Value to set date to
Definition at line 102 of file ds1307.c.
References dec_to_bcd(), ds1307_date_register, ds1307_device, i2c_write_eeprom(), m41t81s_date_reg, and
m41t81s_device_addr.
Here is the call graph for this function:
void rtc_set_day (uns8 day)
Changes the day of the week in the m41t81s.
Parameters:
seconds Value to set day to
Set the day of the week register from the m41t81s.
Changes the day of the week in the ds1307.
Parameters:
seconds Value to set day to
Definition at line 99 of file ds1307.c.
References dec_to_bcd(), ds1307_day_register, ds1307_device, i2c_write_eeprom(), m41t81s_device_addr,
and m41t81s_dow_reg.
Here is the call graph for this function:
310
void rtc_set_hours (uns8 hours)
Changes the hours in the m41t81s. Forces the m41t81s into 24 hour mode.
Set the hours register in the m41t81s.
Changes the hours in the ds1307. Forces the ds1307 into 24 hour mode.
Definition at line 110 of file ds1307.c.
References dec_to_bcd(), ds1307_device, ds1307_hours_register, i2c_read_eeprom(), i2c_write_eeprom(),
m41t81s_device_addr, and m41t81s_hours_reg.
Here is the call graph for this function:
void rtc_set_minutes (uns8 minutes)
Changes the minutes in the m41t81s.
Parameters:
seconds Value to set minutes to
Definition at line 101 of file m41t81s.c.
References dec_to_bcd(), i2c_write_eeprom(), m41t81s_device_addr, and m41t81s_minutes_reg.
Here is the call graph for this function:
void rtc_set_month (uns8 month)
Changes the month in the m41t81s.
Set the month register in the m41t81s.
Changes the month in the ds1307.
Definition at line 115 of file ds1307.c.
References dec_to_bcd(), ds1307_device, ds1307_month_register, i2c_write_eeprom(), m41t81s_device_addr,
and m41t81s_month_reg.
311
Here is the call graph for this function:
void rtc_set_register (uns8 reg, uns8 data)
Definition at line 82 of file m41t81s.c.
References i2c_write_eeprom(), and m41t81s_device_addr.
Referenced by rtc_set_sqw_freq(), rtc_start_sqw_output(), and rtc_stop_sqw_output().
Here is the call graph for this function:
Here is the caller graph for this function:
void rtc_set_seconds (uns8 seconds)
Changes the seconds in the m41t81s.
Parameters:
seconds Value to set seconds to
Set the seconds register in the m41t81s.
Changes the seconds in the ds1307.
Parameters:
seconds Value to set seconds to
312
Definition at line 106 of file ds1307.c.
References dec_to_bcd(), ds1307_device, ds1307_seconds_register, i2c_read_eeprom(), i2c_write_eeprom(),
m41t81s_device_addr, and m41t81s_seconds_reg.
Here is the call graph for this function:
void rtc_set_sqw_freq (uns8 freq)
Use one of the following self explanitory defines:
rtc_sqw_freq_32768Hz rtc_sqw_freq_8192Hz rtc_sqw_freq_4096Hz rtc_sqw_freq_2048Hz
rtc_sqw_freq_1024Hz rtc_sqw_freq_512Hz rtc_sqw_freq_256Hz rtc_sqw_freq_128Hz
rtc_sqw_freq_64Hz rtc_sqw_freq_32Hz rtc_sqw_freq_16Hz rtc_sqw_freq_8Hz rtc_sqw_freq_4Hz
rtc_sqw_freq_2Hz rtc_sqw_freq_1Hz
Note that on the m41t81s 18384Hz is not available.
Definition at line 125 of file m41t81s.c.
References m41t81s_sqw_reg, and rtc_set_register().
Here is the call graph for this function:
void rtc_set_year (uns8 year)
Changes the year in the m41t81s.
Definition at line 98 of file m41t81s.c.
References dec_to_bcd(), i2c_write_eeprom(), m41t81s_device_addr, and m41t81s_year_reg.
Here is the call graph for this function:
313
void rtc_setup_io ()
Calls i2c_setup() to configure ports and pins ready for use
Setup ports and pins for use in the m41t81s.
Calls i2c_setup() to configure ports and pins ready for use
Definition at line 119 of file ds1307.c.
References i2c_setup_io().
Here is the call graph for this function:
void rtc_start_clock ()
Resume time in the m41t81s. Also resumes the paused time that happens upon non-battery backup
start up (which allows you to read the time before "resuming" so you know how long the clock has
been running on battery back up).
If you want to do this, read the time etc before calling rtc_start_clock();
Starts the clock in the m41t81s.
Resume time in the ds1307
Definition at line 89 of file ds1307.c.
References ds1307_device, ds1307_seconds_register, i2c_read_eeprom(), i2c_write_eeprom(),
m41t81s_alarm_hour_reg, m41t81s_device_addr, and m41t81s_seconds_reg.
Here is the call graph for this function:
314
void rtc_start_sqw_output ()
Outputs desired frequency on the SQW output pin. To set the frequency, see rtc_set_sqw_freq(uns8
freq);
Definition at line 131 of file m41t81s.c.
References m41t81s_alarm_month_reg, rtc_get_register(), and rtc_set_register().
Here is the call graph for this function:
void rtc_stop_clock ()
Pauses time in the m41t81s
Stop the clock in the m41t81s.
Pauses time in the ds1307
Definition at line 85 of file ds1307.c.
References ds1307_device, ds1307_seconds_register, i2c_read_eeprom(), i2c_write_eeprom(),
m41t81s_device_addr, and m41t81s_seconds_reg.
Here is the call graph for this function:
void rtc_stop_sqw_output ()
Stops square wave output
Definition at line 136 of file m41t81s.c.
References m41t81s_alarm_month_reg, rtc_get_register(), and rtc_set_register().
Here is the call graph for this function:
315
mrf24j40.c File Reference #include "mrf24j40.h" #include "pic_utils.h" #include "spi_hw.h" #include "pic_serial.h" Include dependency graph for mrf24j40.c:
Functions
void mrf24h40_pan_association_requested ()
void mrf24j40_active_channel_scan ()
void mrf24j40_associate_to_pan ()
void mrf24j40_flush_receive_buffer ()
Flush receive buffer of mrf24j40. void mrf24j40_handle_isr ()
Interrupt service routine for mrf24j40 chip. void mrf24j40_init ()
Initialises mrf24j40 chip ready for use. void mrf24j40_init_coordinator ()
uns8 mrf24j40_long_addr_read (uns16 addr)
316
Read data from long address of memory location in mrf24j40. void mrf24j40_long_addr_write (uns16 addr,
uns8 data)
Write data to long address memory location. void mrf24j40_orphan_channel_scan ()
void mrf24j40_realign_pan ()
uns8 mrf24j40_receive (uns8 *data, uns8 bytes_to_receive)
Pull received data from buffer. uns8 mrf24j40_scan_for_lowest_channel_ed ()
Scan all channels for lowest RF energy. void mrf24j40_set_channel (uns8 channel)
Change channels. void mrf24j40_set_extended_address (uns8 *_extended_address)
Set extended address. void mrf24j40_set_pan_id (uns16 _pan_id)
Set PAN id. void mrf24j40_set_short_address (uns16 _short_address)
Set short address. void mrf24j40_setup_io ()
Setup ports/pins as inputs/outputs ready for use. uns8 mrf24j40_short_addr_read (uns8 addr)
Read data from short address of memory location in mrf24j40. void mrf24j40_short_addr_write (uns8 addr,
uns8 data)
Write data to short address memory location. void mrf24j40_start_pan ()
void mrf24j40_transmit (uns8 *data, uns8 bytes_to_transmit)
Transmit raw data. void mrf24j40_transmit_to_extended_address (uns8 frame_type, uns16 dest_pan_id, uns8
*dest_extended_address, uns8 *data, uns8 data_length, uns8 ack)
Transmit packet to extended address. void mrf24j40_transmit_to_short_address (uns8 frame_type, uns16
dest_pan_id, uns16 dest_short_address, uns8 *data, uns8 bytes_to_transmit, uns8 ack)
Transmit packet to short address. Variables
uns8 current_channel = 0
uns8 data_sequence_number
uns8 extended_address [8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
uns16 pan_id = 0xffff
uns16 short_address = 0xffff
Function Documentation
void mrf24h40_pan_association_requested ()
Definition at line 242 of file mrf24j40.c.
void mrf24j40_active_channel_scan ()
Definition at line 134 of file mrf24j40.c.
References BBREG6, BBREG6_RSSIMODE1, BBREG6_RSSIRDY, channel, data_sequence_number,
mrf24j40_long_addr_read(), mrf24j40_long_addr_write(), mrf24j40_set_channel(), mrf24j40_set_pan_id(),
mrf24j40_short_addr_read(), mrf24j40_short_addr_write(), MRF_FIRST_CHANNEL,
MRF_LAST_CHANNEL, pan_id, RSSI, RXFLUSH, RXFLUSH_BCNONLY, serial_print_int(),
serial_print_nl(), serial_print_str(), uns16, and uns8.
Here is the call graph for this function:
317
void mrf24j40_associate_to_pan ()
Definition at line 236 of file mrf24j40.c.
void mrf24j40_flush_receive_buffer ()
No need to call this routine normally, except according to mrf24j40 errata (promiscuous mode)
Definition at line 52 of file mrf24j40.c.
References mrf24j40_short_addr_read(), mrf24j40_short_addr_write(), RXFLUSH, RXFLUSH_RXFLUSH,
and uns8.
Referenced by mrf24j40_receive_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
void mrf24j40_handle_isr ()
Call this routine when the mrf24j40 indicates an interrupt condition, or called regularly.
Definition at line 287 of file mrf24j40.c.
318
References INTSTAT, INTSTAT_RXIF, INTSTAT_TXNIF, mrf24j40_receive_callback(),
mrf24j40_short_addr_read(), mrf24j40_transmit_callback(), serial_print_int_hex(), serial_print_nl(),
serial_print_str(), TXSTAT, TXSTAT_CCAFAIL, and uns8.
Here is the call graph for this function:
void mrf24j40_init ()
Sets int pin as input and cs pin as output.
Definition at line 499 of file mrf24j40.c.
References BBREG2, BBREG6, BBREG6_RSSIMODE2, CCAEDTH, data_sequence_number,
mrf24j40_long_addr_read(), mrf24j40_long_addr_write(), mrf24j40_short_addr_read(),
mrf24j40_short_addr_write(), MRF_INTCON, MRF_INTCON_RXIE, MRF_INTCON_TXNIE, PACON2,
RFCON0, RFCON1, RFCON2, RFCON3, RFCON6, RFCON7, RFCON8, RFCTL, RFSTATE, SLPCON1,
SOFTRST, TESTMODE, TXSTBL, and uns8.
Referenced by wpan_init().
Here is the call graph for this function:
Here is the caller graph for this function:
319
void mrf24j40_init_coordinator ()
Definition at line 606 of file mrf24j40.c.
References BBREG2, BBREG6, CCAEDTH, data_sequence_number, extended_address,
mrf24j40_long_addr_write(), mrf24j40_short_addr_read(), mrf24j40_short_addr_write(), MRF_INTCON,
MRF_INTCON_RXIE, MRF_INTCON_TXNIE, PACON2, RFCON0, RFCON1, RFCON2, RFCON6,
RFCON7, RFCON8, RFCTL, RXMCR, RXMCR_PANCOORD, SLPCON1, SOFTRST, TXMCR,
TXMCR_SLOTTED, TXSTBL, and uns8.
Here is the call graph for this function:
uns8 mrf24j40_long_addr_read (uns16 addr)
Returns the value in the memory location specified.
Parameters:
addr Long address memory location (see mrf24h40_defines.h)
Definition at line 749 of file mrf24j40.c.
References clear_pin, set_pin, spi_hw_receive(), spi_hw_transmit(), and uns8.
Referenced by mrf24j40_active_channel_scan(), mrf24j40_init(), mrf24j40_receive(), and
mrf24j40_scan_for_lowest_channel_ed().
Here is the call graph for this function:
320
Here is the caller graph for this function:
void mrf24j40_long_addr_write (uns16 addr, uns8 data)
Sets the memory location to the value specified
Parameters:
addr Long address memory location (see mrf24h40_defines.h)
data Value that the memory location should be set to
Definition at line 767 of file mrf24j40.c.
References clear_pin, set_pin, and spi_hw_transmit().
Referenced by mrf24j40_active_channel_scan(), mrf24j40_init(), mrf24j40_init_coordinator(),
mrf24j40_scan_for_lowest_channel_ed(), mrf24j40_set_channel(), mrf24j40_transmit(),
mrf24j40_transmit_to_extended_address(), and mrf24j40_transmit_to_short_address().
Here is the call graph for this function:
Here is the caller graph for this function:
321
void mrf24j40_orphan_channel_scan ()
Definition at line 226 of file mrf24j40.c.
void mrf24j40_realign_pan ()
Definition at line 233 of file mrf24j40.c.
uns8 mrf24j40_receive (uns8 * data, uns8 bytes_to_receive)
Once an interrupt has occured and we know it is because a packet has been received, this routine will
pull the data from the mrf receive buffer. This needs to be done quickly so that the next packet is not
lost.
Definition at line 312 of file mrf24j40.c.
References BBREG1, BBREG1_RXDECINV, mrf24j40_long_addr_read(), mrf24j40_short_addr_write(),
serial_putc(), uns16, and uns8.
Referenced by mrf24j40_receive_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 mrf24j40_scan_for_lowest_channel_ed ()
Scans through all channels and reports the channel with the lowest Energy Detection level.
Definition at line 77 of file mrf24j40.c.
References BBREG6, BBREG6_RSSIMODE1, BBREG6_RSSIMODE2, BBREG6_RSSIRDY, channel,
GPIO, mrf24j40_long_addr_read(), mrf24j40_long_addr_write(), mrf24j40_set_channel(),
mrf24j40_short_addr_read(), mrf24j40_short_addr_write(), MRF_FIRST_CHANNEL,
MRF_LAST_CHANNEL, RSSI, TESTMODE, TRISGPIO, uns16, and uns8.
Referenced by its1_controller_init().
Here is the call graph for this function:
322
Here is the caller graph for this function:
void mrf24j40_set_channel (uns8 channel)
Change to the specified channel, in the range MRF_FIRST_CHANNEL to MRF_LAST_CHANNEL.
Parameters:
channel Channel to change to.
Definition at line 63 of file mrf24j40.c.
References current_channel, mrf24j40_long_addr_write(), mrf24j40_short_addr_write(), RFCON0, and
RFCTL.
Referenced by its1_controller_init(), its1_device_process(), its2_device_process(), its2_router_init(),
mrf24j40_active_channel_scan(), and mrf24j40_scan_for_lowest_channel_ed().
Here is the call graph for this function:
Here is the caller graph for this function:
323
void mrf24j40_set_extended_address (uns8 * _extended_address)
Set IEEE 802.15.4 extended address.
Sets the 64 bit extended address of the module. Pass a pointer to an 8 byte uns8 array containing the
address.
Definition at line 259 of file mrf24j40.c.
References EADR7, extended_address, mrf24j40_short_addr_write(), serial_print_int_hex(), serial_print_nl(),
serial_print_str(), serial_putc(), and uns8.
Referenced by its1_controller_init(), and its1_device_init().
Here is the call graph for this function:
Here is the caller graph for this function:
324
void mrf24j40_set_pan_id (uns16 _pan_id)
Sets the 16 bit PAN id of the module.
Definition at line 252 of file mrf24j40.c.
References mrf24j40_short_addr_write(), pan_id, PANIDH, and PANIDL.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), its2_router_init(), and
mrf24j40_active_channel_scan().
Here is the call graph for this function:
Here is the caller graph for this function:
void mrf24j40_set_short_address (uns16 _short_address)
Sets the 16 bit short address of the module.
Definition at line 273 of file mrf24j40.c.
References mrf24j40_short_addr_write(), SADRH, SADRL, and short_address.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
Here is the call graph for this function:
Here is the caller graph for this function:
325
void mrf24j40_setup_io ()
Sets int pin as input and cs pin as output.
Definition at line 785 of file mrf24j40.c.
References make_input, make_output, and set_pin.
Referenced by wpan_setup_io().
Here is the caller graph for this function:
uns8 mrf24j40_short_addr_read (uns8 addr)
Returns the value in the memory location specified.
Parameters:
addr Short address memory location (see mrf24h40_defines.h)
Definition at line 725 of file mrf24j40.c.
References clear_pin, set_pin, spi_hw_receive(), spi_hw_transmit(), and uns8.
Referenced by mrf24j40_active_channel_scan(), mrf24j40_flush_receive_buffer(), mrf24j40_handle_isr(),
mrf24j40_init(), mrf24j40_init_coordinator(), mrf24j40_scan_for_lowest_channel_ed(), mrf24j40_transmit(),
mrf24j40_transmit_to_extended_address(), and mrf24j40_transmit_to_short_address().
Here is the call graph for this function:
Here is the caller graph for this function:
326
void mrf24j40_short_addr_write (uns8 addr, uns8 data)
Sets the memory location to the value specified
Parameters:
addr Short address memory location (see mrf24h40_defines.h)
data Value that the memory location should be set to
Definition at line 737 of file mrf24j40.c.
References clear_pin, set_pin, and spi_hw_transmit().
Referenced by mrf24j40_active_channel_scan(), mrf24j40_flush_receive_buffer(), mrf24j40_init(),
mrf24j40_init_coordinator(), mrf24j40_receive(), mrf24j40_scan_for_lowest_channel_ed(),
mrf24j40_set_channel(), mrf24j40_set_extended_address(), mrf24j40_set_pan_id(),
mrf24j40_set_short_address(), mrf24j40_transmit(), mrf24j40_transmit_to_extended_address(), and
mrf24j40_transmit_to_short_address().
Here is the call graph for this function:
Here is the caller graph for this function:
327
void mrf24j40_start_pan ()
Definition at line 229 of file mrf24j40.c.
void mrf24j40_transmit (uns8 * data, uns8 bytes_to_transmit)
Transmit a raw packet - this assumes you have already created an 802.15.4 compatible packet.
Normally you would use transmit_to_extended_adddress or transmit_to_short_address instead.
Definition at line 470 of file mrf24j40.c.
References data_sequence_number, mrf24j40_long_addr_write(), mrf24j40_short_addr_read(),
mrf24j40_short_addr_write(), TXNCON, TXNCON_TXNTRIG, and uns8.
Here is the call graph for this function:
328
void mrf24j40_transmit_to_extended_address (uns8 frame_type, uns16 dest_pan_id, uns8 * dest_extended_address, uns8 * data, uns8 data_length, uns8 ack)
Requests that the mrf24j40 transmit the packet to the specified extended address
Parameters:
frame_type 802.15.4 frame type
dest_pan_id PAN id of destination
dest_extended_address Pointer to uns8 array indicating extended address of destination
data Pointer to uns8 array of bytes to transmit
bytes_to_transmit
ack Either MRF_ACK or MRF_NO_ACK depending if you want hardware acknowledgement
Definition at line 350 of file mrf24j40.c.
References data_sequence_number, extended_address, mrf24j40_long_addr_write(),
mrf24j40_short_addr_read(), mrf24j40_short_addr_write(), pan_id, TXNCON, TXNCON_TXNACKREQ,
TXNCON_TXNTRIG, and uns8.
Referenced by its_transmit_to_ea().
Here is the call graph for this function:
Here is the caller graph for this function:
void mrf24j40_transmit_to_short_address (uns8 frame_type, uns16 dest_pan_id, uns16 dest_short_address, uns8 * data, uns8 bytes_to_transmit, uns8 ack)
Requests that the mrf24j40 transmit the packet to the specified short address
Parameters:
frame_type 802.15.4 frame type
dest_pan_id PAN id of destination
dest_short_address 16 bit short address of destination
data Pointer to uns8 array of bytes to transmit
bytes_to_transmit
ack Either MRF_ACK or MRF_NO_ACK depending if you want hardware acknowledgement
Definition at line 416 of file mrf24j40.c.
References data_sequence_number, mrf24j40_long_addr_write(), mrf24j40_short_addr_read(),
mrf24j40_short_addr_write(), pan_id, short_address, TXNCON, TXNCON_TXNACKREQ,
TXNCON_TXNTRIG, and uns8.
Referenced by its2_transmit(), and its_transmit_to_sa().
Here is the call graph for this function:
329
Here is the caller graph for this function:
Variable Documentation
uns8 current_channel = 0
Definition at line 49 of file mrf24j40.c.
Referenced by mrf24j40_set_channel().
uns8 data_sequence_number
Definition at line 45 of file mrf24j40.c.
Referenced by mrf24j40_active_channel_scan(), mrf24j40_init(), mrf24j40_init_coordinator(),
mrf24j40_transmit(), mrf24j40_transmit_to_extended_address(), and mrf24j40_transmit_to_short_address().
uns8 extended_address[8] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
Definition at line 47 of file mrf24j40.c.
Referenced by mrf24j40_init_coordinator(), mrf24j40_set_extended_address(), and
mrf24j40_transmit_to_extended_address().
uns16 pan_id = 0xffff
Definition at line 46 of file mrf24j40.c.
330
Referenced by mrf24j40_active_channel_scan(), mrf24j40_set_pan_id(),
mrf24j40_transmit_to_extended_address(), and mrf24j40_transmit_to_short_address().
uns16 short_address = 0xffff
Definition at line 48 of file mrf24j40.c.
Referenced by mrf24j40_set_short_address(), and mrf24j40_transmit_to_short_address().
mrf24j40.h File Reference
Microchip mrf24j40 IEEE 802.15.4 module routines. #include "pic_utils.h" #include "config.h" #include "mrf24j40_defines.h" Include dependency graph for mrf24j40.h:
This graph shows which files directly or indirectly include this file:
Defines
#define LOC_CANADA 0x02
#define LOC_EUROPE 0x03
331
#define LOC_UNDEFINED 0x00
#define LOC_UNITED_STATES 0x01
#define MRF_ACK 1
#define MRF_FIRST_CHANNEL 11
#define MRF_LAST_CHANNEL 26
#define MRF_NO_ACK 0
Functions
void mrf24j40_flush_receive_buffer ()
Flush receive buffer of mrf24j40. void mrf24j40_handle_isr ()
Interrupt service routine for mrf24j40 chip. void mrf24j40_init ()
Initialises mrf24j40 chip ready for use. uns8 mrf24j40_long_addr_read (uns16 addr)
Read data from long address of memory location in mrf24j40. void mrf24j40_long_addr_write (uns16 addr,
uns8 data)
Write data to long address memory location. uns8 mrf24j40_receive (uns8 *data, uns8 bytes_to_receive)
Pull received data from buffer. void mrf24j40_receive_callback ()
Callback is actioned when mrf24j40 has a packet received off air. uns8 mrf24j40_scan_for_lowest_channel_ed
()
Scan all channels for lowest RF energy. void mrf24j40_set_channel (uns8 channel)
Change channels. void mrf24j40_set_extended_address (uns8 *_extended_address)
Set IEEE 802.15.4 extended address. void mrf24j40_set_pan_id (uns16 _pan_id)
Set PAN id. void mrf24j40_set_short_address (uns16 _short_address)
Set short address. void mrf24j40_setup_io ()
Setup ports/pins as inputs/outputs ready for use. uns8 mrf24j40_short_addr_read (uns8 addr)
Read data from short address of memory location in mrf24j40. void mrf24j40_short_addr_write (uns8 addr,
uns8 data)
Write data to short address memory location. void mrf24j40_transmit (uns8 *data, uns8 bytes_to_transmit)
Transmit raw data. void mrf24j40_transmit_callback (uns8 status, uns8 retries, uns8 channel_busy)
Callback is actioned when mrf24j40 has finished transmitting a packet, or failed to do so. void
mrf24j40_transmit_to_extended_address (uns8 frame_type, uns16 dest_pan_id, uns8 *dest_extended_address,
uns8 *data, uns8 data_length, uns8 ack)
Transmit packet to extended address. void mrf24j40_transmit_to_short_address (uns8 frame_type, uns16
dest_pan_id, uns16 dest_short_address, uns8 *data, uns8 bytes_to_transmit, uns8 ack)
Transmit packet to short address.
Detailed Description
Definition in file mrf24j40.h.
Define Documentation
#define LOC_CANADA 0x02
Module located in Canada (?? power)
Definition at line 99 of file mrf24j40.h.
#define LOC_EUROPE 0x03
Module located in Europe (-14.9dB power)
Definition at line 101 of file mrf24j40.h.
332
#define LOC_UNDEFINED 0x00
Module located in undefined location (full power)
Definition at line 95 of file mrf24j40.h.
#define LOC_UNITED_STATES 0x01
Module located in United States (?? power)
Definition at line 97 of file mrf24j40.h.
#define MRF_ACK 1
Send mrf packet and request acknowledgement
Definition at line 90 of file mrf24j40.h.
Referenced by its2_transmit(), and its_transmit_to_sa().
#define MRF_FIRST_CHANNEL 11
First available mrf channel
Definition at line 85 of file mrf24j40.h.
Referenced by its1_device_process(), its2_device_process(), mrf24j40_active_channel_scan(), and
mrf24j40_scan_for_lowest_channel_ed().
#define MRF_LAST_CHANNEL 26
Last availablre mrf channel
Definition at line 87 of file mrf24j40.h.
Referenced by its1_device_process(), its2_device_process(), mrf24j40_active_channel_scan(), and
mrf24j40_scan_for_lowest_channel_ed().
#define MRF_NO_ACK 0
Send mrf packet without acknowledgement
Definition at line 92 of file mrf24j40.h.
Referenced by its2_transmit(), and its_transmit_to_ea().
Function Documentation
void mrf24j40_flush_receive_buffer ()
No need to call this routine normally, except according to mrf24j40 errata (promiscuous mode)
Definition at line 52 of file mrf24j40.c.
References mrf24j40_short_addr_read(), mrf24j40_short_addr_write(), RXFLUSH, RXFLUSH_RXFLUSH,
and uns8.
Referenced by mrf24j40_receive_callback().
Here is the call graph for this function:
333
Here is the caller graph for this function:
void mrf24j40_handle_isr ()
Call this routine when the mrf24j40 indicates an interrupt condition, or called regularly.
Definition at line 287 of file mrf24j40.c.
References INTSTAT, INTSTAT_RXIF, INTSTAT_TXNIF, mrf24j40_receive_callback(),
mrf24j40_short_addr_read(), mrf24j40_transmit_callback(), serial_print_int_hex(), serial_print_nl(),
serial_print_str(), TXSTAT, TXSTAT_CCAFAIL, and uns8.
Here is the call graph for this function:
void mrf24j40_init ()
Sets int pin as input and cs pin as output.
Definition at line 499 of file mrf24j40.c.
References BBREG2, BBREG6, BBREG6_RSSIMODE2, CCAEDTH, data_sequence_number,
mrf24j40_long_addr_read(), mrf24j40_long_addr_write(), mrf24j40_short_addr_read(),
mrf24j40_short_addr_write(), MRF_INTCON, MRF_INTCON_RXIE, MRF_INTCON_TXNIE, PACON2,
RFCON0, RFCON1, RFCON2, RFCON3, RFCON6, RFCON7, RFCON8, RFCTL, RFSTATE, SLPCON1,
SOFTRST, TESTMODE, TXSTBL, and uns8.
Referenced by wpan_init().
Here is the call graph for this function:
334
Here is the caller graph for this function:
uns8 mrf24j40_long_addr_read (uns16 addr)
Returns the value in the memory location specified.
Parameters:
addr Long address memory location (see mrf24h40_defines.h)
Definition at line 749 of file mrf24j40.c.
References clear_pin, set_pin, spi_hw_receive(), spi_hw_transmit(), and uns8.
Referenced by mrf24j40_active_channel_scan(), mrf24j40_init(), mrf24j40_receive(), and
mrf24j40_scan_for_lowest_channel_ed().
Here is the call graph for this function:
Here is the caller graph for this function:
335
void mrf24j40_long_addr_write (uns16 addr, uns8 data)
Sets the memory location to the value specified
Parameters:
addr Long address memory location (see mrf24h40_defines.h)
data Value that the memory location should be set to
Definition at line 767 of file mrf24j40.c.
References clear_pin, set_pin, and spi_hw_transmit().
Referenced by mrf24j40_active_channel_scan(), mrf24j40_init(), mrf24j40_init_coordinator(),
mrf24j40_scan_for_lowest_channel_ed(), mrf24j40_set_channel(), mrf24j40_transmit(),
mrf24j40_transmit_to_extended_address(), and mrf24j40_transmit_to_short_address().
Here is the call graph for this function:
Here is the caller graph for this function:
336
uns8 mrf24j40_receive (uns8 * data, uns8 bytes_to_receive)
Once an interrupt has occured and we know it is because a packet has been received, this routine will
pull the data from the mrf receive buffer. This needs to be done quickly so that the next packet is not
lost.
Definition at line 312 of file mrf24j40.c.
References BBREG1, BBREG1_RXDECINV, mrf24j40_long_addr_read(), mrf24j40_short_addr_write(),
serial_putc(), uns16, and uns8.
Referenced by mrf24j40_receive_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
void mrf24j40_receive_callback ()
Callback indicating the mrf24j40 has a packet ready.
Definition at line 56 of file wpan.c.
References debug_int, debug_str, mrf24j40_flush_receive_buffer(), mrf24j40_receive(), pkt_received,
receive_lost, serial_putc(), wpan_rx_buffer, and wpan_rx_count.
Referenced by mrf24j40_handle_isr().
Here is the call graph for this function:
Here is the caller graph for this function:
337
uns8 mrf24j40_scan_for_lowest_channel_ed ()
Scans through all channels and reports the channel with the lowest Energy Detection level.
Definition at line 77 of file mrf24j40.c.
References BBREG6, BBREG6_RSSIMODE1, BBREG6_RSSIMODE2, BBREG6_RSSIRDY, channel,
GPIO, mrf24j40_long_addr_read(), mrf24j40_long_addr_write(), mrf24j40_set_channel(),
mrf24j40_short_addr_read(), mrf24j40_short_addr_write(), MRF_FIRST_CHANNEL,
MRF_LAST_CHANNEL, RSSI, TESTMODE, TRISGPIO, uns16, and uns8.
Referenced by its1_controller_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void mrf24j40_set_channel (uns8 channel)
Change to the specified channel, in the range MRF_FIRST_CHANNEL to MRF_LAST_CHANNEL.
Parameters:
channel Channel to change to.
Definition at line 63 of file mrf24j40.c.
References current_channel, mrf24j40_long_addr_write(), mrf24j40_short_addr_write(), RFCON0, and
RFCTL.
Referenced by its1_controller_init(), its1_device_process(), its2_device_process(), its2_router_init(),
mrf24j40_active_channel_scan(), and mrf24j40_scan_for_lowest_channel_ed().
Here is the call graph for this function:
Here is the caller graph for this function:
338
void mrf24j40_set_extended_address (uns8 * _extended_address)
Set extended address.
Pass a pointer to an 8 byte uns8 array with the address embedded as MSB leftmost byte and LSB
rightmost byte, eg
uns8 EA_3[8] = { 0, 0, 0, 0, 0, 0, 0, 3 };
Set extended address to 0x0000000000000003 (64 bit address)
mrf24j40_set_extended_address(&EA_3);
Sets the 64 bit extended address of the module. Pass a pointer to an 8 byte uns8 array containing the
address.
Set IEEE 802.15.4 extended address.
Sets the 64 bit extended address of the module. Pass a pointer to an 8 byte uns8 array containing the
address.
Definition at line 259 of file mrf24j40.c.
References EADR7, extended_address, mrf24j40_short_addr_write(), serial_print_int_hex(), serial_print_nl(),
serial_print_str(), serial_putc(), and uns8.
Referenced by its1_controller_init(), and its1_device_init().
Here is the call graph for this function:
339
Here is the caller graph for this function:
void mrf24j40_set_pan_id (uns16 _pan_id)
Sets the 16 bit PAN id of the module.
Definition at line 252 of file mrf24j40.c.
References mrf24j40_short_addr_write(), pan_id, PANIDH, and PANIDL.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), its2_router_init(), and
mrf24j40_active_channel_scan().
Here is the call graph for this function:
Here is the caller graph for this function:
340
void mrf24j40_set_short_address (uns16 _short_address)
Sets the 16 bit short address of the module.
Definition at line 273 of file mrf24j40.c.
References mrf24j40_short_addr_write(), SADRH, SADRL, and short_address.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void mrf24j40_setup_io ()
Sets int pin as input and cs pin as output.
Definition at line 785 of file mrf24j40.c.
References make_input, make_output, and set_pin.
Referenced by wpan_setup_io().
Here is the caller graph for this function:
341
uns8 mrf24j40_short_addr_read (uns8 addr)
Returns the value in the memory location specified.
Parameters:
addr Short address memory location (see mrf24h40_defines.h)
Definition at line 725 of file mrf24j40.c.
References clear_pin, set_pin, spi_hw_receive(), spi_hw_transmit(), and uns8.
Referenced by mrf24j40_active_channel_scan(), mrf24j40_flush_receive_buffer(), mrf24j40_handle_isr(),
mrf24j40_init(), mrf24j40_init_coordinator(), mrf24j40_scan_for_lowest_channel_ed(), mrf24j40_transmit(),
mrf24j40_transmit_to_extended_address(), and mrf24j40_transmit_to_short_address().
Here is the call graph for this function:
Here is the caller graph for this function:
void mrf24j40_short_addr_write (uns8 addr, uns8 data)
Sets the memory location to the value specified
342
Parameters:
addr Short address memory location (see mrf24h40_defines.h)
data Value that the memory location should be set to
Definition at line 737 of file mrf24j40.c.
References clear_pin, set_pin, and spi_hw_transmit().
Referenced by mrf24j40_active_channel_scan(), mrf24j40_flush_receive_buffer(), mrf24j40_init(),
mrf24j40_init_coordinator(), mrf24j40_receive(), mrf24j40_scan_for_lowest_channel_ed(),
mrf24j40_set_channel(), mrf24j40_set_extended_address(), mrf24j40_set_pan_id(),
mrf24j40_set_short_address(), mrf24j40_transmit(), mrf24j40_transmit_to_extended_address(), and
mrf24j40_transmit_to_short_address().
Here is the call graph for this function:
Here is the caller graph for this function:
void mrf24j40_transmit (uns8 * data, uns8 bytes_to_transmit)
Transmit a raw packet - this assumes you have already created an 802.15.4 compatible packet.
Normally you would use transmit_to_extended_adddress or transmit_to_short_address instead.
Definition at line 470 of file mrf24j40.c.
References data_sequence_number, mrf24j40_long_addr_write(), mrf24j40_short_addr_read(),
mrf24j40_short_addr_write(), TXNCON, TXNCON_TXNTRIG, and uns8.
Here is the call graph for this function:
343
void mrf24j40_transmit_callback (uns8 status, uns8 retries, uns8 channel_busy)
Callback indicating the mrf24j40 has finished the transmission sequence.
Parameters:
status Set to 0 for success or 1 for failure
retries Set to the number of retries
channel_busy Set to 1 if failure was due to the channel being busy.
Definition at line 75 of file wpan.c.
References debug_int, debug_str, and wpan_data_transmitted_callback().
Referenced by mrf24j40_handle_isr().
Here is the call graph for this function:
Here is the caller graph for this function:
void mrf24j40_transmit_to_extended_address (uns8 frame_type, uns16 dest_pan_id, uns8 * dest_extended_address, uns8 * data, uns8 data_length, uns8 ack)
Requests that the mrf24j40 transmit the packet to the specified extended address
Parameters:
frame_type 802.15.4 frame type
dest_pan_id PAN id of destination
dest_extended_address Pointer to uns8 array indicating extended address of destination
data Pointer to uns8 array of bytes to transmit
bytes_to_transmit
ack Either MRF_ACK or MRF_NO_ACK depending if you want hardware acknowledgement
Definition at line 350 of file mrf24j40.c.
References data_sequence_number, extended_address, mrf24j40_long_addr_write(),
mrf24j40_short_addr_read(), mrf24j40_short_addr_write(), pan_id, TXNCON, TXNCON_TXNACKREQ,
TXNCON_TXNTRIG, and uns8.
Referenced by its_transmit_to_ea().
Here is the call graph for this function:
344
Here is the caller graph for this function:
void mrf24j40_transmit_to_short_address (uns8 frame_type, uns16 dest_pan_id, uns16 dest_short_address, uns8 * data, uns8 bytes_to_transmit, uns8 ack)
Requests that the mrf24j40 transmit the packet to the specified short address
Parameters:
frame_type 802.15.4 frame type
dest_pan_id PAN id of destination
dest_short_address 16 bit short address of destination
data Pointer to uns8 array of bytes to transmit
bytes_to_transmit
ack Either MRF_ACK or MRF_NO_ACK depending if you want hardware acknowledgement
Definition at line 416 of file mrf24j40.c.
References data_sequence_number, mrf24j40_long_addr_write(), mrf24j40_short_addr_read(),
mrf24j40_short_addr_write(), pan_id, short_address, TXNCON, TXNCON_TXNACKREQ,
TXNCON_TXNTRIG, and uns8.
Referenced by its2_transmit(), and its_transmit_to_sa().
Here is the call graph for this function:
Here is the caller graph for this function:
345
mrf24j40_defines.h File Reference
Defines for MRF24J40 chip - generated from the datasheet. This graph shows which files directly or indirectly include this file:
Defines
#define ACKTMOUT 0x12
#define ACKTMOUT_DRPACK 7
#define ACKTMOUT_MAWD0 0
#define ACKTMOUT_MAWD1 1
#define ACKTMOUT_MAWD2 2
#define ACKTMOUT_MAWD3 3
#define ACKTMOUT_MAWD4 4
#define ACKTMOUT_MAWD5 5
#define ACKTMOUT_MAWD6 6
346
#define ASSOEADR0 0x230
#define ASSOEADR1 0x231
#define ASSOEADR2 0x232
#define ASSOEADR3 0x233
#define ASSOEADR4 0x234
#define ASSOEADR5 0x235
#define ASSOEADR6 0x236
#define ASSOEADR7 0x237
#define ASSOSADR0 0x238
#define ASSOSADR1 0x239
#define BBREG0 0x38
#define BBREG0_TURBO 0
#define BBREG1 0x39
#define BBREG1_RXDECINV 2
#define BBREG2 0x3A
#define BBREG2_CCACSTH0 2
#define BBREG2_CCACSTH1 3
#define BBREG2_CCACSTH2 4
#define BBREG2_CCACSTH3 5
#define BBREG2_CCAMODE0 6
#define BBREG2_CCAMODE1 7
#define BBREG3 0x3B
#define BBREG3_PREDETTH0 1
#define BBREG3_PREDETTH1 2
#define BBREG3_PREDETTH2 3
#define BBREG3_PREVALIDTH0 4
#define BBREG3_PREVALIDTH1 5
#define BBREG3_PREVALIDTH2 6
#define BBREG3_PREVALIDTH3 7
#define BBREG4 0x3C
#define BBREG4_CSTH0 5
#define BBREG4_CSTH1 6
#define BBREG4_CSTH2 7
#define BBREG4_PRECNT0 2
#define BBREG4_PRECNT1 3
#define BBREG4_PRECNT2 4
#define BBREG6 0x3E
#define BBREG6_RSSIMODE1 7
#define BBREG6_RSSIMODE2 6
#define BBREG6_RSSIRDY 0
#define CCAEDTH 0x3F
#define CCAEDTH_CCAEDTH0 0
#define CCAEDTH_CCAEDTH1 1
#define CCAEDTH_CCAEDTH2 2
#define CCAEDTH_CCAEDTH3 3
#define CCAEDTH_CCAEDTH4 4
#define CCAEDTH_CCAEDTH5 5
#define CCAEDTH_CCAEDTH6 6
#define CCAEDTH_CCAEDTH7 7
#define EADR0 0x05
#define EADR1 0x06
#define EADR2 0x07
#define EADR3 0x08
347
#define EADR4 0x09
#define EADR5 0x0A
#define EADR6 0x0B
#define EADR7 0x0C
#define ESLOTG1 0x13
#define ESLOTG23 0x1E
#define ESLOTG45 0x1F
#define ESLOTG67 0x20
#define FRMOFFSET 0x23
#define FRMOFFSET_OFFSET0 0
#define FRMOFFSET_OFFSET1 1
#define FRMOFFSET_OFFSET2 2
#define FRMOFFSET_OFFSET3 3
#define FRMOFFSET_OFFSET4 4
#define FRMOFFSET_OFFSET5 5
#define FRMOFFSET_OFFSET6 6
#define FRMOFFSET_OFFSET7 7
#define GATECLK 0x26
#define GATECLK_GTSON 3
#define GPIO 0x33
#define GPIO_GPIO0 0
#define GPIO_GPIO1 1
#define GPIO_GPIO2 2
#define GPIO_GPIO3 3
#define GPIO_GPIO4 4
#define GPIO_GPIO5 5
#define HSYMTMRH 0x29
#define HSYMTMRH_HSYMTMR08 0
#define HSYMTMRH_HSYMTMR09 1
#define HSYMTMRH_HSYMTMR10 2
#define HSYMTMRH_HSYMTMR11 3
#define HSYMTMRH_HSYMTMR12 4
#define HSYMTMRH_HSYMTMR13 5
#define HSYMTMRH_HSYMTMR14 6
#define HSYMTMRH_HSYMTMR15 7
#define HSYMTMRL 0x28
#define HSYMTMRL_HSYMTMR0 0
#define HSYMTMRL_HSYMTMR1 1
#define HSYMTMRL_HSYMTMR2 2
#define HSYMTMRL_HSYMTMR3 3
#define HSYMTMRL_HSYMTMR4 4
#define HSYMTMRL_HSYMTMR5 5
#define HSYMTMRL_HSYMTMR6 6
#define HSYMTMRL_HSYMTMR7 7
#define INTSTAT 0x31
#define INTSTAT_HSYMTMRIF 5
#define INTSTAT_RXIF 3
#define INTSTAT_SECIF 4
#define INTSTAT_SLPIF 7
#define INTSTAT_TXG1IF 1
#define INTSTAT_TXG2IF 2
#define INTSTAT_TXNIF 0
#define INTSTAT_WAKEIF 6
348
#define MAINCNT0 0x226
#define MAINCNT0_MAINCNT0 0
#define MAINCNT0_MAINCNT1 1
#define MAINCNT0_MAINCNT2 2
#define MAINCNT0_MAINCNT3 3
#define MAINCNT0_MAINCNT4 4
#define MAINCNT0_MAINCNT5 5
#define MAINCNT0_MAINCNT6 6
#define MAINCNT0_MAINCNT7 7
#define MAINCNT1 0x227
#define MAINCNT1_MAINCNT10 2
#define MAINCNT1_MAINCNT11 3
#define MAINCNT1_MAINCNT12 4
#define MAINCNT1_MAINCNT13 5
#define MAINCNT1_MAINCNT14 6
#define MAINCNT1_MAINCNT15 7
#define MAINCNT1_MAINCNT8 0
#define MAINCNT1_MAINCNT9 1
#define MAINCNT2 0x228
#define MAINCNT2_MAINCNT16 0
#define MAINCNT2_MAINCNT17 1
#define MAINCNT2_MAINCNT18 2
#define MAINCNT2_MAINCNT19 3
#define MAINCNT2_MAINCNT20 4
#define MAINCNT2_MAINCNT21 5
#define MAINCNT2_MAINCNT22 6
#define MAINCNT2_MAINCNT23 7
#define MAINCNT3 0x229
#define MAINCNT3_MAINCNT24 0
#define MAINCNT3_MAINCNT25 1
#define MAINCNT3_STARTCNT 7
#define MRF_INTCON 0x32
#define MRF_INTCON_HSYMTMRIE 5
#define MRF_INTCON_RXIE 3
#define MRF_INTCON_SECIE 4
#define MRF_INTCON_SLPIE 7
#define MRF_INTCON_TXG1IE 1
#define MRF_INTCON_TXG2IE 2
#define MRF_INTCON_TXNIE 0
#define MRF_INTCON_WAKEIE 6
#define ORDER 0x10
#define ORDER_BO0 4
#define ORDER_BO1 5
#define ORDER_BO2 6
#define ORDER_BO3 7
#define ORDER_SO0 0
#define ORDER_SO1 1
#define ORDER_SO2 2
#define ORDER_SO3 3
#define PACON0 0x16
#define PACON0_PAONT0 0
#define PACON0_PAONT1 1
#define PACON0_PAONT2 2
349
#define PACON0_PAONT3 3
#define PACON0_PAONT4 4
#define PACON0_PAONT5 5
#define PACON0_PAONT6 6
#define PACON0_PAONT7 7
#define PACON1 0x17
#define PACON1_PAONT8 0
#define PACON1_PAONTS0 1
#define PACON1_PAONTS1 2
#define PACON1_PAONTS2 3
#define PACON1_PAONTS3 4
#define PACON2 0x18
#define PACON2_FIFOEN 7
#define PACON2_TXONT7 0
#define PACON2_TXONT8 1
#define PACON2_TXONTS0 2
#define PACON2_TXONTS1 3
#define PACON2_TXONTS2 4
#define PACON2_TXONTS3 5
#define PANIDH 0x02
#define PANIDL 0x01
#define REMCNTH 0x225
#define REMCNTH_REMCNT10 2
#define REMCNTH_REMCNT11 3
#define REMCNTH_REMCNT12 4
#define REMCNTH_REMCNT13 5
#define REMCNTH_REMCNT14 6
#define REMCNTH_REMCNT15 7
#define REMCNTH_REMCNT8 0
#define REMCNTH_REMCNT9 1
#define REMCNTL 0x224
#define REMCNTL_REMCNT0 0
#define REMCNTL_REMCNT1 1
#define REMCNTL_REMCNT2 2
#define REMCNTL_REMCNT3 3
#define REMCNTL_REMCNT4 4
#define REMCNTL_REMCNT5 5
#define REMCNTL_REMCNT6 6
#define REMCNTL_REMCNT7 7
#define RFCON0 0x200
#define RFCON0_CHANNEL0 4
#define RFCON0_CHANNEL1 5
#define RFCON0_CHANNEL2 6
#define RFCON0_CHANNEL3 7
#define RFCON0_RFOPT0 0
#define RFCON0_RFOPT1 1
#define RFCON0_RFOPT2 2
#define RFCON0_RFOPT3 3
#define RFCON1 0x201
#define RFCON1_VCOOPT0 0
#define RFCON1_VCOOPT1 1
#define RFCON1_VCOOPT2 2
#define RFCON1_VCOOPT3 3
350
#define RFCON1_VCOOPT4 4
#define RFCON1_VCOOPT5 5
#define RFCON1_VCOOPT6 6
#define RFCON1_VCOOPT7 7
#define RFCON2 0x202
#define RFCON2_PLLEN 7
#define RFCON3 0x203
#define RFCON3_TXPWRL0 6
#define RFCON3_TXPWRL1 7
#define RFCON3_TXPWRS0 3
#define RFCON3_TXPWRS1 4
#define RFCON3_TXPWRS2 5
#define RFCON5 0x205
#define RFCON5_BATTH0 4
#define RFCON5_BATTH1 5
#define RFCON5_BATTH2 6
#define RFCON5_BATTH3 7
#define RFCON6 0x206
#define RFCON6_20MRECVR 4
#define RFCON6_BATEN 3
#define RFCON6_TXFIL 7
#define RFCON7 0x207
#define RFCON7_CLKOUTMODE0 0
#define RFCON7_CLKOUTMODE1 1
#define RFCON7_SLPCLKSEL0 6
#define RFCON7_SLPCLKSEL1 7
#define RFCON8 0x208
#define RFCON8_RFVCO 4
#define RFCTL 0x36
#define RFCTL_RFRST 2
#define RFCTL_WAKECNT7 3
#define RFCTL_WAKECNT8 4
#define RFSTATE 0x20F
#define RFSTATE_RFSTATE0 5
#define RFSTATE_RFSTATE1 6
#define RFSTATE_RFSTATE2 7
#define RSSI 0x210
#define RSSI_RSSI0 0
#define RSSI_RSSI1 1
#define RSSI_RSSI2 2
#define RSSI_RSSI3 3
#define RSSI_RSSI4 4
#define RSSI_RSSI5 5
#define RSSI_RSSI6 6
#define RSSI_RSSI7 7
#define RXFLUSH 0x0D
#define RXFLUSH_BCNONLY 1
#define RXFLUSH_CMDONLY 3
#define RXFLUSH_DATAONLY 2
#define RXFLUSH_RXFLUSH 0
#define RXFLUSH_WAKEPAD 5
#define RXFLUSH_WAKEPOL 6
#define RXMCR 0x00
351
#define RXMCR_COORD 2
#define RXMCR_ERRPKT 1
#define RXMCR_NOACKRSP 5
#define RXMCR_PANCOORD 3
#define RXMCR_PROMI 0
#define RXSR 0x30
#define RXSR_BATIND 5
#define RXSR_UPSECERR 6
#define SADRH 0x04
#define SADRL 0x03
#define SECCON0 0x2C
#define SECCON0_RXCIPHER0 3
#define SECCON0_RXCIPHER1 4
#define SECCON0_RXCIPHER2 5
#define SECCON0_SECIGNORE 7
#define SECCON0_SECSTART 6
#define SECCON0_TXNCIPHER0 0
#define SECCON0_TXNCIPHER1 1
#define SECCON0_TXNCIPHER2 2
#define SECCON1 0x2D
#define SECCON1_DISDEC 1
#define SECCON1_DISENC 0
#define SECCON1_TXBCIPHER0 4
#define SECCON1_TXBCIPHER1 5
#define SECCON1_TXBCIPHER2 6
#define SECCR2 0x37
#define SECCR2_TXG1CIPHER0 0
#define SECCR2_TXG1CIPHER1 1
#define SECCR2_TXG1CIPHER2 2
#define SECCR2_TXG2CIPHER0 3
#define SECCR2_TXG2CIPHER1 4
#define SECCR2_TXG2CIPHER2 5
#define SECCR2_UPDEC 7
#define SECCR2_UPENC 6
#define SLPACK 0x35
#define SLPACK_SLPACK 7
#define SLPACK_WAKECNT0 0
#define SLPACK_WAKECNT1 1
#define SLPACK_WAKECNT2 2
#define SLPACK_WAKECNT3 3
#define SLPACK_WAKECNT4 4
#define SLPACK_WAKECNT5 5
#define SLPACK_WAKECNT6 6
#define SLPCAL0 0x209
#define SLPCAL0_SLPCAL0 0
#define SLPCAL0_SLPCAL1 1
#define SLPCAL0_SLPCAL2 2
#define SLPCAL0_SLPCAL3 3
#define SLPCAL0_SLPCAL4 4
#define SLPCAL0_SLPCAL5 5
#define SLPCAL0_SLPCAL6 6
#define SLPCAL0_SLPCAL7 7
#define SLPCAL1 0x20A
352
#define SLPCAL1_SLPCAL10 2
#define SLPCAL1_SLPCAL11 3
#define SLPCAL1_SLPCAL12 4
#define SLPCAL1_SLPCAL13 5
#define SLPCAL1_SLPCAL14 6
#define SLPCAL1_SLPCAL15 7
#define SLPCAL1_SLPCAL8 0
#define SLPCAL1_SLPCAL9 1
#define SLPCAL2 0x20B
#define SLPCAL2_SLPCAL16 0
#define SLPCAL2_SLPCAL17 1
#define SLPCAL2_SLPCAL18 2
#define SLPCAL2_SLPCAL19 3
#define SLPCAL2_SLPCALEN 4
#define SLPCAL2_SLPCALRDY 7
#define SLPCON0 0x211
#define SLPCON0_INTEDGE 1
#define SLPCON0_SLPCLKEN 0
#define SLPCON1 0x220
#define SLPCON1_CLKOUTEN 5
#define SLPCON1_SLPCLKDIV0 0
#define SLPCON1_SLPCLKDIV1 1
#define SLPCON1_SLPCLKDIV2 2
#define SLPCON1_SLPCLKDIV3 3
#define SLPCON1_SLPCLKDIV4 4
#define SOFTRST 0x2A
#define SOFTRST_RSTBB 1
#define SOFTRST_RSTMAC 0
#define SOFTRST_RSTPWR 2
#define SYMTICKH 0x15
#define SYMTICKH_TICKP8 0
#define SYMTICKH_TXONT0 1
#define SYMTICKH_TXONT1 2
#define SYMTICKH_TXONT2 3
#define SYMTICKH_TXONT3 4
#define SYMTICKH_TXONT4 5
#define SYMTICKH_TXONT5 6
#define SYMTICKH_TXONT6 7
#define SYMTICKL 0x14
#define SYMTICKL_TICKP0 0
#define SYMTICKL_TICKP1 1
#define SYMTICKL_TICKP2 2
#define SYMTICKL_TICKP3 3
#define SYMTICKL_TICKP4 4
#define SYMTICKL_TICKP5 5
#define SYMTICKL_TICKP6 6
#define SYMTICKL_TICKP7 7
#define TESTMODE 0x22F
#define TESTMODE_RSSIWAIT0 3
#define TESTMODE_RSSIWAIT1 4
#define TESTMODE_TESTMODE0 0
#define TESTMODE_TESTMODE1 1
#define TESTMODE_TESTMODE2 2
353
#define TRISGPIO 0x34
#define TRISGPIO_TRISGP0 0
#define TRISGPIO_TRISGP1 1
#define TRISGPIO_TRISGP2 2
#define TRISGPIO_TRISGP3 3
#define TRISGPIO_TRISGP4 4
#define TRISGPIO_TRISGP5 5
#define TXBCON0 0x1A
#define TXBCON0_TXBSECEN 1
#define TXBCON0_TXBTRIG 0
#define TXBCON1 0x25
#define TXG1CON 0x1C
#define TXG1CON_TXG1ACKREQ 2
#define TXG1CON_TXG1RETRY0 6
#define TXG1CON_TXG1RETRY1 7
#define TXG1CON_TXG1SECEN 1
#define TXG1CON_TXG1SLOT0 3
#define TXG1CON_TXG1SLOT1 4
#define TXG1CON_TXG1SLOT2 5
#define TXG1CON_TXG1TRIG 0
#define TXG2CON 0x1D
#define TXG2CON_TXG2ACKREQ 2
#define TXG2CON_TXG2RETRY0 6
#define TXG2CON_TXG2RETRY1 7
#define TXG2CON_TXG2SECEN 1
#define TXG2CON_TXG2SLOT0 3
#define TXG2CON_TXG2SLOT1 4
#define TXG2CON_TXG2SLOT2 5
#define TXG2CON_TXG2TRIG 0
#define TXMCR 0x11
#define TXMCR_BATLIFEXT 6
#define TXMCR_CSMABF0 0
#define TXMCR_CSMABF1 1
#define TXMCR_CSMABF2 2
#define TXMCR_MACMINBE0 3
#define TXMCR_MACMINBE1 4
#define TXMCR_NOCSMA 7
#define TXMCR_SLOTTED 5
#define TXNCON 0x1B
#define TXNCON_FPSTAT 4
#define TXNCON_INDIRECT 3
#define TXNCON_TXNACKREQ 2
#define TXNCON_TXNSECEN 1
#define TXNCON_TXNTRIG 0
#define TXPEND 0x21
#define TXPEND_FPACK 0
#define TXPEND_GTSSWITCH 1
#define TXPEND_MLIFS0 2
#define TXPEND_MLIFS1 3
#define TXPEND_MLIFS2 4
#define TXPEND_MLIFS3 5
#define TXPEND_MLIFS4 6
#define TXPEND_MLIFS5 7
354
#define TXSTAT 0x24
#define TXSTAT_CCAFAIL 5
#define TXSTAT_TXG1FNT 3
#define TXSTAT_TXG1STAT 1
#define TXSTAT_TXG2FNT 4
#define TXSTAT_TXG2STAT 2
#define TXSTAT_TXNRETRY0 6
#define TXSTAT_TXNRETRY1 7
#define TXSTAT_TXNSTAT 0
#define TXSTBL 0x2E
#define TXSTBL_MSIFS0 0
#define TXSTBL_MSIFS1 1
#define TXSTBL_MSIFS2 2
#define TXSTBL_MSIFS3 3
#define TXSTBL_RFSTBL0 4
#define TXSTBL_RFSTBL1 5
#define TXSTBL_RFSTBL2 6
#define TXSTBL_RFSTBL3 7
#define TXTIME 0x27
#define TXTIME_TURNTIME0 4
#define TXTIME_TURNTIME1 5
#define TXTIME_TURNTIME2 6
#define TXTIME_TURNTIME3 7
#define UPNONCE0 0x240
#define UPNONCE1 0x241
#define UPNONCE10 0x24A
#define UPNONCE11 0x24B
#define UPNONCE12 0x24C
#define UPNONCE2 0x242
#define UPNONCE3 0x243
#define UPNONCE4 0x244
#define UPNONCE5 0x245
#define UPNONCE6 0x246
#define UPNONCE7 0x247
#define UPNONCE8 0x248
#define UPNONCE9 0x249
#define WAKECON 0x22
#define WAKECON_IMMWAKE 7
#define WAKECON_REGWAKE 6
#define WAKETIMEH 0x223
#define WAKETIMEH_WAKETIME10 2
#define WAKETIMEH_WAKETIME8 0
#define WAKETIMEH_WAKETIME9 1
#define WAKETIMEL 0x222
#define WAKETIMEL_WAKETIME0 0
#define WAKETIMEL_WAKETIME1 1
#define WAKETIMEL_WAKETIME2 2
#define WAKETIMEL_WAKETIME3 3
#define WAKETIMEL_WAKETIME4 4
#define WAKETIMEL_WAKETIME5 5
#define WAKETIMEL_WAKETIME6 6
#define WAKETIMEL_WAKETIME7 7
355
Detailed Description
Definition in file mrf24j40_defines.h.
Define Documentation
#define ACKTMOUT 0x12
Definition at line 102 of file mrf24j40_defines.h.
#define ACKTMOUT_DRPACK 7
Definition at line 105 of file mrf24j40_defines.h.
#define ACKTMOUT_MAWD0 0
Definition at line 112 of file mrf24j40_defines.h.
#define ACKTMOUT_MAWD1 1
Definition at line 111 of file mrf24j40_defines.h.
#define ACKTMOUT_MAWD2 2
Definition at line 110 of file mrf24j40_defines.h.
#define ACKTMOUT_MAWD3 3
Definition at line 109 of file mrf24j40_defines.h.
#define ACKTMOUT_MAWD4 4
Definition at line 108 of file mrf24j40_defines.h.
#define ACKTMOUT_MAWD5 5
Definition at line 107 of file mrf24j40_defines.h.
#define ACKTMOUT_MAWD6 6
Definition at line 106 of file mrf24j40_defines.h.
356
#define ASSOEADR0 0x230
Definition at line 867 of file mrf24j40_defines.h.
#define ASSOEADR1 0x231
Definition at line 868 of file mrf24j40_defines.h.
#define ASSOEADR2 0x232
Definition at line 869 of file mrf24j40_defines.h.
#define ASSOEADR3 0x233
Definition at line 870 of file mrf24j40_defines.h.
#define ASSOEADR4 0x234
Definition at line 871 of file mrf24j40_defines.h.
#define ASSOEADR5 0x235
Definition at line 872 of file mrf24j40_defines.h.
#define ASSOEADR6 0x236
Definition at line 873 of file mrf24j40_defines.h.
#define ASSOEADR7 0x237
Definition at line 874 of file mrf24j40_defines.h.
#define ASSOSADR0 0x238
Definition at line 875 of file mrf24j40_defines.h.
#define ASSOSADR1 0x239
Definition at line 876 of file mrf24j40_defines.h.
#define BBREG0 0x38
Definition at line 470 of file mrf24j40_defines.h.
357
#define BBREG0_TURBO 0
Definition at line 480 of file mrf24j40_defines.h.
#define BBREG1 0x39
Definition at line 482 of file mrf24j40_defines.h.
Referenced by mrf24j40_receive().
#define BBREG1_RXDECINV 2
Definition at line 490 of file mrf24j40_defines.h.
Referenced by mrf24j40_receive().
#define BBREG2 0x3A
Definition at line 494 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define BBREG2_CCACSTH0 2
Definition at line 502 of file mrf24j40_defines.h.
#define BBREG2_CCACSTH1 3
Definition at line 501 of file mrf24j40_defines.h.
#define BBREG2_CCACSTH2 4
Definition at line 500 of file mrf24j40_defines.h.
#define BBREG2_CCACSTH3 5
Definition at line 499 of file mrf24j40_defines.h.
#define BBREG2_CCAMODE0 6
Definition at line 498 of file mrf24j40_defines.h.
#define BBREG2_CCAMODE1 7
Definition at line 497 of file mrf24j40_defines.h.
358
#define BBREG3 0x3B
Definition at line 506 of file mrf24j40_defines.h.
#define BBREG3_PREDETTH0 1
Definition at line 515 of file mrf24j40_defines.h.
#define BBREG3_PREDETTH1 2
Definition at line 514 of file mrf24j40_defines.h.
#define BBREG3_PREDETTH2 3
Definition at line 513 of file mrf24j40_defines.h.
#define BBREG3_PREVALIDTH0 4
Definition at line 512 of file mrf24j40_defines.h.
#define BBREG3_PREVALIDTH1 5
Definition at line 511 of file mrf24j40_defines.h.
#define BBREG3_PREVALIDTH2 6
Definition at line 510 of file mrf24j40_defines.h.
#define BBREG3_PREVALIDTH3 7
Definition at line 509 of file mrf24j40_defines.h.
#define BBREG4 0x3C
Definition at line 518 of file mrf24j40_defines.h.
#define BBREG4_CSTH0 5
Definition at line 523 of file mrf24j40_defines.h.
#define BBREG4_CSTH1 6
Definition at line 522 of file mrf24j40_defines.h.
359
#define BBREG4_CSTH2 7
Definition at line 521 of file mrf24j40_defines.h.
#define BBREG4_PRECNT0 2
Definition at line 526 of file mrf24j40_defines.h.
#define BBREG4_PRECNT1 3
Definition at line 525 of file mrf24j40_defines.h.
#define BBREG4_PRECNT2 4
Definition at line 524 of file mrf24j40_defines.h.
#define BBREG6 0x3E
Definition at line 531 of file mrf24j40_defines.h.
Referenced by mrf24j40_active_channel_scan(), mrf24j40_init(), mrf24j40_init_coordinator(), and
mrf24j40_scan_for_lowest_channel_ed().
#define BBREG6_RSSIMODE1 7
Definition at line 534 of file mrf24j40_defines.h.
Referenced by mrf24j40_active_channel_scan(), and mrf24j40_scan_for_lowest_channel_ed().
#define BBREG6_RSSIMODE2 6
Definition at line 535 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_scan_for_lowest_channel_ed().
#define BBREG6_RSSIRDY 0
Definition at line 541 of file mrf24j40_defines.h.
Referenced by mrf24j40_active_channel_scan(), and mrf24j40_scan_for_lowest_channel_ed().
#define CCAEDTH 0x3F
Definition at line 543 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define CCAEDTH_CCAEDTH0 0
360
Definition at line 553 of file mrf24j40_defines.h.
#define CCAEDTH_CCAEDTH1 1
Definition at line 552 of file mrf24j40_defines.h.
#define CCAEDTH_CCAEDTH2 2
Definition at line 551 of file mrf24j40_defines.h.
#define CCAEDTH_CCAEDTH3 3
Definition at line 550 of file mrf24j40_defines.h.
#define CCAEDTH_CCAEDTH4 4
Definition at line 549 of file mrf24j40_defines.h.
#define CCAEDTH_CCAEDTH5 5
Definition at line 548 of file mrf24j40_defines.h.
#define CCAEDTH_CCAEDTH6 6
Definition at line 547 of file mrf24j40_defines.h.
#define CCAEDTH_CCAEDTH7 7
Definition at line 546 of file mrf24j40_defines.h.
#define EADR0 0x05
Definition at line 56 of file mrf24j40_defines.h.
#define EADR1 0x06
Definition at line 57 of file mrf24j40_defines.h.
#define EADR2 0x07
Definition at line 58 of file mrf24j40_defines.h.
#define EADR3 0x08
361
Definition at line 59 of file mrf24j40_defines.h.
#define EADR4 0x09
Definition at line 60 of file mrf24j40_defines.h.
#define EADR5 0x0A
Definition at line 61 of file mrf24j40_defines.h.
#define EADR6 0x0B
Definition at line 62 of file mrf24j40_defines.h.
#define EADR7 0x0C
Definition at line 63 of file mrf24j40_defines.h.
Referenced by mrf24j40_set_extended_address().
#define ESLOTG1 0x13
Definition at line 114 of file mrf24j40_defines.h.
#define ESLOTG23 0x1E
Definition at line 224 of file mrf24j40_defines.h.
#define ESLOTG45 0x1F
Definition at line 225 of file mrf24j40_defines.h.
#define ESLOTG67 0x20
Definition at line 226 of file mrf24j40_defines.h.
#define FRMOFFSET 0x23
Definition at line 251 of file mrf24j40_defines.h.
#define FRMOFFSET_OFFSET0 0
Definition at line 261 of file mrf24j40_defines.h.
362
#define FRMOFFSET_OFFSET1 1
Definition at line 260 of file mrf24j40_defines.h.
#define FRMOFFSET_OFFSET2 2
Definition at line 259 of file mrf24j40_defines.h.
#define FRMOFFSET_OFFSET3 3
Definition at line 258 of file mrf24j40_defines.h.
#define FRMOFFSET_OFFSET4 4
Definition at line 257 of file mrf24j40_defines.h.
#define FRMOFFSET_OFFSET5 5
Definition at line 256 of file mrf24j40_defines.h.
#define FRMOFFSET_OFFSET6 6
Definition at line 255 of file mrf24j40_defines.h.
#define FRMOFFSET_OFFSET7 7
Definition at line 254 of file mrf24j40_defines.h.
#define GATECLK 0x26
Definition at line 276 of file mrf24j40_defines.h.
#define GATECLK_GTSON 3
Definition at line 283 of file mrf24j40_defines.h.
#define GPIO 0x33
Definition at line 410 of file mrf24j40_defines.h.
Referenced by mrf24j40_scan_for_lowest_channel_ed().
#define GPIO_GPIO0 0
Definition at line 420 of file mrf24j40_defines.h.
363
#define GPIO_GPIO1 1
Definition at line 419 of file mrf24j40_defines.h.
#define GPIO_GPIO2 2
Definition at line 418 of file mrf24j40_defines.h.
#define GPIO_GPIO3 3
Definition at line 417 of file mrf24j40_defines.h.
#define GPIO_GPIO4 4
Definition at line 416 of file mrf24j40_defines.h.
#define GPIO_GPIO5 5
Definition at line 415 of file mrf24j40_defines.h.
#define HSYMTMRH 0x29
Definition at line 312 of file mrf24j40_defines.h.
#define HSYMTMRH_HSYMTMR08 0
Definition at line 322 of file mrf24j40_defines.h.
#define HSYMTMRH_HSYMTMR09 1
Definition at line 321 of file mrf24j40_defines.h.
#define HSYMTMRH_HSYMTMR10 2
Definition at line 320 of file mrf24j40_defines.h.
#define HSYMTMRH_HSYMTMR11 3
Definition at line 319 of file mrf24j40_defines.h.
#define HSYMTMRH_HSYMTMR12 4
Definition at line 318 of file mrf24j40_defines.h.
364
#define HSYMTMRH_HSYMTMR13 5
Definition at line 317 of file mrf24j40_defines.h.
#define HSYMTMRH_HSYMTMR14 6
Definition at line 316 of file mrf24j40_defines.h.
#define HSYMTMRH_HSYMTMR15 7
Definition at line 315 of file mrf24j40_defines.h.
#define HSYMTMRL 0x28
Definition at line 300 of file mrf24j40_defines.h.
#define HSYMTMRL_HSYMTMR0 0
Definition at line 310 of file mrf24j40_defines.h.
#define HSYMTMRL_HSYMTMR1 1
Definition at line 309 of file mrf24j40_defines.h.
#define HSYMTMRL_HSYMTMR2 2
Definition at line 308 of file mrf24j40_defines.h.
#define HSYMTMRL_HSYMTMR3 3
Definition at line 307 of file mrf24j40_defines.h.
#define HSYMTMRL_HSYMTMR4 4
Definition at line 306 of file mrf24j40_defines.h.
#define HSYMTMRL_HSYMTMR5 5
Definition at line 305 of file mrf24j40_defines.h.
#define HSYMTMRL_HSYMTMR6 6
Definition at line 304 of file mrf24j40_defines.h.
365
#define HSYMTMRL_HSYMTMR7 7
Definition at line 303 of file mrf24j40_defines.h.
#define INTSTAT 0x31
Definition at line 386 of file mrf24j40_defines.h.
Referenced by mrf24j40_handle_isr().
#define INTSTAT_HSYMTMRIF 5
Definition at line 391 of file mrf24j40_defines.h.
#define INTSTAT_RXIF 3
Definition at line 393 of file mrf24j40_defines.h.
Referenced by mrf24j40_handle_isr().
#define INTSTAT_SECIF 4
Definition at line 392 of file mrf24j40_defines.h.
#define INTSTAT_SLPIF 7
Definition at line 389 of file mrf24j40_defines.h.
#define INTSTAT_TXG1IF 1
Definition at line 395 of file mrf24j40_defines.h.
#define INTSTAT_TXG2IF 2
Definition at line 394 of file mrf24j40_defines.h.
#define INTSTAT_TXNIF 0
Definition at line 396 of file mrf24j40_defines.h.
Referenced by mrf24j40_handle_isr().
#define INTSTAT_WAKEIF 6
Definition at line 390 of file mrf24j40_defines.h.
366
#define MAINCNT0 0x226
Definition at line 802 of file mrf24j40_defines.h.
#define MAINCNT0_MAINCNT0 0
Definition at line 812 of file mrf24j40_defines.h.
#define MAINCNT0_MAINCNT1 1
Definition at line 811 of file mrf24j40_defines.h.
#define MAINCNT0_MAINCNT2 2
Definition at line 810 of file mrf24j40_defines.h.
#define MAINCNT0_MAINCNT3 3
Definition at line 809 of file mrf24j40_defines.h.
#define MAINCNT0_MAINCNT4 4
Definition at line 808 of file mrf24j40_defines.h.
#define MAINCNT0_MAINCNT5 5
Definition at line 807 of file mrf24j40_defines.h.
#define MAINCNT0_MAINCNT6 6
Definition at line 806 of file mrf24j40_defines.h.
#define MAINCNT0_MAINCNT7 7
Definition at line 805 of file mrf24j40_defines.h.
#define MAINCNT1 0x227
Definition at line 814 of file mrf24j40_defines.h.
#define MAINCNT1_MAINCNT10 2
Definition at line 822 of file mrf24j40_defines.h.
367
#define MAINCNT1_MAINCNT11 3
Definition at line 821 of file mrf24j40_defines.h.
#define MAINCNT1_MAINCNT12 4
Definition at line 820 of file mrf24j40_defines.h.
#define MAINCNT1_MAINCNT13 5
Definition at line 819 of file mrf24j40_defines.h.
#define MAINCNT1_MAINCNT14 6
Definition at line 818 of file mrf24j40_defines.h.
#define MAINCNT1_MAINCNT15 7
Definition at line 817 of file mrf24j40_defines.h.
#define MAINCNT1_MAINCNT8 0
Definition at line 824 of file mrf24j40_defines.h.
#define MAINCNT1_MAINCNT9 1
Definition at line 823 of file mrf24j40_defines.h.
#define MAINCNT2 0x228
Definition at line 826 of file mrf24j40_defines.h.
#define MAINCNT2_MAINCNT16 0
Definition at line 836 of file mrf24j40_defines.h.
#define MAINCNT2_MAINCNT17 1
Definition at line 835 of file mrf24j40_defines.h.
#define MAINCNT2_MAINCNT18 2
Definition at line 834 of file mrf24j40_defines.h.
368
#define MAINCNT2_MAINCNT19 3
Definition at line 833 of file mrf24j40_defines.h.
#define MAINCNT2_MAINCNT20 4
Definition at line 832 of file mrf24j40_defines.h.
#define MAINCNT2_MAINCNT21 5
Definition at line 831 of file mrf24j40_defines.h.
#define MAINCNT2_MAINCNT22 6
Definition at line 830 of file mrf24j40_defines.h.
#define MAINCNT2_MAINCNT23 7
Definition at line 829 of file mrf24j40_defines.h.
#define MAINCNT3 0x229
Definition at line 838 of file mrf24j40_defines.h.
#define MAINCNT3_MAINCNT24 0
Definition at line 848 of file mrf24j40_defines.h.
#define MAINCNT3_MAINCNT25 1
Definition at line 847 of file mrf24j40_defines.h.
#define MAINCNT3_STARTCNT 7
Definition at line 841 of file mrf24j40_defines.h.
#define MRF_INTCON 0x32
Definition at line 398 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define MRF_INTCON_HSYMTMRIE 5
Definition at line 403 of file mrf24j40_defines.h.
369
#define MRF_INTCON_RXIE 3
Definition at line 405 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define MRF_INTCON_SECIE 4
Definition at line 404 of file mrf24j40_defines.h.
#define MRF_INTCON_SLPIE 7
Definition at line 401 of file mrf24j40_defines.h.
#define MRF_INTCON_TXG1IE 1
Definition at line 407 of file mrf24j40_defines.h.
#define MRF_INTCON_TXG2IE 2
Definition at line 406 of file mrf24j40_defines.h.
#define MRF_INTCON_TXNIE 0
Definition at line 408 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define MRF_INTCON_WAKEIE 6
Definition at line 402 of file mrf24j40_defines.h.
#define ORDER 0x10
Definition at line 78 of file mrf24j40_defines.h.
#define ORDER_BO0 4
Definition at line 84 of file mrf24j40_defines.h.
#define ORDER_BO1 5
Definition at line 83 of file mrf24j40_defines.h.
#define ORDER_BO2 6
370
Definition at line 82 of file mrf24j40_defines.h.
#define ORDER_BO3 7
Definition at line 81 of file mrf24j40_defines.h.
#define ORDER_SO0 0
Definition at line 88 of file mrf24j40_defines.h.
#define ORDER_SO1 1
Definition at line 87 of file mrf24j40_defines.h.
#define ORDER_SO2 2
Definition at line 86 of file mrf24j40_defines.h.
#define ORDER_SO3 3
Definition at line 85 of file mrf24j40_defines.h.
#define PACON0 0x16
Definition at line 139 of file mrf24j40_defines.h.
#define PACON0_PAONT0 0
Definition at line 149 of file mrf24j40_defines.h.
#define PACON0_PAONT1 1
Definition at line 148 of file mrf24j40_defines.h.
#define PACON0_PAONT2 2
Definition at line 147 of file mrf24j40_defines.h.
#define PACON0_PAONT3 3
Definition at line 146 of file mrf24j40_defines.h.
#define PACON0_PAONT4 4
371
Definition at line 145 of file mrf24j40_defines.h.
#define PACON0_PAONT5 5
Definition at line 144 of file mrf24j40_defines.h.
#define PACON0_PAONT6 6
Definition at line 143 of file mrf24j40_defines.h.
#define PACON0_PAONT7 7
Definition at line 142 of file mrf24j40_defines.h.
#define PACON1 0x17
Definition at line 151 of file mrf24j40_defines.h.
#define PACON1_PAONT8 0
Definition at line 161 of file mrf24j40_defines.h.
#define PACON1_PAONTS0 1
Definition at line 160 of file mrf24j40_defines.h.
#define PACON1_PAONTS1 2
Definition at line 159 of file mrf24j40_defines.h.
#define PACON1_PAONTS2 3
Definition at line 158 of file mrf24j40_defines.h.
#define PACON1_PAONTS3 4
Definition at line 157 of file mrf24j40_defines.h.
#define PACON2 0x18
Definition at line 163 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
372
#define PACON2_FIFOEN 7
Definition at line 166 of file mrf24j40_defines.h.
#define PACON2_TXONT7 0
Definition at line 173 of file mrf24j40_defines.h.
#define PACON2_TXONT8 1
Definition at line 172 of file mrf24j40_defines.h.
#define PACON2_TXONTS0 2
Definition at line 171 of file mrf24j40_defines.h.
#define PACON2_TXONTS1 3
Definition at line 170 of file mrf24j40_defines.h.
#define PACON2_TXONTS2 4
Definition at line 169 of file mrf24j40_defines.h.
#define PACON2_TXONTS3 5
Definition at line 168 of file mrf24j40_defines.h.
#define PANIDH 0x02
Definition at line 53 of file mrf24j40_defines.h.
Referenced by mrf24j40_set_pan_id().
#define PANIDL 0x01
Definition at line 52 of file mrf24j40_defines.h.
Referenced by mrf24j40_set_pan_id().
#define REMCNTH 0x225
Definition at line 790 of file mrf24j40_defines.h.
#define REMCNTH_REMCNT10 2
373
Definition at line 798 of file mrf24j40_defines.h.
#define REMCNTH_REMCNT11 3
Definition at line 797 of file mrf24j40_defines.h.
#define REMCNTH_REMCNT12 4
Definition at line 796 of file mrf24j40_defines.h.
#define REMCNTH_REMCNT13 5
Definition at line 795 of file mrf24j40_defines.h.
#define REMCNTH_REMCNT14 6
Definition at line 794 of file mrf24j40_defines.h.
#define REMCNTH_REMCNT15 7
Definition at line 793 of file mrf24j40_defines.h.
#define REMCNTH_REMCNT8 0
Definition at line 800 of file mrf24j40_defines.h.
#define REMCNTH_REMCNT9 1
Definition at line 799 of file mrf24j40_defines.h.
#define REMCNTL 0x224
Definition at line 778 of file mrf24j40_defines.h.
#define REMCNTL_REMCNT0 0
Definition at line 788 of file mrf24j40_defines.h.
#define REMCNTL_REMCNT1 1
Definition at line 787 of file mrf24j40_defines.h.
#define REMCNTL_REMCNT2 2
374
Definition at line 786 of file mrf24j40_defines.h.
#define REMCNTL_REMCNT3 3
Definition at line 785 of file mrf24j40_defines.h.
#define REMCNTL_REMCNT4 4
Definition at line 784 of file mrf24j40_defines.h.
#define REMCNTL_REMCNT5 5
Definition at line 783 of file mrf24j40_defines.h.
#define REMCNTL_REMCNT6 6
Definition at line 782 of file mrf24j40_defines.h.
#define REMCNTL_REMCNT7 7
Definition at line 781 of file mrf24j40_defines.h.
#define RFCON0 0x200
Definition at line 555 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), mrf24j40_init_coordinator(), and mrf24j40_set_channel().
#define RFCON0_CHANNEL0 4
Definition at line 561 of file mrf24j40_defines.h.
#define RFCON0_CHANNEL1 5
Definition at line 560 of file mrf24j40_defines.h.
#define RFCON0_CHANNEL2 6
Definition at line 559 of file mrf24j40_defines.h.
#define RFCON0_CHANNEL3 7
Definition at line 558 of file mrf24j40_defines.h.
375
#define RFCON0_RFOPT0 0
Definition at line 565 of file mrf24j40_defines.h.
#define RFCON0_RFOPT1 1
Definition at line 564 of file mrf24j40_defines.h.
#define RFCON0_RFOPT2 2
Definition at line 563 of file mrf24j40_defines.h.
#define RFCON0_RFOPT3 3
Definition at line 562 of file mrf24j40_defines.h.
#define RFCON1 0x201
Definition at line 567 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define RFCON1_VCOOPT0 0
Definition at line 577 of file mrf24j40_defines.h.
#define RFCON1_VCOOPT1 1
Definition at line 576 of file mrf24j40_defines.h.
#define RFCON1_VCOOPT2 2
Definition at line 575 of file mrf24j40_defines.h.
#define RFCON1_VCOOPT3 3
Definition at line 574 of file mrf24j40_defines.h.
#define RFCON1_VCOOPT4 4
Definition at line 573 of file mrf24j40_defines.h.
#define RFCON1_VCOOPT5 5
Definition at line 572 of file mrf24j40_defines.h.
376
#define RFCON1_VCOOPT6 6
Definition at line 571 of file mrf24j40_defines.h.
#define RFCON1_VCOOPT7 7
Definition at line 570 of file mrf24j40_defines.h.
#define RFCON2 0x202
Definition at line 579 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define RFCON2_PLLEN 7
Definition at line 582 of file mrf24j40_defines.h.
#define RFCON3 0x203
Definition at line 591 of file mrf24j40_defines.h.
Referenced by mrf24j40_init().
#define RFCON3_TXPWRL0 6
Definition at line 595 of file mrf24j40_defines.h.
#define RFCON3_TXPWRL1 7
Definition at line 594 of file mrf24j40_defines.h.
#define RFCON3_TXPWRS0 3
Definition at line 598 of file mrf24j40_defines.h.
#define RFCON3_TXPWRS1 4
Definition at line 597 of file mrf24j40_defines.h.
#define RFCON3_TXPWRS2 5
Definition at line 596 of file mrf24j40_defines.h.
#define RFCON5 0x205
377
Definition at line 604 of file mrf24j40_defines.h.
#define RFCON5_BATTH0 4
Definition at line 610 of file mrf24j40_defines.h.
#define RFCON5_BATTH1 5
Definition at line 609 of file mrf24j40_defines.h.
#define RFCON5_BATTH2 6
Definition at line 608 of file mrf24j40_defines.h.
#define RFCON5_BATTH3 7
Definition at line 607 of file mrf24j40_defines.h.
#define RFCON6 0x206
Definition at line 616 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define RFCON6_20MRECVR 4
Definition at line 622 of file mrf24j40_defines.h.
#define RFCON6_BATEN 3
Definition at line 623 of file mrf24j40_defines.h.
#define RFCON6_TXFIL 7
Definition at line 619 of file mrf24j40_defines.h.
#define RFCON7 0x207
Definition at line 628 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define RFCON7_CLKOUTMODE0 0
Definition at line 638 of file mrf24j40_defines.h.
378
#define RFCON7_CLKOUTMODE1 1
Definition at line 637 of file mrf24j40_defines.h.
#define RFCON7_SLPCLKSEL0 6
Definition at line 632 of file mrf24j40_defines.h.
#define RFCON7_SLPCLKSEL1 7
Definition at line 631 of file mrf24j40_defines.h.
#define RFCON8 0x208
Definition at line 640 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define RFCON8_RFVCO 4
Definition at line 646 of file mrf24j40_defines.h.
#define RFCTL 0x36
Definition at line 446 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), mrf24j40_init_coordinator(), and mrf24j40_set_channel().
#define RFCTL_RFRST 2
Definition at line 454 of file mrf24j40_defines.h.
#define RFCTL_WAKECNT7 3
Definition at line 453 of file mrf24j40_defines.h.
#define RFCTL_WAKECNT8 4
Definition at line 452 of file mrf24j40_defines.h.
#define RFSTATE 0x20F
Definition at line 691 of file mrf24j40_defines.h.
Referenced by mrf24j40_init().
379
#define RFSTATE_RFSTATE0 5
Definition at line 696 of file mrf24j40_defines.h.
#define RFSTATE_RFSTATE1 6
Definition at line 695 of file mrf24j40_defines.h.
#define RFSTATE_RFSTATE2 7
Definition at line 694 of file mrf24j40_defines.h.
#define RSSI 0x210
Definition at line 703 of file mrf24j40_defines.h.
Referenced by mrf24j40_active_channel_scan(), and mrf24j40_scan_for_lowest_channel_ed().
#define RSSI_RSSI0 0
Definition at line 713 of file mrf24j40_defines.h.
#define RSSI_RSSI1 1
Definition at line 712 of file mrf24j40_defines.h.
#define RSSI_RSSI2 2
Definition at line 711 of file mrf24j40_defines.h.
#define RSSI_RSSI3 3
Definition at line 710 of file mrf24j40_defines.h.
#define RSSI_RSSI4 4
Definition at line 709 of file mrf24j40_defines.h.
#define RSSI_RSSI5 5
Definition at line 708 of file mrf24j40_defines.h.
#define RSSI_RSSI6 6
Definition at line 707 of file mrf24j40_defines.h.
380
#define RSSI_RSSI7 7
Definition at line 706 of file mrf24j40_defines.h.
#define RXFLUSH 0x0D
Definition at line 64 of file mrf24j40_defines.h.
Referenced by mrf24j40_active_channel_scan(), and mrf24j40_flush_receive_buffer().
#define RXFLUSH_BCNONLY 1
Definition at line 73 of file mrf24j40_defines.h.
Referenced by mrf24j40_active_channel_scan().
#define RXFLUSH_CMDONLY 3
Definition at line 71 of file mrf24j40_defines.h.
#define RXFLUSH_DATAONLY 2
Definition at line 72 of file mrf24j40_defines.h.
#define RXFLUSH_RXFLUSH 0
Definition at line 74 of file mrf24j40_defines.h.
Referenced by mrf24j40_flush_receive_buffer().
#define RXFLUSH_WAKEPAD 5
Definition at line 69 of file mrf24j40_defines.h.
#define RXFLUSH_WAKEPOL 6
Definition at line 68 of file mrf24j40_defines.h.
#define RXMCR 0x00
Definition at line 40 of file mrf24j40_defines.h.
Referenced by mrf24j40_init_coordinator().
#define RXMCR_COORD 2
Definition at line 48 of file mrf24j40_defines.h.
381
#define RXMCR_ERRPKT 1
Definition at line 49 of file mrf24j40_defines.h.
#define RXMCR_NOACKRSP 5
Definition at line 45 of file mrf24j40_defines.h.
#define RXMCR_PANCOORD 3
Definition at line 47 of file mrf24j40_defines.h.
Referenced by mrf24j40_init_coordinator().
#define RXMCR_PROMI 0
Definition at line 50 of file mrf24j40_defines.h.
#define RXSR 0x30
Definition at line 374 of file mrf24j40_defines.h.
#define RXSR_BATIND 5
Definition at line 379 of file mrf24j40_defines.h.
#define RXSR_UPSECERR 6
Definition at line 378 of file mrf24j40_defines.h.
#define SADRH 0x04
Definition at line 55 of file mrf24j40_defines.h.
Referenced by mrf24j40_set_short_address().
#define SADRL 0x03
Definition at line 54 of file mrf24j40_defines.h.
Referenced by mrf24j40_set_short_address().
#define SECCON0 0x2C
Definition at line 337 of file mrf24j40_defines.h.
382
#define SECCON0_RXCIPHER0 3
Definition at line 344 of file mrf24j40_defines.h.
#define SECCON0_RXCIPHER1 4
Definition at line 343 of file mrf24j40_defines.h.
#define SECCON0_RXCIPHER2 5
Definition at line 342 of file mrf24j40_defines.h.
#define SECCON0_SECIGNORE 7
Definition at line 340 of file mrf24j40_defines.h.
#define SECCON0_SECSTART 6
Definition at line 341 of file mrf24j40_defines.h.
#define SECCON0_TXNCIPHER0 0
Definition at line 347 of file mrf24j40_defines.h.
#define SECCON0_TXNCIPHER1 1
Definition at line 346 of file mrf24j40_defines.h.
#define SECCON0_TXNCIPHER2 2
Definition at line 345 of file mrf24j40_defines.h.
#define SECCON1 0x2D
Definition at line 349 of file mrf24j40_defines.h.
#define SECCON1_DISDEC 1
Definition at line 358 of file mrf24j40_defines.h.
#define SECCON1_DISENC 0
Definition at line 359 of file mrf24j40_defines.h.
383
#define SECCON1_TXBCIPHER0 4
Definition at line 355 of file mrf24j40_defines.h.
#define SECCON1_TXBCIPHER1 5
Definition at line 354 of file mrf24j40_defines.h.
#define SECCON1_TXBCIPHER2 6
Definition at line 353 of file mrf24j40_defines.h.
#define SECCR2 0x37
Definition at line 458 of file mrf24j40_defines.h.
#define SECCR2_TXG1CIPHER0 0
Definition at line 468 of file mrf24j40_defines.h.
#define SECCR2_TXG1CIPHER1 1
Definition at line 467 of file mrf24j40_defines.h.
#define SECCR2_TXG1CIPHER2 2
Definition at line 466 of file mrf24j40_defines.h.
#define SECCR2_TXG2CIPHER0 3
Definition at line 465 of file mrf24j40_defines.h.
#define SECCR2_TXG2CIPHER1 4
Definition at line 464 of file mrf24j40_defines.h.
#define SECCR2_TXG2CIPHER2 5
Definition at line 463 of file mrf24j40_defines.h.
#define SECCR2_UPDEC 7
Definition at line 461 of file mrf24j40_defines.h.
384
#define SECCR2_UPENC 6
Definition at line 462 of file mrf24j40_defines.h.
#define SLPACK 0x35
Definition at line 434 of file mrf24j40_defines.h.
#define SLPACK_SLPACK 7
Definition at line 437 of file mrf24j40_defines.h.
#define SLPACK_WAKECNT0 0
Definition at line 444 of file mrf24j40_defines.h.
#define SLPACK_WAKECNT1 1
Definition at line 443 of file mrf24j40_defines.h.
#define SLPACK_WAKECNT2 2
Definition at line 442 of file mrf24j40_defines.h.
#define SLPACK_WAKECNT3 3
Definition at line 441 of file mrf24j40_defines.h.
#define SLPACK_WAKECNT4 4
Definition at line 440 of file mrf24j40_defines.h.
#define SLPACK_WAKECNT5 5
Definition at line 439 of file mrf24j40_defines.h.
#define SLPACK_WAKECNT6 6
Definition at line 438 of file mrf24j40_defines.h.
#define SLPCAL0 0x209
Definition at line 652 of file mrf24j40_defines.h.
385
#define SLPCAL0_SLPCAL0 0
Definition at line 662 of file mrf24j40_defines.h.
#define SLPCAL0_SLPCAL1 1
Definition at line 661 of file mrf24j40_defines.h.
#define SLPCAL0_SLPCAL2 2
Definition at line 660 of file mrf24j40_defines.h.
#define SLPCAL0_SLPCAL3 3
Definition at line 659 of file mrf24j40_defines.h.
#define SLPCAL0_SLPCAL4 4
Definition at line 658 of file mrf24j40_defines.h.
#define SLPCAL0_SLPCAL5 5
Definition at line 657 of file mrf24j40_defines.h.
#define SLPCAL0_SLPCAL6 6
Definition at line 656 of file mrf24j40_defines.h.
#define SLPCAL0_SLPCAL7 7
Definition at line 655 of file mrf24j40_defines.h.
#define SLPCAL1 0x20A
Definition at line 664 of file mrf24j40_defines.h.
#define SLPCAL1_SLPCAL10 2
Definition at line 672 of file mrf24j40_defines.h.
#define SLPCAL1_SLPCAL11 3
Definition at line 671 of file mrf24j40_defines.h.
386
#define SLPCAL1_SLPCAL12 4
Definition at line 670 of file mrf24j40_defines.h.
#define SLPCAL1_SLPCAL13 5
Definition at line 669 of file mrf24j40_defines.h.
#define SLPCAL1_SLPCAL14 6
Definition at line 668 of file mrf24j40_defines.h.
#define SLPCAL1_SLPCAL15 7
Definition at line 667 of file mrf24j40_defines.h.
#define SLPCAL1_SLPCAL8 0
Definition at line 674 of file mrf24j40_defines.h.
#define SLPCAL1_SLPCAL9 1
Definition at line 673 of file mrf24j40_defines.h.
#define SLPCAL2 0x20B
Definition at line 676 of file mrf24j40_defines.h.
#define SLPCAL2_SLPCAL16 0
Definition at line 686 of file mrf24j40_defines.h.
#define SLPCAL2_SLPCAL17 1
Definition at line 685 of file mrf24j40_defines.h.
#define SLPCAL2_SLPCAL18 2
Definition at line 684 of file mrf24j40_defines.h.
#define SLPCAL2_SLPCAL19 3
Definition at line 683 of file mrf24j40_defines.h.
387
#define SLPCAL2_SLPCALEN 4
Definition at line 682 of file mrf24j40_defines.h.
#define SLPCAL2_SLPCALRDY 7
Definition at line 679 of file mrf24j40_defines.h.
#define SLPCON0 0x211
Definition at line 715 of file mrf24j40_defines.h.
#define SLPCON0_INTEDGE 1
Definition at line 724 of file mrf24j40_defines.h.
#define SLPCON0_SLPCLKEN 0
Definition at line 725 of file mrf24j40_defines.h.
#define SLPCON1 0x220
Definition at line 741 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define SLPCON1_CLKOUTEN 5
Definition at line 746 of file mrf24j40_defines.h.
#define SLPCON1_SLPCLKDIV0 0
Definition at line 751 of file mrf24j40_defines.h.
#define SLPCON1_SLPCLKDIV1 1
Definition at line 750 of file mrf24j40_defines.h.
#define SLPCON1_SLPCLKDIV2 2
Definition at line 749 of file mrf24j40_defines.h.
#define SLPCON1_SLPCLKDIV3 3
Definition at line 748 of file mrf24j40_defines.h.
388
#define SLPCON1_SLPCLKDIV4 4
Definition at line 747 of file mrf24j40_defines.h.
#define SOFTRST 0x2A
Definition at line 324 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define SOFTRST_RSTBB 1
Definition at line 333 of file mrf24j40_defines.h.
#define SOFTRST_RSTMAC 0
Definition at line 334 of file mrf24j40_defines.h.
#define SOFTRST_RSTPWR 2
Definition at line 332 of file mrf24j40_defines.h.
#define SYMTICKH 0x15
Definition at line 127 of file mrf24j40_defines.h.
#define SYMTICKH_TICKP8 0
Definition at line 137 of file mrf24j40_defines.h.
#define SYMTICKH_TXONT0 1
Definition at line 136 of file mrf24j40_defines.h.
#define SYMTICKH_TXONT1 2
Definition at line 135 of file mrf24j40_defines.h.
#define SYMTICKH_TXONT2 3
Definition at line 134 of file mrf24j40_defines.h.
#define SYMTICKH_TXONT3 4
Definition at line 133 of file mrf24j40_defines.h.
389
#define SYMTICKH_TXONT4 5
Definition at line 132 of file mrf24j40_defines.h.
#define SYMTICKH_TXONT5 6
Definition at line 131 of file mrf24j40_defines.h.
#define SYMTICKH_TXONT6 7
Definition at line 130 of file mrf24j40_defines.h.
#define SYMTICKL 0x14
Definition at line 115 of file mrf24j40_defines.h.
#define SYMTICKL_TICKP0 0
Definition at line 125 of file mrf24j40_defines.h.
#define SYMTICKL_TICKP1 1
Definition at line 124 of file mrf24j40_defines.h.
#define SYMTICKL_TICKP2 2
Definition at line 123 of file mrf24j40_defines.h.
#define SYMTICKL_TICKP3 3
Definition at line 122 of file mrf24j40_defines.h.
#define SYMTICKL_TICKP4 4
Definition at line 121 of file mrf24j40_defines.h.
#define SYMTICKL_TICKP5 5
Definition at line 120 of file mrf24j40_defines.h.
#define SYMTICKL_TICKP6 6
Definition at line 119 of file mrf24j40_defines.h.
390
#define SYMTICKL_TICKP7 7
Definition at line 118 of file mrf24j40_defines.h.
#define TESTMODE 0x22F
Definition at line 855 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_scan_for_lowest_channel_ed().
#define TESTMODE_RSSIWAIT0 3
Definition at line 862 of file mrf24j40_defines.h.
#define TESTMODE_RSSIWAIT1 4
Definition at line 861 of file mrf24j40_defines.h.
#define TESTMODE_TESTMODE0 0
Definition at line 865 of file mrf24j40_defines.h.
#define TESTMODE_TESTMODE1 1
Definition at line 864 of file mrf24j40_defines.h.
#define TESTMODE_TESTMODE2 2
Definition at line 863 of file mrf24j40_defines.h.
#define TRISGPIO 0x34
Definition at line 422 of file mrf24j40_defines.h.
Referenced by mrf24j40_scan_for_lowest_channel_ed().
#define TRISGPIO_TRISGP0 0
Definition at line 432 of file mrf24j40_defines.h.
#define TRISGPIO_TRISGP1 1
Definition at line 431 of file mrf24j40_defines.h.
#define TRISGPIO_TRISGP2 2
391
Definition at line 430 of file mrf24j40_defines.h.
#define TRISGPIO_TRISGP3 3
Definition at line 429 of file mrf24j40_defines.h.
#define TRISGPIO_TRISGP4 4
Definition at line 428 of file mrf24j40_defines.h.
#define TRISGPIO_TRISGP5 5
Definition at line 427 of file mrf24j40_defines.h.
#define TXBCON0 0x1A
Definition at line 176 of file mrf24j40_defines.h.
#define TXBCON0_TXBSECEN 1
Definition at line 185 of file mrf24j40_defines.h.
#define TXBCON0_TXBTRIG 0
Definition at line 186 of file mrf24j40_defines.h.
#define TXBCON1 0x25
Definition at line 275 of file mrf24j40_defines.h.
#define TXG1CON 0x1C
Definition at line 200 of file mrf24j40_defines.h.
#define TXG1CON_TXG1ACKREQ 2
Definition at line 208 of file mrf24j40_defines.h.
#define TXG1CON_TXG1RETRY0 6
Definition at line 204 of file mrf24j40_defines.h.
#define TXG1CON_TXG1RETRY1 7
392
Definition at line 203 of file mrf24j40_defines.h.
#define TXG1CON_TXG1SECEN 1
Definition at line 209 of file mrf24j40_defines.h.
#define TXG1CON_TXG1SLOT0 3
Definition at line 207 of file mrf24j40_defines.h.
#define TXG1CON_TXG1SLOT1 4
Definition at line 206 of file mrf24j40_defines.h.
#define TXG1CON_TXG1SLOT2 5
Definition at line 205 of file mrf24j40_defines.h.
#define TXG1CON_TXG1TRIG 0
Definition at line 210 of file mrf24j40_defines.h.
#define TXG2CON 0x1D
Definition at line 212 of file mrf24j40_defines.h.
#define TXG2CON_TXG2ACKREQ 2
Definition at line 220 of file mrf24j40_defines.h.
#define TXG2CON_TXG2RETRY0 6
Definition at line 216 of file mrf24j40_defines.h.
#define TXG2CON_TXG2RETRY1 7
Definition at line 215 of file mrf24j40_defines.h.
#define TXG2CON_TXG2SECEN 1
Definition at line 221 of file mrf24j40_defines.h.
#define TXG2CON_TXG2SLOT0 3
393
Definition at line 219 of file mrf24j40_defines.h.
#define TXG2CON_TXG2SLOT1 4
Definition at line 218 of file mrf24j40_defines.h.
#define TXG2CON_TXG2SLOT2 5
Definition at line 217 of file mrf24j40_defines.h.
#define TXG2CON_TXG2TRIG 0
Definition at line 222 of file mrf24j40_defines.h.
#define TXMCR 0x11
Definition at line 90 of file mrf24j40_defines.h.
Referenced by mrf24j40_init_coordinator().
#define TXMCR_BATLIFEXT 6
Definition at line 94 of file mrf24j40_defines.h.
#define TXMCR_CSMABF0 0
Definition at line 100 of file mrf24j40_defines.h.
#define TXMCR_CSMABF1 1
Definition at line 99 of file mrf24j40_defines.h.
#define TXMCR_CSMABF2 2
Definition at line 98 of file mrf24j40_defines.h.
#define TXMCR_MACMINBE0 3
Definition at line 97 of file mrf24j40_defines.h.
#define TXMCR_MACMINBE1 4
Definition at line 96 of file mrf24j40_defines.h.
394
#define TXMCR_NOCSMA 7
Definition at line 93 of file mrf24j40_defines.h.
#define TXMCR_SLOTTED 5
Definition at line 95 of file mrf24j40_defines.h.
Referenced by mrf24j40_init_coordinator().
#define TXNCON 0x1B
Definition at line 188 of file mrf24j40_defines.h.
Referenced by mrf24j40_transmit(), mrf24j40_transmit_to_extended_address(), and
mrf24j40_transmit_to_short_address().
#define TXNCON_FPSTAT 4
Definition at line 194 of file mrf24j40_defines.h.
#define TXNCON_INDIRECT 3
Definition at line 195 of file mrf24j40_defines.h.
#define TXNCON_TXNACKREQ 2
Definition at line 196 of file mrf24j40_defines.h.
Referenced by mrf24j40_transmit_to_extended_address(), and mrf24j40_transmit_to_short_address().
#define TXNCON_TXNSECEN 1
Definition at line 197 of file mrf24j40_defines.h.
#define TXNCON_TXNTRIG 0
Definition at line 198 of file mrf24j40_defines.h.
Referenced by mrf24j40_transmit(), mrf24j40_transmit_to_extended_address(), and
mrf24j40_transmit_to_short_address().
#define TXPEND 0x21
Definition at line 227 of file mrf24j40_defines.h.
#define TXPEND_FPACK 0
395
Definition at line 237 of file mrf24j40_defines.h.
#define TXPEND_GTSSWITCH 1
Definition at line 236 of file mrf24j40_defines.h.
#define TXPEND_MLIFS0 2
Definition at line 235 of file mrf24j40_defines.h.
#define TXPEND_MLIFS1 3
Definition at line 234 of file mrf24j40_defines.h.
#define TXPEND_MLIFS2 4
Definition at line 233 of file mrf24j40_defines.h.
#define TXPEND_MLIFS3 5
Definition at line 232 of file mrf24j40_defines.h.
#define TXPEND_MLIFS4 6
Definition at line 231 of file mrf24j40_defines.h.
#define TXPEND_MLIFS5 7
Definition at line 230 of file mrf24j40_defines.h.
#define TXSTAT 0x24
Definition at line 263 of file mrf24j40_defines.h.
Referenced by mrf24j40_handle_isr().
#define TXSTAT_CCAFAIL 5
Definition at line 268 of file mrf24j40_defines.h.
Referenced by mrf24j40_handle_isr().
#define TXSTAT_TXG1FNT 3
Definition at line 270 of file mrf24j40_defines.h.
396
#define TXSTAT_TXG1STAT 1
Definition at line 272 of file mrf24j40_defines.h.
#define TXSTAT_TXG2FNT 4
Definition at line 269 of file mrf24j40_defines.h.
#define TXSTAT_TXG2STAT 2
Definition at line 271 of file mrf24j40_defines.h.
#define TXSTAT_TXNRETRY0 6
Definition at line 267 of file mrf24j40_defines.h.
#define TXSTAT_TXNRETRY1 7
Definition at line 266 of file mrf24j40_defines.h.
#define TXSTAT_TXNSTAT 0
Definition at line 273 of file mrf24j40_defines.h.
#define TXSTBL 0x2E
Definition at line 361 of file mrf24j40_defines.h.
Referenced by mrf24j40_init(), and mrf24j40_init_coordinator().
#define TXSTBL_MSIFS0 0
Definition at line 371 of file mrf24j40_defines.h.
#define TXSTBL_MSIFS1 1
Definition at line 370 of file mrf24j40_defines.h.
#define TXSTBL_MSIFS2 2
Definition at line 369 of file mrf24j40_defines.h.
#define TXSTBL_MSIFS3 3
Definition at line 368 of file mrf24j40_defines.h.
397
#define TXSTBL_RFSTBL0 4
Definition at line 367 of file mrf24j40_defines.h.
#define TXSTBL_RFSTBL1 5
Definition at line 366 of file mrf24j40_defines.h.
#define TXSTBL_RFSTBL2 6
Definition at line 365 of file mrf24j40_defines.h.
#define TXSTBL_RFSTBL3 7
Definition at line 364 of file mrf24j40_defines.h.
#define TXTIME 0x27
Definition at line 288 of file mrf24j40_defines.h.
#define TXTIME_TURNTIME0 4
Definition at line 294 of file mrf24j40_defines.h.
#define TXTIME_TURNTIME1 5
Definition at line 293 of file mrf24j40_defines.h.
#define TXTIME_TURNTIME2 6
Definition at line 292 of file mrf24j40_defines.h.
#define TXTIME_TURNTIME3 7
Definition at line 291 of file mrf24j40_defines.h.
#define UPNONCE0 0x240
Definition at line 883 of file mrf24j40_defines.h.
#define UPNONCE1 0x241
Definition at line 884 of file mrf24j40_defines.h.
398
#define UPNONCE10 0x24A
Definition at line 893 of file mrf24j40_defines.h.
#define UPNONCE11 0x24B
Definition at line 894 of file mrf24j40_defines.h.
#define UPNONCE12 0x24C
Definition at line 895 of file mrf24j40_defines.h.
#define UPNONCE2 0x242
Definition at line 885 of file mrf24j40_defines.h.
#define UPNONCE3 0x243
Definition at line 886 of file mrf24j40_defines.h.
#define UPNONCE4 0x244
Definition at line 887 of file mrf24j40_defines.h.
#define UPNONCE5 0x245
Definition at line 888 of file mrf24j40_defines.h.
#define UPNONCE6 0x246
Definition at line 889 of file mrf24j40_defines.h.
#define UPNONCE7 0x247
Definition at line 890 of file mrf24j40_defines.h.
#define UPNONCE8 0x248
Definition at line 891 of file mrf24j40_defines.h.
#define UPNONCE9 0x249
Definition at line 892 of file mrf24j40_defines.h.
399
#define WAKECON 0x22
Definition at line 239 of file mrf24j40_defines.h.
#define WAKECON_IMMWAKE 7
Definition at line 242 of file mrf24j40_defines.h.
#define WAKECON_REGWAKE 6
Definition at line 243 of file mrf24j40_defines.h.
#define WAKETIMEH 0x223
Definition at line 766 of file mrf24j40_defines.h.
#define WAKETIMEH_WAKETIME10 2
Definition at line 774 of file mrf24j40_defines.h.
#define WAKETIMEH_WAKETIME8 0
Definition at line 776 of file mrf24j40_defines.h.
#define WAKETIMEH_WAKETIME9 1
Definition at line 775 of file mrf24j40_defines.h.
#define WAKETIMEL 0x222
Definition at line 754 of file mrf24j40_defines.h.
#define WAKETIMEL_WAKETIME0 0
Definition at line 764 of file mrf24j40_defines.h.
#define WAKETIMEL_WAKETIME1 1
Definition at line 763 of file mrf24j40_defines.h.
#define WAKETIMEL_WAKETIME2 2
Definition at line 762 of file mrf24j40_defines.h.
400
#define WAKETIMEL_WAKETIME3 3
Definition at line 761 of file mrf24j40_defines.h.
#define WAKETIMEL_WAKETIME4 4
Definition at line 760 of file mrf24j40_defines.h.
#define WAKETIMEL_WAKETIME5 5
Definition at line 759 of file mrf24j40_defines.h.
#define WAKETIMEL_WAKETIME6 6
Definition at line 758 of file mrf24j40_defines.h.
#define WAKETIMEL_WAKETIME7 7
Definition at line 757 of file mrf24j40_defines.h.
ms5540.c File Reference #include "ms5540.h" #include "pic_serial.h" #include "debug.h" Include dependency graph for ms5540.c:
401
Defines
#define MS5540_DELAY_AMOUNT 2
Functions
void ms5540_calc_temp_and_pressure ()
uns16 ms5540_get_config (uns8 config_word)
uns16 ms5540_get_raw_pressure ()
uns16 ms5540_get_raw_temp ()
void ms5540_init ()
void ms5540_pulse_sclk ()
void ms5540_reset ()
void ms5540_send_start ()
void ms5540_send_stop ()
void ms5540_setup_io (void)
Variables
int16 c1
int16 c2
int16 c3
int16 c4
int16 c5
int16 c6
402
Define Documentation
#define MS5540_DELAY_AMOUNT 2
Definition at line 42 of file ms5540.c.
Referenced by ms5540_pulse_sclk().
Function Documentation
void ms5540_calc_temp_and_pressure ()
Definition at line 322 of file ms5540.c.
References c1, c2, c3, c4, c5, c6, int16, int32, ms5540_get_raw_pressure(), ms5540_get_raw_temp(),
serial_print_int(), serial_print_nl(), and serial_print_str().
Here is the call graph for this function:
uns16 ms5540_get_config (uns8 config_word)
Definition at line 102 of file ms5540.c.
References change_pin, ms5540_pulse_sclk(), ms5540_send_start(), ms5540_send_stop(), test_pin, uns16, and
uns8.
Referenced by ms5540_init().
Here is the call graph for this function:
Here is the caller graph for this function:
403
uns16 ms5540_get_raw_pressure ()
Definition at line 154 of file ms5540.c.
References clear_pin, ms5540_pulse_sclk(), ms5540_send_start(), ms5540_send_stop(), set_pin, test_pin,
uns16, and uns8.
Referenced by ms5540_calc_temp_and_pressure().
Here is the call graph for this function:
Here is the caller graph for this function:
uns16 ms5540_get_raw_temp ()
Definition at line 200 of file ms5540.c.
References clear_pin, ms5540_pulse_sclk(), ms5540_send_start(), ms5540_send_stop(), set_pin, test_pin,
uns16, and uns8.
Referenced by ms5540_calc_temp_and_pressure().
Here is the call graph for this function:
Here is the caller graph for this function:
void ms5540_init ()
Definition at line 247 of file ms5540.c.
404
References c1, c2, c3, c4, c5, c6, ms5540_get_config(), ms5540_reset(), serial_print_int(), serial_print_nl(),
serial_print_spc(), serial_print_str(), and uns16.
Here is the call graph for this function:
void ms5540_pulse_sclk ()
Definition at line 54 of file ms5540.c.
References clear_pin, MS5540_DELAY_AMOUNT, and set_pin.
Referenced by ms5540_get_config(), ms5540_get_raw_pressure(), ms5540_get_raw_temp(), ms5540_reset(),
ms5540_send_start(), and ms5540_send_stop().
Here is the caller graph for this function:
void ms5540_reset ()
Definition at line 80 of file ms5540.c.
References change_pin, ms5540_pulse_sclk(), uns16, and uns8.
405
Referenced by ms5540_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void ms5540_send_start ()
Definition at line 63 of file ms5540.c.
References ms5540_pulse_sclk(), and set_pin.
Referenced by ms5540_get_config(), ms5540_get_raw_pressure(), and ms5540_get_raw_temp().
Here is the call graph for this function:
Here is the caller graph for this function:
void ms5540_send_stop ()
Definition at line 71 of file ms5540.c.
References clear_pin, and ms5540_pulse_sclk().
Referenced by ms5540_get_config(), ms5540_get_raw_pressure(), and ms5540_get_raw_temp().
Here is the call graph for this function:
Here is the caller graph for this function:
406
void ms5540_setup_io (void)
Definition at line 46 of file ms5540.c.
References clear_pin, make_input, and make_output.
Variable Documentation
int16 c1
Definition at line 44 of file ms5540.c.
Referenced by ms5540_calc_temp_and_pressure(), ms5540_init(), and sht15_fix_humidity_r().
int16 c2
Definition at line 44 of file ms5540.c.
Referenced by ms5540_calc_temp_and_pressure(), ms5540_init(), and sht15_fix_humidity_r().
int16 c3
Definition at line 44 of file ms5540.c.
Referenced by ms5540_calc_temp_and_pressure(), ms5540_init(), and sht15_fix_humidity_r().
int16 c4
Definition at line 44 of file ms5540.c.
Referenced by ms5540_calc_temp_and_pressure(), and ms5540_init().
int16 c5
Definition at line 44 of file ms5540.c.
Referenced by ms5540_calc_temp_and_pressure(), and ms5540_init().
int16 c6
407
Definition at line 44 of file ms5540.c.
Referenced by ms5540_calc_temp_and_pressure(), and ms5540_init().
ms5540.h File Reference
MS5540 temperature and pressure sensor routines. #include "pic_utils.h" Include dependency graph for ms5540.h:
This graph shows which files directly or indirectly include this file:
Defines
#define ms5540_setup() ms5540_setup_io()
Setup ms5540 ports and pins. Functions
void ms5540_calc_temp_and_pressure ()
uns16 ms5540_get_config (uns8 config_word)
uns16 ms5540_get_raw_pressure ()
uns16 ms5540_get_raw_temp ()
void ms5540_init ()
void ms5540_reset ()
void ms5540_setup_io (void)
Detailed Description
A library to communicate with the ms5540 sensor
408
Definition in file ms5540.h.
Define Documentation
#define ms5540_setup() ms5540_setup_io()
Definition at line 72 of file ms5540.h.
Function Documentation
void ms5540_calc_temp_and_pressure ()
Definition at line 322 of file ms5540.c.
References c1, c2, c3, c4, c5, c6, int16, int32, ms5540_get_raw_pressure(), ms5540_get_raw_temp(),
serial_print_int(), serial_print_nl(), and serial_print_str().
Here is the call graph for this function:
uns16 ms5540_get_config (uns8 config_word)
Definition at line 102 of file ms5540.c.
References change_pin, ms5540_pulse_sclk(), ms5540_send_start(), ms5540_send_stop(), test_pin, uns16, and
uns8.
Referenced by ms5540_init().
Here is the call graph for this function:
Here is the caller graph for this function:
409
uns16 ms5540_get_raw_pressure ()
Definition at line 154 of file ms5540.c.
References clear_pin, ms5540_pulse_sclk(), ms5540_send_start(), ms5540_send_stop(), set_pin, test_pin,
uns16, and uns8.
Referenced by ms5540_calc_temp_and_pressure().
Here is the call graph for this function:
Here is the caller graph for this function:
uns16 ms5540_get_raw_temp ()
Definition at line 200 of file ms5540.c.
References clear_pin, ms5540_pulse_sclk(), ms5540_send_start(), ms5540_send_stop(), set_pin, test_pin,
uns16, and uns8.
Referenced by ms5540_calc_temp_and_pressure().
Here is the call graph for this function:
Here is the caller graph for this function:
void ms5540_init ()
Definition at line 247 of file ms5540.c.
410
References c1, c2, c3, c4, c5, c6, ms5540_get_config(), ms5540_reset(), serial_print_int(), serial_print_nl(),
serial_print_spc(), serial_print_str(), and uns16.
Here is the call graph for this function:
void ms5540_reset ()
Definition at line 80 of file ms5540.c.
References change_pin, ms5540_pulse_sclk(), uns16, and uns8.
Referenced by ms5540_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void ms5540_setup_io (void)
Definition at line 46 of file ms5540.c.
References clear_pin, make_input, and make_output.
411
pcd8544.c File Reference #include "pcd8544.h" #include "pic_serial.h" Include dependency graph for pcd8544.c:
Functions
void pcd8544_init ()
void pcd8544_send_byte (uns8 b)
void pcd8544_send_command (uns8 cmd)
void pcd8544_send_data (uns8 data)
void pcd8544_setup_io ()
Function Documentation
void pcd8544_init ()
Definition at line 55 of file pcd8544.c.
References clear_pin, pcd8544_send_command(), and set_pin.
Referenced by drv_init().
Here is the call graph for this function:
Here is the caller graph for this function:
412
void pcd8544_send_byte (uns8 b)
Definition at line 107 of file pcd8544.c.
References change_pin, clear_pin, set_pin, and uns8.
Referenced by pcd8544_send_command(), and pcd8544_send_data().
Here is the caller graph for this function:
void pcd8544_send_command (uns8 cmd)
Definition at line 91 of file pcd8544.c.
References clear_pin, pcd8544_send_byte(), and set_pin.
Referenced by drv_paint(), and pcd8544_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void pcd8544_send_data (uns8 data)
Definition at line 99 of file pcd8544.c.
References clear_pin, pcd8544_send_byte(), and set_pin.
Referenced by drv_paint().
Here is the call graph for this function:
Here is the caller graph for this function:
413
void pcd8544_setup_io ()
Definition at line 40 of file pcd8544.c.
References clear_pin, make_output, and set_pin.
Referenced by drv_setup_io().
Here is the caller graph for this function:
pcd8544.h File Reference
PCD8544 Interface routines (used in Nokia 3310 LCD). #include "config.h" #include "pic_utils.h" Include dependency graph for pcd8544.h:
This graph shows which files directly or indirectly include this file:
Defines
#define pcd8544_setup() pcd8544_setup_io()
Functions
void pcd8544_clear ()
void pcd8544_init ()
414
void pcd8544_send_byte (uns8 b)
void pcd8544_send_command (uns8 command)
void pcd8544_send_data (uns8 data)
void pcd8544_set_pixel (uns8 x, uns8 y, uns8 colour)
void pcd8544_setup_io ()
void pcd8544_write (uns8 mem_addr, uns8 data)
Detailed Description
Routines to communicate with Nokia 3310 LCD display via the PCD8544 chip
Definition in file pcd8544.h.
Define Documentation
#define pcd8544_setup() pcd8544_setup_io()
Definition at line 76 of file pcd8544.h.
Function Documentation
void pcd8544_clear ()
void pcd8544_init ()
Definition at line 55 of file pcd8544.c.
References clear_pin, pcd8544_send_command(), and set_pin.
Referenced by drv_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void pcd8544_send_byte (uns8 b)
Definition at line 107 of file pcd8544.c.
References change_pin, clear_pin, set_pin, and uns8.
Referenced by pcd8544_send_command(), and pcd8544_send_data().
Here is the caller graph for this function:
415
void pcd8544_send_command (uns8 command)
Definition at line 91 of file pcd8544.c.
References clear_pin, pcd8544_send_byte(), and set_pin.
Referenced by drv_paint(), and pcd8544_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void pcd8544_send_data (uns8 data)
Definition at line 99 of file pcd8544.c.
References clear_pin, pcd8544_send_byte(), and set_pin.
Referenced by drv_paint().
Here is the call graph for this function:
Here is the caller graph for this function:
void pcd8544_set_pixel (uns8 x, uns8 y, uns8 colour)
void pcd8544_setup_io ()
Definition at line 40 of file pcd8544.c.
References clear_pin, make_output, and set_pin.
Referenced by drv_setup_io().
416
Here is the caller graph for this function:
void pcd8544_write (uns8 mem_addr, uns8 data)
pic_flash.c File Reference #include "pic_flash.h" Include dependency graph for pic_flash.c:
pic_flash.h File Reference
Flash write / erase routines. #include "pic_utils.h" #include "config.h" Include dependency graph for pic_flash.h:
417
This graph shows which files directly or indirectly include this file:
Functions
void flash_erase (FLASH_MEM_ADDR_TYPE address)
void flash_write (FLASH_MEM_ADDR_TYPE address, uns8 count, uns8 *data)
Detailed Description
Definition in file pic_flash.h.
Function Documentation
void flash_erase (FLASH_MEM_ADDR_TYPE address)
void flash_write (FLASH_MEM_ADDR_TYPE address, uns8 count, uns8 * data)
pic_packet.c File Reference #include "pic_packet.h" Include dependency graph for pic_packet.c:
418
Data Structures
union rf_packet
struct seen_packet
struct sending_item
Defines
#define PKT_FLAG_DELETED 0xff
Functions
void pkt_calc_check_byte (rf_packet *packet)
uns8 pkt_check_check_byte (rf_packet *packet)
void pkt_init (uns16 my_addr, uns16 last_sent_id)
Initialise packet delivery system. uns8 pkt_print_packet (rf_packet *my_packet)
uns8 pkt_process_rf_data (uns8 *data_in)
Process received RF data. void pkt_process_tx_queue ()
Handle queued items. uns8 pkt_queue_packet (rf_packet *packet, uns8 resend)
uns8 pkt_seen (uns16 pkt_id, uns16 source_addr)
void pkt_send_packet (rf_packet *packet)
uns8 pkt_send_payload (uns16 dest_addr, uns8 *payload, uns8 resend)
Send a payload via the packet delivery system. Variables
uns16 pkt_my_addr = 0x66
uns16 pkt_my_next_pkt_id = 0
static seen_packet pkt_seen_list [PKT_SEEN_LIST_SIZE]
uns8 pkt_seen_list_last = 0
static sending_item pkt_tx_queue [PKT_TX_QUEUE_SIZE]
419
Define Documentation
#define PKT_FLAG_DELETED 0xff
Definition at line 78 of file pic_packet.c.
Referenced by pkt_init(), pkt_process_rf_data(), pkt_process_tx_queue(), and pkt_queue_packet().
Function Documentation
void pkt_calc_check_byte (rf_packet * packet)
Definition at line 93 of file pic_packet.c.
References rf_packet::a, rf_packet_det::check_byte, rf_packet::d, PKT_PACKET_SIZE, and uns8.
Referenced by pkt_process_rf_data(), pkt_process_tx_queue(), and pkt_send_payload().
Here is the caller graph for this function:
uns8 pkt_check_check_byte (rf_packet * packet)
Definition at line 104 of file pic_packet.c.
References rf_packet::a, rf_packet_det::check_byte, rf_packet::d, PKT_PACKET_SIZE, and uns8.
Referenced by pkt_process_rf_data().
Here is the caller graph for this function:
void pkt_init (uns16 my_addr, uns16 last_sent_pkt_id)
Initialise the packet delivery system ready for use. This routine clears the transmit queue and seen
queue. If you don't store the last_sent_pkt_id (eg, in EEPROM) then set this to 0.
Parameters:
my_addr The address of this system
last_sent_pkt_id The last pkt_id used by this system.
Definition at line 423 of file pic_packet.c.
References sending_item::flag, PKT_FLAG_DELETED, pkt_my_addr, pkt_my_next_pkt_id,
seen_packet::source_addr, uns16, and uns8.
420
uns8 pkt_print_packet (rf_packet * my_packet)
Definition at line 120 of file pic_packet.c.
References rf_packet::d, rf_packet_det::dest_addr, rf_packet_det::payload, rf_packet_det::pkt_id,
rf_packet_det::r1_addr, rf_packet_det::r2_addr, rf_packet_det::r3_addr, serial_print_int_hex(),
serial_print_spc(), serial_print_str(), rf_packet_det::source_addr, and uns8.
Referenced by pkt_process_rf_data(), pkt_process_tx_queue(), pkt_send_packet(), and pkt_send_payload().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 pkt_process_rf_data (uns8 * data_in)
Call this routine when your RF device has received a chunk of data from somewhere. The packet
delivery system will handle everything including acknowledgements and ignoring packets that it has
already seen.
Parameters:
pkt_in A pointer to the received data. It is assumed that this will point to PKT_PACKET_SIZE bytes of
data.
Definition at line 174 of file pic_packet.c.
References rf_packet::d, rf_packet_det::dest_addr, end_crit_sec, sending_item::flag, sending_item::packet,
PKT_BROADCAST_ADDR, pkt_calc_check_byte(), pkt_check_check_byte(), PKT_DIRECT_SEND_ADDR,
PKT_FLAG_DELETED, PKT_FLAG_NO_RESEND, seen_packet::pkt_id, rf_packet_det::pkt_id,
pkt_my_addr, PKT_PACKET_SIZE, pkt_payload_rx_callback(), pkt_print_packet(), pkt_queue_packet(),
pkt_seen(), pkt_seen_list_last, pkt_send_payload(), pkt_send_succeeded_callback(),
PKT_STATUS_CHECK_FAIL, PKT_STATUS_DIRECT_SEND, PKT_STATUS_I_AM_SENDER,
PKT_STATUS_NEED_TO_REBROADCAST, PKT_STATUS_PKT_FOR_ME_BUT_SEEN,
PKT_STATUS_PKT_IS_ACK_FOR_ME, PKT_STATUS_PKT_IS_FACK_FOR_ME,
PKT_STATUS_PKT_IS_FOR_ME, PKT_STATUS_PREVIOUS_ROUTED_VIA_ME,
PKT_STATUS_ROUTING_FULL, PKT_STATUS_SEEN_BEFORE, serial_print_int(), serial_print_str(),
serial_putc(), seen_packet::source_addr, start_crit_sec, uns16, and uns8.
421
Here is the call graph for this function:
void pkt_process_tx_queue ()
Call this routine regularly (as often as possible) in your main loop in order for the packet delivery
system to send any queued packets when it is appropriate to do so. It will also remove any packets
from the tx queue that have been there too long.
Definition at line 354 of file pic_packet.c.
References rf_packet::d, rf_packet_det::dest_addr, sending_item::flag, sending_item::packet,
rf_packet_det::payload, pkt_calc_check_byte(), PKT_FLAG_DELETED, PKT_FLAG_RESEND,
rf_packet_det::pkt_id, pkt_print_packet(), pkt_send_callback(), pkt_send_failed_callback(), pkt_send_packet(),
rf_packet_det::r1_addr, sending_item::sent_count, serial_print_int(), serial_print_spc(), serial_print_str(),
tick_calc_diff(), tick_get_count(), sending_item::tick_sent, uns16, and uns8.
Here is the call graph for this function:
422
uns8 pkt_queue_packet (rf_packet * packet, uns8 resend)
Definition at line 144 of file pic_packet.c.
References sending_item::flag, PKT_FLAG_DELETED, PKT_PACKET_SIZE, PKT_STATUS_QUEUED,
PKT_STATUS_TX_QUEUE_FULL, sending_item::sent_count, serial_print_int(), serial_print_str(), and uns8.
Referenced by pkt_process_rf_data(), and pkt_send_payload().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 pkt_seen (uns16 pkt_id, uns16 source_addr)
Definition at line 80 of file pic_packet.c.
References uns8.
Referenced by pkt_process_rf_data().
Here is the caller graph for this function:
423
void pkt_send_packet (rf_packet * packet) [inline]
Definition at line 328 of file pic_packet.c.
References rf_packet::a, pic_rf_transmit(), PKT_PACKET_SIZE, pkt_print_packet(), serial_print_str(),
tx_buffer, and uns8.
Referenced by pkt_process_tx_queue().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 pkt_send_payload (uns16 dest_addr, uns8 * payload, uns8 resend)
Use this routine to send a payload of data to the destination address. The payload must point to
PKT_PAYLOAD_SIZE bytes of data (as defined in your config.h). The packet will be constructed,
setting destination address, sender address (set previously in pkt_init) payload, initial routing
directions and the check byte calculated. It will then be placed into the tx queue and will actually be
sent next time pkt_process_tx_queue is called.
Parameters:
dest_addr Send payload to this address. Use address of PKT_BROADCAST_ADDR to broadcast to all
listening local addresses
pay_load Pointer to PKT_PAYLOAD_SIZE array of bytes
resend Set to PKT_FLAG_RESEND or PKT_FLAG_NO_RESEND
Definition at line 440 of file pic_packet.c.
References rf_packet::d, rf_packet_det::dest_addr, rf_packet_det::payload, PKT_BROADCAST_ADDR,
pkt_calc_check_byte(), PKT_DIRECT_SEND_ADDR, rf_packet_det::pkt_id, pkt_my_addr,
pkt_my_next_pkt_id, pkt_print_packet(), pkt_queue_packet(), rf_packet_det::r1_addr, rf_packet_det::r2_addr,
rf_packet_det::r3_addr, serial_print_int(), serial_print_str(), rf_packet_det::source_addr, and uns8.
Referenced by pkt_process_rf_data().
424
Here is the call graph for this function:
Here is the caller graph for this function:
Variable Documentation
uns16 pkt_my_addr = 0x66
Definition at line 74 of file pic_packet.c.
Referenced by pkt_init(), pkt_process_rf_data(), and pkt_send_payload().
uns16 pkt_my_next_pkt_id = 0
Definition at line 75 of file pic_packet.c.
Referenced by pkt_init(), and pkt_send_payload().
seen_packet pkt_seen_list[PKT_SEEN_LIST_SIZE] [static]
Definition at line 70 of file pic_packet.c.
uns8 pkt_seen_list_last = 0
Definition at line 73 of file pic_packet.c.
Referenced by pkt_process_rf_data().
sending_item pkt_tx_queue[PKT_TX_QUEUE_SIZE] [static]
Definition at line 71 of file pic_packet.c.
425
pic_packet.h File Reference
Pic meshed packed network library. #include "pic_utils.h" #include "pic_serial.h" #include "pic_tick.h" #include "config.h" #include <memory.h> #include "pic_rf_2401a.h" Include dependency graph for pic_packet.h:
This graph shows which files directly or indirectly include this file:
Data Structures
struct rf_packet_det
Defines
#define PKT_BROADCAST_ADDR 0xfffe
#define PKT_CONFIG_ADDR 0xfffd
#define PKT_DIRECT_SEND_ADDR 0xffff
#define PKT_FLAG_BROADCAST 2
#define PKT_FLAG_NO_RESEND 0
#define PKT_FLAG_RESEND 1
426
#define PKT_PACKET_SIZE sizeof(rf_packet_det)
#define PKT_STATUS_CHECK_FAIL 12
#define PKT_STATUS_DIRECT_SEND 6
#define PKT_STATUS_I_AM_SENDER 2
#define PKT_STATUS_NEED_TO_REBROADCAST 9
#define PKT_STATUS_PKT_FOR_ME_BUT_SEEN 13
#define PKT_STATUS_PKT_IS_ACK_FOR_ME 4
#define PKT_STATUS_PKT_IS_FACK_FOR_ME 5
#define PKT_STATUS_PKT_IS_FOR_ME 3
#define PKT_STATUS_PREVIOUS_ROUTED_VIA_ME 7
#define PKT_STATUS_QUEUED 10
#define PKT_STATUS_ROUTING_FULL 8
#define PKT_STATUS_SEEN_BEFORE 1
#define PKT_STATUS_TX_QUEUE_FULL 11
#define RF_RX_BUFFER_SIZE PKT_PACKET_SIZE
Functions
void pkt_init (uns16 my_addr, uns16 last_sent_pkt_id)
Initialise packet delivery system. void pkt_payload_rx_callback (uns16 source_addr, uns16 pkt_id, uns8
*payload)
Called when a packet has been received. uns8 pkt_process_rf_data (uns8 *data_in)
Process received RF data. void pkt_process_tx_queue ()
Handle queued items. void pkt_send_callback (uns16 dest_addr, uns16 pkt_id)
void pkt_send_failed_callback (uns16 dest_addr, uns16 pkt_id)
uns8 pkt_send_payload (uns16 dest_addr, uns8 *payload, uns8 resend)
Send a payload via the packet delivery system. void pkt_send_succeeded_callback (uns16 dest_addr, uns16
pkt_id)
Detailed Description
Assumes either nrf2401a or nrf24l01 library
Definition in file pic_packet.h.
Define Documentation
#define PKT_BROADCAST_ADDR 0xfffe
Send to anyone that will listen
Definition at line 172 of file pic_packet.h.
Referenced by pkt_process_rf_data(), and pkt_send_payload().
#define PKT_CONFIG_ADDR 0xfffd
Magic config packet address
Definition at line 169 of file pic_packet.h.
#define PKT_DIRECT_SEND_ADDR 0xffff
Router address for direct send only (no routing)
Definition at line 175 of file pic_packet.h.
427
Referenced by pkt_process_rf_data(), and pkt_send_payload().
#define PKT_FLAG_BROADCAST 2
Packet should be broadcast to anyone on the network
Definition at line 165 of file pic_packet.h.
#define PKT_FLAG_NO_RESEND 0
Packet should not be resent if it fails to reach destination
Definition at line 159 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_FLAG_RESEND 1
Packet should be resent if it fails to reach destination
Definition at line 162 of file pic_packet.h.
Referenced by pkt_process_tx_queue().
#define PKT_PACKET_SIZE sizeof(rf_packet_det)
Definition at line 202 of file pic_packet.h.
Referenced by pkt_calc_check_byte(), pkt_check_check_byte(), pkt_process_rf_data(), pkt_queue_packet(),
and pkt_send_packet().
#define PKT_STATUS_CHECK_FAIL 12
Packet is corrupt, ignoring
Definition at line 151 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_DIRECT_SEND 6
Packet is direct send, but not for me, ignoring
Definition at line 133 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_I_AM_SENDER 2
I have sent this packet, so ignoring
Definition at line 121 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_NEED_TO_REBROADCAST 9
Packet is not for me, but protocol states I need to rebroadcast it
Definition at line 142 of file pic_packet.h.
Referenced by pkt_process_rf_data().
428
#define PKT_STATUS_PKT_FOR_ME_BUT_SEEN 13
Packet is for me but seen previously
Definition at line 154 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_PKT_IS_ACK_FOR_ME 4
Packet is ACK for me, but didn't find in my transmit queue
Definition at line 127 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_PKT_IS_FACK_FOR_ME 5
Packet is ACK for me, found in and removed from transmit queue (successful send)
Definition at line 130 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_PKT_IS_FOR_ME 3
Packet is for me
Definition at line 124 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_PREVIOUS_ROUTED_VIA_ME 7
Packet has my address in the router list, ignoring
Definition at line 136 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_QUEUED 10
Packet queued for transmition
Definition at line 145 of file pic_packet.h.
Referenced by pkt_queue_packet().
#define PKT_STATUS_ROUTING_FULL 8
Packet not retransmitted since its routing list is full
Definition at line 139 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_SEEN_BEFORE 1
Packet is already in seen list, ignoring
Definition at line 118 of file pic_packet.h.
Referenced by pkt_process_rf_data().
#define PKT_STATUS_TX_QUEUE_FULL 11
Packet has not been queued for transmition since my transmit queue is full
429
Definition at line 148 of file pic_packet.h.
Referenced by pkt_queue_packet().
#define RF_RX_BUFFER_SIZE PKT_PACKET_SIZE
Definition at line 204 of file pic_packet.h.
Function Documentation
void pkt_init (uns16 my_addr, uns16 last_sent_pkt_id)
Initialise the packet delivery system ready for use. This routine clears the transmit queue and seen
queue. If you don't store the last_sent_pkt_id (eg, in EEPROM) then set this to 0.
Parameters:
my_addr The address of this system
last_sent_pkt_id The last pkt_id used by this system.
Definition at line 423 of file pic_packet.c.
References sending_item::flag, PKT_FLAG_DELETED, pkt_my_addr, pkt_my_next_pkt_id,
seen_packet::source_addr, uns16, and uns8.
void pkt_payload_rx_callback (uns16 source_addr, uns16 pkt_id, uns8 * payload)
Once a packet has been received, if it has not been seen before and it is destined to this address (set
using pkt_init), then this routine will be called. You must have this routine defined in your own code.
Parameters:
source_addr The address of the system that sent the packet
pkt_id The ID of the packet (the source_addr and pkt_id are used to uniquely identify the packet
payload A pointer to PKT_PACKET_SIZE bytes received
Referenced by pkt_process_rf_data().
Here is the caller graph for this function:
uns8 pkt_process_rf_data (uns8 * data_in)
Call this routine when your RF device has received a chunk of data from somewhere. The packet
delivery system will handle everything including acknowledgements and ignoring packets that it has
already seen.
Parameters:
pkt_in A pointer to the received data. It is assumed that this will point to PKT_PACKET_SIZE bytes of
data.
Definition at line 174 of file pic_packet.c.
References rf_packet::d, rf_packet_det::dest_addr, end_crit_sec, sending_item::flag, sending_item::packet,
PKT_BROADCAST_ADDR, pkt_calc_check_byte(), pkt_check_check_byte(), PKT_DIRECT_SEND_ADDR,
PKT_FLAG_DELETED, PKT_FLAG_NO_RESEND, seen_packet::pkt_id, rf_packet_det::pkt_id,
pkt_my_addr, PKT_PACKET_SIZE, pkt_payload_rx_callback(), pkt_print_packet(), pkt_queue_packet(),
pkt_seen(), pkt_seen_list_last, pkt_send_payload(), pkt_send_succeeded_callback(),
430
PKT_STATUS_CHECK_FAIL, PKT_STATUS_DIRECT_SEND, PKT_STATUS_I_AM_SENDER,
PKT_STATUS_NEED_TO_REBROADCAST, PKT_STATUS_PKT_FOR_ME_BUT_SEEN,
PKT_STATUS_PKT_IS_ACK_FOR_ME, PKT_STATUS_PKT_IS_FACK_FOR_ME,
PKT_STATUS_PKT_IS_FOR_ME, PKT_STATUS_PREVIOUS_ROUTED_VIA_ME,
PKT_STATUS_ROUTING_FULL, PKT_STATUS_SEEN_BEFORE, serial_print_int(), serial_print_str(),
serial_putc(), seen_packet::source_addr, start_crit_sec, uns16, and uns8.
Here is the call graph for this function:
void pkt_process_tx_queue ()
Call this routine regularly (as often as possible) in your main loop in order for the packet delivery
system to send any queued packets when it is appropriate to do so. It will also remove any packets
from the tx queue that have been there too long.
Definition at line 354 of file pic_packet.c.
References rf_packet::d, rf_packet_det::dest_addr, sending_item::flag, sending_item::packet,
rf_packet_det::payload, pkt_calc_check_byte(), PKT_FLAG_DELETED, PKT_FLAG_RESEND,
rf_packet_det::pkt_id, pkt_print_packet(), pkt_send_callback(), pkt_send_failed_callback(), pkt_send_packet(),
rf_packet_det::r1_addr, sending_item::sent_count, serial_print_int(), serial_print_spc(), serial_print_str(),
tick_calc_diff(), tick_get_count(), sending_item::tick_sent, uns16, and uns8.
Here is the call graph for this function:
431
void pkt_send_callback (uns16 dest_addr, uns16 pkt_id)
Referenced by pkt_process_tx_queue().
Here is the caller graph for this function:
void pkt_send_failed_callback (uns16 dest_addr, uns16 pkt_id)
Referenced by pkt_process_tx_queue().
Here is the caller graph for this function:
uns8 pkt_send_payload (uns16 dest_addr, uns8 * payload, uns8 resend)
Use this routine to send a payload of data to the destination address. The payload must point to
PKT_PAYLOAD_SIZE bytes of data (as defined in your config.h). The packet will be constructed,
setting destination address, sender address (set previously in pkt_init) payload, initial routing
directions and the check byte calculated. It will then be placed into the tx queue and will actually be
sent next time pkt_process_tx_queue is called.
Parameters:
dest_addr Send payload to this address. Use address of PKT_BROADCAST_ADDR to broadcast to all
listening local addresses
pay_load Pointer to PKT_PAYLOAD_SIZE array of bytes
432
resend Set to PKT_FLAG_RESEND or PKT_FLAG_NO_RESEND
Definition at line 440 of file pic_packet.c.
References rf_packet::d, rf_packet_det::dest_addr, rf_packet_det::payload, PKT_BROADCAST_ADDR,
pkt_calc_check_byte(), PKT_DIRECT_SEND_ADDR, rf_packet_det::pkt_id, pkt_my_addr,
pkt_my_next_pkt_id, pkt_print_packet(), pkt_queue_packet(), rf_packet_det::r1_addr, rf_packet_det::r2_addr,
rf_packet_det::r3_addr, serial_print_int(), serial_print_str(), rf_packet_det::source_addr, and uns8.
Referenced by pkt_process_rf_data().
Here is the call graph for this function:
Here is the caller graph for this function:
void pkt_send_succeeded_callback (uns16 dest_addr, uns16 pkt_id)
Referenced by pkt_process_rf_data().
Here is the caller graph for this function:
pic_pwm.c File Reference #include "pic_pwm.h" #include "config.h" Include dependency graph for pic_pwm.c:
433
Functions
uns8 pwm_get_level (uns8 pwm_item)
void pwm_handle ()
void pwm_set_level (uns8 pwm_item, uns8 level)
void pwm_set_transition (uns8 pwm_item, uns8 to_level, uns16 steps)
void pwm_setup_io ()
Variables
uns8 pwm_count
uns8 pwm_level [PWM_NUM_PINS]
Function Documentation
uns8 pwm_get_level (uns8 pwm_item)
Definition at line 50 of file pic_pwm.c.
References pwm_level.
void pwm_handle ()
Definition at line 70 of file pic_pwm.c.
References clear_pin, pwm_count, pwm_level, set_pin, and uns8.
void pwm_set_level (uns8 pwm_item, uns8 level)
Definition at line 45 of file pic_pwm.c.
References pwm_level.
434
void pwm_set_transition (uns8 pwm_item, uns8 to_level, uns16 steps)
Definition at line 54 of file pic_pwm.c.
void pwm_setup_io ()
Definition at line 58 of file pic_pwm.c.
References make_output.
Variable Documentation
uns8 pwm_count
Definition at line 41 of file pic_pwm.c.
Referenced by pwm_handle().
uns8 pwm_level[PWM_NUM_PINS]
Definition at line 42 of file pic_pwm.c.
Referenced by pwm_get_level(), pwm_handle(), and pwm_set_level().
pic_pwm.h File Reference
Software (timer-based) PWM. #include "config.h" #include "pic_utils.h" Include dependency graph for pic_pwm.h:
This graph shows which files directly or indirectly include this file:
435
Functions
uns8 pwm_get_level (uns8 pwm_item)
void pwm_handle ()
void pwm_set_level (uns8 pwm_item, uns8 level)
void pwm_set_transition (uns8 to_level, uns16 steps)
void pwm_setup_io ()
Variables
uns8 pwm_count
uns8 pwm_level [PWM_NUM_PINS]
Detailed Description
Definition in file pic_pwm.h.
Function Documentation
uns8 pwm_get_level (uns8 pwm_item)
Definition at line 50 of file pic_pwm.c.
References pwm_level.
void pwm_handle ()
Definition at line 70 of file pic_pwm.c.
References clear_pin, pwm_count, pwm_level, set_pin, and uns8.
void pwm_set_level (uns8 pwm_item, uns8 level)
Definition at line 45 of file pic_pwm.c.
References pwm_level.
436
void pwm_set_transition (uns8 to_level, uns16 steps)
void pwm_setup_io ()
Definition at line 58 of file pic_pwm.c.
References make_output.
Variable Documentation
uns8 pwm_count
Definition at line 41 of file pic_pwm.c.
Referenced by pwm_handle().
uns8 pwm_level[PWM_NUM_PINS]
Definition at line 42 of file pic_pwm.c.
Referenced by pwm_get_level(), pwm_handle(), and pwm_set_level().
pic_rf_2401a.c File Reference #include "pic_rf_2401a.h" #include "pic_serial.h" #include <stdlib.h> Include dependency graph for pic_rf_2401a.c:
437
Functions
void pic_rf_init (rf_config *my_config)
Initialise nrf2401a chip with config. void pic_rf_quick_init (char *my_config, uns8 my_channel, bit
my_receive_on)
Initialise nrf2401a chip with quick config. void pic_rf_receive (uns8 *data, uns8 bytes_to_receive)
Receive data from nrf2401a. void pic_rf_send_byte (uns8 b)
Internal routine to send a byte to nrf2401a. void pic_rf_send_bytes (char *bytes, uns8 num_bytes)
Internal routine to send bytes to nrf2401a. void pic_rf_set_channel (uns8 channel)
Change channel on the nrf2401a. void pic_rf_set_mode (uns8 mode)
Set rf mode to transmit or receive. void pic_rf_setup ()
Setup ports and pins for communication with nrf2401a. void pic_rf_transmit (char *data, uns8
bytes_to_transmit)
Transmit data from nrf2401a.
Function Documentation
void pic_rf_init (rf_config * my_config)
Initialise nRF24L01 chip with config.
Sends the configuration to the Nordic nrf2401a chip ready to begin communication. This routine
assumes you have already set my_config to the correct values.
Definition at line 83 of file pic_rf_2401a.c.
void pic_rf_quick_init (char * my_config, uns8 my_channel, bit my_receive_on)
While the usual pic_rf_init() routine is excellent when you want to programatically change the 2401a
config, if you're only doing this once (at the start) then it's likely you're burning a lot of instructions
(154 words on a PIC16 device) just to send some bytes of config out to the 2401a. If you know your
config in advance, then you can just send the byte-stream config using this routine. Use the
nrf2401a_config.pl script in the tools directory to generate this string.
Definition at line 62 of file pic_rf_2401a.c.
void pic_rf_receive (uns8 * data, uns8 bytes_to_receive)
Receive data from nRF24L01.
Having been notified that there is data available, call this routine to clock the data in from the
nrf2401a.
!pic_rf_chip_enable(0); // save power
pic_rf_chip_enable(1); // turn chip back on
Definition at line 130 of file pic_rf_2401a.c.
void pic_rf_send_byte (uns8 b)
Clock a byte into the nRF24L01.
Internal routine to send a byte to the nrf2401a. Generally you shouldn't need to use this, see
pic_rf_transmit instead
See also:
pic_rf_transmit
Definition at line 41 of file pic_rf_2401a.c.
438
Referenced by pic_rf_init(), pic_rf_quick_init(), pic_rf_read_register(), pic_rf_send_bytes(),
pic_rf_send_bytes_inline(), pic_rf_send_command(), pic_rf_send_command_single(), and
pic_rf_set_channel().
Here is the caller graph for this function:
void pic_rf_send_bytes (char * bytes, uns8 num_bytes)
Internal routine to send bytes to the nrf2401a. Generally you shouldn't need to use this, see
pic_rf_transmit instead
See also:
pic_rf_transmit
Definition at line 54 of file pic_rf_2401a.c.
References pic_rf_send_byte(), and uns8.
Referenced by pic_rf_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void pic_rf_set_channel (uns8 channel)
Receive data from nRF24L01 (inline).
Reclocks the essential config to change the current channel used by the nrf2401a.
Definition at line 199 of file pic_rf_2401a.c.
439
void pic_rf_set_mode (uns8 mode)
Pass RECEIVE_MODE or TRANSMIT_MODE to change current mode. Generally, you shouldn't
need to call this routine. The library assumes you want to receive until you transmit, in which case it
switches automatically to transmit mode and back to receive afterwards.
Definition at line 178 of file pic_rf_2401a.c.
Referenced by pic_rf_transmit().
Here is the caller graph for this function:
void pic_rf_setup ()
Setup ports and pins for communication with nRF24L01.
Set up ports and pins to correct input/output for communication with Nordif nrf2401a
Definition at line 221 of file pic_rf_2401a.c.
void pic_rf_transmit (char * data, uns8 bytes_to_transmit)
Changes to transmit mode, clocks data into the nRF2401A and hits the shockburst button. Returns to
receive mode when finished.
Definition at line 154 of file pic_rf_2401a.c.
References kill_interrupts, make_output, pic_rf_chip_enable, pic_rf_send_bytes_inline(), pic_rf_set_mode(),
RECEIVE_MODE, rf_current_mode_receive, TRANSMIT_MODE, and uns8.
Referenced by pkt_send_packet().
Here is the call graph for this function:
Here is the caller graph for this function:
pic_rf_2401a.h File Reference
Pic Nordic nrf2401a routines. #include "config.h" #include "pic_utils.h" Include dependency graph for pic_rf_2401a.h:
440
This graph shows which files directly or indirectly include this file:
Data Structures
struct rf_config
Defines
#define OP_ENABLE_1_MBPS 5
#define OP_ENABLE_CH2 7
#define OP_ENABLE_CRC 2
#define OP_ENABLE_RECEIVE 0
#define OP_ENABLE_SHOCKBURST 6
#define OP_LONG_CRC 1
#define pic_rf_chip_enable(value) change_pin(rf_ce_port, rf_ce_pin, value);
#define pic_rf_chip_select(value) change_pin(rf_cs_port, rf_cs_pin, value);
#define pic_rf_init_inline(my_config)
Inline version of the pic_rf_init routine. #define pic_rf_receive_mode() pic_rf_set_mode(RECEIVE_MODE)
#define pic_rf_transmit_mode() pic_rf_set_mode(TRANSMIT_MODE)
#define RECEIVE_MODE 1
#define TRANSMIT_MODE 0
Functions
void pic_rf_init (rf_config *my_config)
Initialise nrf2401a chip with config. void pic_rf_quick_init (char *my_config, uns8 my_channel, bit
my_receive_on)
Initialise nrf2401a chip with quick config. void pic_rf_receive (uns8 *data, uns8 bytes_to_receive)
441
Receive data from nrf2401a. void pic_rf_send_byte (uns8 b)
Internal routine to send a byte to nrf2401a. void pic_rf_send_bytes (char *bytes, uns8 num_bytes)
Internal routine to send bytes to nrf2401a. void pic_rf_send_bytes_inline (char *bytes, uns8 num_bytes)
Inline version of send_bytes. void pic_rf_set_channel (uns8 channel)
Change channel on the nrf2401a. void pic_rf_set_mode (uns8 mode)
Set rf mode to transmit or receive. void pic_rf_setup ()
Setup ports and pins for communication with nrf2401a. void pic_rf_transmit (char *data, uns8
bytes_to_transmit)
Transmit data from nrf2401a. Variables
static uns8 rf_current_channel = 2
static bit rf_current_mode_receive = 0
Detailed Description
Nordic nrf2401a routines
Definition in file pic_rf_2401a.h.
Define Documentation
#define OP_ENABLE_1_MBPS 5
rf_config options - enable 1 MPS transmition (otherwise 250Kbps)
Definition at line 101 of file pic_rf_2401a.h.
#define OP_ENABLE_CH2 7
rf_config options - enable channel 2 reception
Definition at line 105 of file pic_rf_2401a.h.
#define OP_ENABLE_CRC 2
rf_config options - enable CRC (recommended!)
Definition at line 99 of file pic_rf_2401a.h.
#define OP_ENABLE_RECEIVE 0
rf_config options - enable receive
Definition at line 95 of file pic_rf_2401a.h.
#define OP_ENABLE_SHOCKBURST 6
rf_config options - enable shockburst transmition
Definition at line 103 of file pic_rf_2401a.h.
#define OP_LONG_CRC 1
rf_config options - enable 16 bit CRC (otherwise 8 bit CRC if 0)
Definition at line 97 of file pic_rf_2401a.h.
442
#define pic_rf_chip_enable(value) change_pin(rf_ce_port, rf_ce_pin, value);
Set chip enable line (CE) to the given value
Definition at line 183 of file pic_rf_2401a.h.
Referenced by pic_rf_init(), pic_rf_quick_init(), pic_rf_set_channel(), pic_rf_set_mode(), and pic_rf_transmit().
#define pic_rf_chip_select(value) change_pin(rf_cs_port, rf_cs_pin, value);
Set chip select line (CS) to the given value
Definition at line 180 of file pic_rf_2401a.h.
Referenced by pic_rf_init(), pic_rf_quick_init(), pic_rf_set_channel(), and pic_rf_set_mode().
#define pic_rf_init_inline(my_config)
Depending upon your chip, if you're using the programmatic method of configuring the nrf2401a you
may find that this routine helps you use less flash and/or stack space
Definition at line 192 of file pic_rf_2401a.h.
#define pic_rf_receive_mode() pic_rf_set_mode(RECEIVE_MODE)
Change to receive mode
Definition at line 174 of file pic_rf_2401a.h.
#define pic_rf_transmit_mode() pic_rf_set_mode(TRANSMIT_MODE)
Change to transmit mode
Definition at line 177 of file pic_rf_2401a.h.
#define RECEIVE_MODE 1
Mode selection - receive
Definition at line 109 of file pic_rf_2401a.h.
Referenced by pic_rf_set_mode(), and pic_rf_transmit().
#define TRANSMIT_MODE 0
Mode selection - transmit
Definition at line 111 of file pic_rf_2401a.h.
Referenced by pic_rf_set_mode(), and pic_rf_transmit().
Function Documentation
void pic_rf_init (rf_config * my_config)
Sends the configuration to the Nordic nrf2401a chip ready to begin communication. This routine
assumes you have already set my_config to the correct values.
Definition at line 83 of file pic_rf_2401a.c.
443
void pic_rf_quick_init (char * my_config, uns8 my_channel, bit my_receive_on)
While the usual pic_rf_init() routine is excellent when you want to programatically change the 2401a
config, if you're only doing this once (at the start) then it's likely you're burning a lot of instructions
(154 words on a PIC16 device) just to send some bytes of config out to the 2401a. If you know your
config in advance, then you can just send the byte-stream config using this routine. Use the
nrf2401a_config.pl script in the tools directory to generate this string.
Definition at line 62 of file pic_rf_2401a.c.
void pic_rf_receive (uns8 * data, uns8 bytes_to_receive)
Having been notified that there is data available, call this routine to clock the data in from the
nrf2401a.
!pic_rf_chip_enable(0); // save power
pic_rf_chip_enable(1); // turn chip back on
Definition at line 130 of file pic_rf_2401a.c.
void pic_rf_send_byte (uns8 b)
Internal routine to send a byte to the nrf2401a. Generally you shouldn't need to use this, see
pic_rf_transmit instead
See also:
pic_rf_transmit
Definition at line 41 of file pic_rf_2401a.c.
void pic_rf_send_bytes (char * bytes, uns8 num_bytes)
Internal routine to send bytes to the nrf2401a. Generally you shouldn't need to use this, see
pic_rf_transmit instead
See also:
pic_rf_transmit
Definition at line 54 of file pic_rf_2401a.c.
References pic_rf_send_byte(), and uns8.
Referenced by pic_rf_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void pic_rf_send_bytes_inline (char * bytes, uns8 num_bytes) [inline]
Inline version of pc_rf_send_bytes. This is an internal routine, and generally you shouldn't need to
call it. Use pic_rf_transmit instead.
444
See also:
pic_rf_transmit
Definition at line 273 of file pic_rf_2401a.h.
References pic_rf_send_byte(), and uns8.
Referenced by pic_rf_transmit().
Here is the call graph for this function:
Here is the caller graph for this function:
void pic_rf_set_channel (uns8 channel)
Reclocks the essential config to change the current channel used by the nrf2401a.
Definition at line 199 of file pic_rf_2401a.c.
void pic_rf_set_mode (uns8 mode)
Pass RECEIVE_MODE or TRANSMIT_MODE to change current mode. Generally, you shouldn't
need to call this routine. The library assumes you want to receive until you transmit, in which case it
switches automatically to transmit mode and back to receive afterwards.
Definition at line 178 of file pic_rf_2401a.c.
void pic_rf_setup ()
Set up ports and pins to correct input/output for communication with Nordif nrf2401a
Definition at line 221 of file pic_rf_2401a.c.
void pic_rf_transmit (char * data, uns8 bytes_to_transmit)
Changes to transmit mode, clocks data into the nRF2401A and hits the shockburst button. Returns to
receive mode when finished.
Definition at line 154 of file pic_rf_2401a.c.
References kill_interrupts, make_output, pic_rf_chip_enable, pic_rf_send_bytes_inline(), pic_rf_set_mode(),
RECEIVE_MODE, rf_current_mode_receive, TRANSMIT_MODE, and uns8.
Referenced by pkt_send_packet().
Here is the call graph for this function:
Here is the caller graph for this function:
445
Variable Documentation
uns8 rf_current_channel = 2 [static]
Maintain state of current channel
Definition at line 116 of file pic_rf_2401a.h.
Referenced by pic_rf_init(), pic_rf_quick_init(), and pic_rf_set_channel().
bit rf_current_mode_receive = 0 [static]
Maintain state of current mode (1 = receive mode)
Definition at line 114 of file pic_rf_2401a.h.
Referenced by pic_rf_init(), pic_rf_quick_init(), pic_rf_set_channel(), pic_rf_set_mode(), and pic_rf_transmit().
pic_rf_24l01.c File Reference #include "pic_rf_24l01.h" #include "pic_serial.h" #include <stdlib.h> Include dependency graph for pic_rf_24l01.c:
Functions
void pic_rf_init (rf_config *my_config)
Initialise nrf2401a chip with config. void pic_rf_quick_init (char *my_config, uns8 my_channel, bit
my_receive_on)
Initialise nrf2401a chip with quick config. uns8 pic_rf_read_register (uns8 cmd, uns8 *data, uns8 data_len)
Read nRF24L01 register. uns8 pic_rf_read_register_int (uns8 cmd, uns8 *data, uns8 data_len)
446
uns8 pic_rf_receive (uns8 *data, uns8 bytes_to_receive)
Receive data from nrf2401a. void pic_rf_receive2 (uns8 *data, uns8 bytes_to_receive)
void pic_rf_receive_inline (uns8 *data, uns8 bytes_to_receive)
Receive data from nRF24L01. uns8 pic_rf_send_byte (uns8 b)
Internal routine to send a byte to nrf2401a. uns8 pic_rf_send_byte_int (uns8 b)
Clock a byte into the nRF24L01. uns8 pic_rf_send_command (uns8 cmd, uns8 *data, uns8 data_len)
Send command to the nrf24l01. uns8 pic_rf_send_command_single (uns8 cmd, uns8 data)
Send a single data byte command to the nrf24l01. void pic_rf_set_channel (uns8 channel)
Change channel on the nrf2401a. void pic_rf_set_mode (uns8 requested_mode)
Set rf mode to transmit or receive. void pic_rf_setup ()
Setup ports and pins for communication with nrf2401a. void pic_rf_transmit (uns8 *data, uns8
bytes_to_transmit)
Transmit data from nRF24L01.
Function Documentation
void pic_rf_init (rf_config * my_config)
Initialise nRF24L01 chip with config.
Sends the configuration to the Nordic nrf2401a chip ready to begin communication. This routine
assumes you have already set my_config to the correct values.
Definition at line 253 of file pic_rf_24l01.c.
References rf_config::address_ch1, rf_config::address_ch2, rf_config::address_width, rf_config::channel,
clear_pin, rf_config::crystal, end_crit_sec, make_output, rf_config::options, rf_config::output_power,
rf_config::payload_width_ch1, rf_config::payload_width_ch2, pic_rf_chip_enable, pic_rf_chip_select,
pic_rf_send_byte(), pic_rf_send_bytes(), pic_rf_send_command(), pic_rf_send_command_inline(),
rf_current_channel, rf_current_mode_receive, RF_FLUSH_RX, RF_FLUSH_TX,
RF_WR_REG_CONFIG_REG, RF_WR_REG_EN_AA, RF_WR_REG_RF_CH, RF_WR_REG_RF_SETUP,
RF_WR_REG_RX_ADDR_P0, RF_WR_REG_RX_PW_P0, RF_WR_REG_SETUP_AW,
RF_WR_REG_SETUP_RETR, RF_WR_REG_STATUS, RF_WR_REG_TX_ADDR, serial_print_int_hex(),
serial_print_str(), set_pin, start_crit_sec, and uns8.
Here is the call graph for this function:
447
void pic_rf_quick_init (char * my_config, uns8 my_channel, bit my_receive_on)
While the usual pic_rf_init() routine is excellent when you want to programatically change the 2401a
config, if you're only doing this once (at the start) then it's likely you're burning a lot of instructions
(154 words on a PIC16 device) just to send some bytes of config out to the 2401a. If you know your
config in advance, then you can just send the byte-stream config using this routine. Use the
nrf2401a_config.pl script in the tools directory to generate this string.
Definition at line 157 of file pic_rf_24l01.c.
References clear_pin, make_output, pic_rf_chip_enable, pic_rf_chip_select, pic_rf_send_byte(),
rf_current_channel, rf_current_mode_receive, and uns8.
Here is the call graph for this function:
uns8 pic_rf_read_register (uns8 cmd, uns8 * data, uns8 data_len)
Internal routine to read a particular nRF24L01 register. Clocks out data_len bytes from the chip.
Internal routine.
Parameters:
cmd Read register command, eg RF_RD_REG_STATUS
data Pointer to array of bytes where data will be put
data_len Number of bytes to clock out
Definition at line 92 of file pic_rf_24l01.c.
References clear_pin, pic_rf_send_byte(), set_pin, and uns8.
Referenced by pic_rf_set_mode().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 pic_rf_read_register_int (uns8 cmd, uns8 * data, uns8 data_len)
Definition at line 106 of file pic_rf_24l01.c.
References clear_pin, pic_rf_send_byte_int(), set_pin, and uns8.
Here is the call graph for this function:
uns8 pic_rf_receive (uns8 * data, uns8 bytes_to_receive)
Receive data from nRF24L01.
448
Having been notified that there is data available, call this routine to clock the data in from the
nrf2401a.
!pic_rf_chip_enable(0); // save power
pic_rf_chip_enable(1); // turn chip back on
Definition at line 41 of file pic_rf_24l01.c.
References clear_pin, kill_interrupts, make_input, pic_rf_read_register_inline(),
pic_rf_send_command_inline(), RF_R_RX_PAYLOAD, RF_RD_REG_FIFO_STATUS,
RF_WR_REG_STATUS, set_pin, test_pin, and uns8.
Here is the call graph for this function:
void pic_rf_receive2 (uns8 * data, uns8 bytes_to_receive)
Definition at line 352 of file pic_rf_24l01.c.
References pic_rf_receive_inline().
Here is the call graph for this function:
void pic_rf_receive_inline (uns8 * data, uns8 bytes_to_receive) [inline]
Having been notified that there is data available, call this routine to clock the data in from the
nRF24L01.
Definition at line 348 of file pic_rf_24l01.c.
References pic_rf_read_register_inline(), and RF_R_RX_PAYLOAD.
Referenced by pic_rf_receive2().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 pic_rf_send_byte (uns8 b)
Clock a byte into the nRF24L01.
449
Internal routine to send a byte to the nrf2401a. Generally you shouldn't need to use this, see
pic_rf_transmit instead
See also:
pic_rf_transmit
Definition at line 123 of file pic_rf_24l01.c.
References change_pin, clear_pin, set_pin, test_pin, and uns8.
uns8 pic_rf_send_byte_int (uns8 b)
Clock one byte into the nRF24L01. Internal routine.
Parameters:
b The byte to send
Returns:
nRF24L01 status
Definition at line 140 of file pic_rf_24l01.c.
References change_pin, clear_pin, set_pin, test_pin, and uns8.
Referenced by pic_rf_read_register_inline(), pic_rf_read_register_int(), and pic_rf_send_command_inline().
Here is the caller graph for this function:
uns8 pic_rf_send_command (uns8 cmd, uns8 * data, uns8 data_len)
Send a command and associated data to the nRF24L01
Parameters:
cmd Command to send, eg, RF_WR_REG_SETUP_RETR
data Pointer to an array of bytes to send as data for the command
data_len Number of bytes in the array
Returns:
nRF24L01 status
Definition at line 66 of file pic_rf_24l01.c.
References clear_pin, pic_rf_send_byte(), set_pin, and uns8.
Referenced by pic_rf_init(), pic_rf_set_channel(), pic_rf_set_mode(), and pic_rf_transmit().
Here is the call graph for this function:
Here is the caller graph for this function:
450
uns8 pic_rf_send_command_single (uns8 cmd, uns8 data)
Send a command and 1 byte of data to the nRF24L01
Parameters:
cmd Command to send, eg, RF_WR_REG_SETUP_RETR
data One byte of data for the command
Returns:
nRF24L01 status
Definition at line 80 of file pic_rf_24l01.c.
References clear_pin, pic_rf_send_byte(), set_pin, and uns8.
Here is the call graph for this function:
void pic_rf_set_channel (uns8 channel)
Receive data from nRF24L01 (inline).
Reclocks the essential config to change the current channel used by the nrf2401a.
Definition at line 385 of file pic_rf_24l01.c.
References clear_pin, end_crit_sec, kill_interrupts, pic_rf_chip_enable, pic_rf_chip_select, pic_rf_send_byte(),
pic_rf_send_command(), rf_current_channel, rf_current_mode_receive, RF_WR_REG_RF_CH, set_pin, and
start_crit_sec.
Here is the call graph for this function:
void pic_rf_set_mode (uns8 mode)
Pass RECEIVE_MODE or TRANSMIT_MODE to change current mode. Generally, you shouldn't
need to call this routine. The library assumes you want to receive until you transmit, in which case it
switches automatically to transmit mode and back to receive afterwards.
Definition at line 358 of file pic_rf_24l01.c.
451
References change_pin, clear_pin, CONFIG_PRIM_RX, end_crit_sec, kill_interrupts, make_output,
pic_rf_chip_enable, pic_rf_chip_select, pic_rf_read_register(), pic_rf_send_command(), RECEIVE_MODE,
rf_current_mode_receive, RF_RD_REG_CONFIG_REG, RF_WR_REG_CONFIG_REG, set_pin,
start_crit_sec, TRANSMIT_MODE, and uns8.
Here is the call graph for this function:
void pic_rf_setup ()
Setup ports and pins for communication with nRF24L01.
Set up ports and pins to correct input/output for communication with Nordif nrf2401a
Definition at line 400 of file pic_rf_24l01.c.
References clear_pin, make_input, make_output, and set_pin.
void pic_rf_transmit (uns8 * data, uns8 bytes_to_transmit)
Changes to transmit mode, clocks data into the nrf24L01 and hits the shockburst button. Returns to
receive mode when finished.
Definition at line 326 of file pic_rf_24l01.c.
References clear_pin, end_crit_sec, pic_rf_read_register_inline(), pic_rf_send_command(), pic_rf_set_mode(),
RECEIVE_MODE, RF_RD_REG_CD, RF_W_TX_PAYLOAD, serial_print_int(), serial_print_nl(),
serial_print_str(), set_pin, start_crit_sec, TRANSMIT_MODE, and uns8.
Here is the call graph for this function:
452
pic_rf_24l01.h File Reference
RF routines for the Nordic nRF24L01 chip. #include "config.h" #include "pic_utils.h" Include dependency graph for pic_rf_24l01.h:
This graph shows which files directly or indirectly include this file:
Data Structures
struct rf_config
Defines
#define CONFIG_CRCO 2
#define CONFIG_EN_CRC 3
#define CONFIG_MASK_MAX_RT 4
#define CONFIG_MASK_RX_DR 6
#define CONFIG_MASK_TX_DS 5
#define CONFIG_PRIM_RX 0
#define CONFIG_PWR_UP 1
#define FIFO_STATUS_RX_EMPTY 0
#define FIFO_STATUS_RX_FULL 1
#define FIFO_STATUS_TX_EMPTY 4
#define FIFO_STATUS_TX_FULL 5
#define FIFO_STATUS_TX_REUSE 6
#define OP_ENABLE_1_MBPS 5
#define OP_ENABLE_CH2 7
#define OP_ENABLE_CRC 2
453
#define OP_ENABLE_RECEIVE 0
#define OP_ENABLE_SHOCKBURST 6
#define OP_LONG_CRC 1
#define pic_rf_get_status() pic_rf_read_register(RF_NOP, 0, 0)
#define pic_rf_receive_mode() pic_rf_set_mode(RECEIVE_MODE)
#define pic_rf_set_status(status) pic_rf_send_command(RF_WR_REG_STATUS, status, 1)
#define pic_rf_transmit_mode() pic_rf_set_mode(TRANSMIT_MODE)
#define RECEIVE_MODE 1
#define RF_FLUSH_RX 0b11100010
#define RF_FLUSH_TX 0b11100001
#define RF_NOP 0b11111111
#define RF_R_RX_PAYLOAD 0b01100001
#define RF_RD_REG_CD 0b00001001
#define RF_RD_REG_CONFIG_REG 0b00000000
#define RF_RD_REG_FIFO_STATUS 0b00010111
#define RF_RD_REG_RX_PW_P0 0b00010001
#define RF_RD_REG_STATUS 0b00000111
#define RF_W_TX_PAYLOAD 0b10100000
#define RF_WR_REG_CONFIG_REG 0b00100000
#define RF_WR_REG_EN_AA 0b00100001
#define RF_WR_REG_RF_CH 0b00100101
#define RF_WR_REG_RF_SETUP 0b00100110
#define RF_WR_REG_RX_ADDR_P0 0b00101010
#define RF_WR_REG_RX_PW_P0 0b00110001
#define RF_WR_REG_SETUP_AW 0b00100011
#define RF_WR_REG_SETUP_RETR 0b00100100
#define RF_WR_REG_STATUS 0b00100111
#define RF_WR_REG_TX_ADDR 0b00110000
#define STATUS_MAX_RT 4
#define STATUS_RX_DR 6
#define STATUS_TX_DS 5
#define STATUS_TX_FULL 0
#define TRANSMIT_MODE 0
Functions
void pic_rf_init (rf_config *my_config)
Initialise nRF24L01 chip with config. void pic_rf_quick_init (char *my_config, uns8 my_channel, bit
my_receive_on)
Initialise nrf2401a chip with quick config. uns8 pic_rf_read_register (uns8 cmd, uns8 *data, uns8 data_len)
Read nRF24L01 register. uns8 pic_rf_read_register_inline (uns8 cmd, uns8 *data, uns8 data_len)
Read nRF24L01 register (inline). uns8 pic_rf_receive (uns8 *data, uns8 bytes_to_receive)
Receive data from nRF24L01. void pic_rf_receive_inline (uns8 *data, uns8 bytes_to_receive)
Receive data from nRF24L01. uns8 pic_rf_send_byte (uns8 b)
Clock a byte into the nRF24L01. uns8 pic_rf_send_byte_int (uns8 b)
Clock a byte into the nRF24L01. uns8 pic_rf_send_command (uns8 cmd, uns8 *data, uns8 data_len)
Send command to the nrf24l01. uns8 pic_rf_send_command_inline (uns8 cmd, uns8 *data, uns8 data_len)
Send command to the nrf24l01 (inline). uns8 pic_rf_send_command_single (uns8 cmd, uns8 data)
Send a single data byte command to the nrf24l01. void pic_rf_set_channel (uns8 channel)
Receive data from nRF24L01 (inline). void pic_rf_set_mode (uns8 mode)
Set rf mode to transmit or receive. void pic_rf_setup ()
Setup ports and pins for communication with nRF24L01. void pic_rf_transmit (uns8 *data, uns8
bytes_to_transmit)
454
Transmit data from nRF24L01. Variables
static uns8 rf_current_channel = 2
static bit rf_current_mode_receive = 0
Detailed Description
RF routines for the Nordic nRF24L01 chip
Definition in file pic_rf_24l01.h.
Define Documentation
#define CONFIG_CRCO 2
Definition at line 159 of file pic_rf_24l01.h.
#define CONFIG_EN_CRC 3
Definition at line 158 of file pic_rf_24l01.h.
#define CONFIG_MASK_MAX_RT 4
Definition at line 157 of file pic_rf_24l01.h.
#define CONFIG_MASK_RX_DR 6
Definition at line 155 of file pic_rf_24l01.h.
#define CONFIG_MASK_TX_DS 5
Definition at line 156 of file pic_rf_24l01.h.
#define CONFIG_PRIM_RX 0
Definition at line 161 of file pic_rf_24l01.h.
Referenced by pic_rf_set_mode().
#define CONFIG_PWR_UP 1
Definition at line 160 of file pic_rf_24l01.h.
#define FIFO_STATUS_RX_EMPTY 0
Definition at line 175 of file pic_rf_24l01.h.
455
#define FIFO_STATUS_RX_FULL 1
Definition at line 174 of file pic_rf_24l01.h.
#define FIFO_STATUS_TX_EMPTY 4
Definition at line 173 of file pic_rf_24l01.h.
#define FIFO_STATUS_TX_FULL 5
Definition at line 172 of file pic_rf_24l01.h.
#define FIFO_STATUS_TX_REUSE 6
Definition at line 171 of file pic_rf_24l01.h.
#define OP_ENABLE_1_MBPS 5
rf_config options - enable 1 MPS transmition (otherwise 250Kbps)
Definition at line 107 of file pic_rf_24l01.h.
#define OP_ENABLE_CH2 7
rf_config options - enable channel 2 reception
Definition at line 111 of file pic_rf_24l01.h.
#define OP_ENABLE_CRC 2
rf_config options - enable CRC (recommended!)
Definition at line 105 of file pic_rf_24l01.h.
#define OP_ENABLE_RECEIVE 0
rf_config options - enable receive
Definition at line 101 of file pic_rf_24l01.h.
#define OP_ENABLE_SHOCKBURST 6
rf_config options - enable shockburst transmition
Definition at line 109 of file pic_rf_24l01.h.
#define OP_LONG_CRC 1
rf_config options - enable 16 bit CRC (otherwise 8 bit CRC if 0)
Definition at line 103 of file pic_rf_24l01.h.
#define pic_rf_get_status() pic_rf_read_register(RF_NOP, 0, 0)
Definition at line 369 of file pic_rf_24l01.h.
456
#define pic_rf_receive_mode() pic_rf_set_mode(RECEIVE_MODE)
Definition at line 375 of file pic_rf_24l01.h.
#define pic_rf_set_status(status) pic_rf_send_command(RF_WR_REG_STATUS, status, 1)
Definition at line 372 of file pic_rf_24l01.h.
#define pic_rf_transmit_mode() pic_rf_set_mode(TRANSMIT_MODE)
Definition at line 376 of file pic_rf_24l01.h.
#define RECEIVE_MODE 1
Mode selection - receive
Definition at line 115 of file pic_rf_24l01.h.
#define RF_FLUSH_RX 0b11100010
Definition at line 145 of file pic_rf_24l01.h.
Referenced by pic_rf_init().
#define RF_FLUSH_TX 0b11100001
Definition at line 144 of file pic_rf_24l01.h.
Referenced by pic_rf_init().
#define RF_NOP 0b11111111
Definition at line 152 of file pic_rf_24l01.h.
#define RF_R_RX_PAYLOAD 0b01100001
Definition at line 149 of file pic_rf_24l01.h.
Referenced by pic_rf_receive(), and pic_rf_receive_inline().
#define RF_RD_REG_CD 0b00001001
Definition at line 143 of file pic_rf_24l01.h.
Referenced by pic_rf_transmit().
#define RF_RD_REG_CONFIG_REG 0b00000000
Definition at line 129 of file pic_rf_24l01.h.
457
Referenced by pic_rf_set_mode().
#define RF_RD_REG_FIFO_STATUS 0b00010111
Definition at line 142 of file pic_rf_24l01.h.
Referenced by pic_rf_receive().
#define RF_RD_REG_RX_PW_P0 0b00010001
Definition at line 140 of file pic_rf_24l01.h.
#define RF_RD_REG_STATUS 0b00000111
Definition at line 141 of file pic_rf_24l01.h.
#define RF_W_TX_PAYLOAD 0b10100000
Definition at line 148 of file pic_rf_24l01.h.
Referenced by pic_rf_transmit().
#define RF_WR_REG_CONFIG_REG 0b00100000
Definition at line 128 of file pic_rf_24l01.h.
Referenced by pic_rf_init(), and pic_rf_set_mode().
#define RF_WR_REG_EN_AA 0b00100001
Definition at line 135 of file pic_rf_24l01.h.
Referenced by pic_rf_init().
#define RF_WR_REG_RF_CH 0b00100101
Definition at line 137 of file pic_rf_24l01.h.
Referenced by pic_rf_init(), and pic_rf_set_channel().
#define RF_WR_REG_RF_SETUP 0b00100110
Definition at line 132 of file pic_rf_24l01.h.
Referenced by pic_rf_init().
#define RF_WR_REG_RX_ADDR_P0 0b00101010
Definition at line 134 of file pic_rf_24l01.h.
458
Referenced by pic_rf_init().
#define RF_WR_REG_RX_PW_P0 0b00110001
Definition at line 136 of file pic_rf_24l01.h.
Referenced by pic_rf_init().
#define RF_WR_REG_SETUP_AW 0b00100011
Definition at line 131 of file pic_rf_24l01.h.
Referenced by pic_rf_init().
#define RF_WR_REG_SETUP_RETR 0b00100100
Definition at line 130 of file pic_rf_24l01.h.
Referenced by pic_rf_init().
#define RF_WR_REG_STATUS 0b00100111
Definition at line 138 of file pic_rf_24l01.h.
Referenced by pic_rf_init(), and pic_rf_receive().
#define RF_WR_REG_TX_ADDR 0b00110000
Definition at line 133 of file pic_rf_24l01.h.
Referenced by pic_rf_init().
#define STATUS_MAX_RT 4
Definition at line 166 of file pic_rf_24l01.h.
#define STATUS_RX_DR 6
Definition at line 164 of file pic_rf_24l01.h.
#define STATUS_TX_DS 5
Definition at line 165 of file pic_rf_24l01.h.
#define STATUS_TX_FULL 0
Definition at line 168 of file pic_rf_24l01.h.
459
#define TRANSMIT_MODE 0
Mode selection - transmit
Definition at line 117 of file pic_rf_24l01.h.
Function Documentation
void pic_rf_init (rf_config * my_config)
Sends the configuration to the Nordic nRF24L01 chip ready to begin communication. This routine
assumes you have already set my_config to the correct values.
Initialise nRF24L01 chip with config.
Sends the configuration to the Nordic nrf2401a chip ready to begin communication. This routine
assumes you have already set my_config to the correct values.
Definition at line 83 of file pic_rf_2401a.c.
References rf_config::address_ch1, rf_config::address_ch2, rf_config::address_width, rf_config::channel,
clear_pin, rf_config::crystal, end_crit_sec, make_output, rf_config::options, rf_config::output_power,
rf_config::payload_width_ch1, rf_config::payload_width_ch2, pic_rf_chip_enable, pic_rf_chip_select,
pic_rf_send_byte(), pic_rf_send_bytes(), pic_rf_send_command(), pic_rf_send_command_inline(),
rf_current_channel, rf_current_mode_receive, RF_FLUSH_RX, RF_FLUSH_TX,
RF_WR_REG_CONFIG_REG, RF_WR_REG_EN_AA, RF_WR_REG_RF_CH, RF_WR_REG_RF_SETUP,
RF_WR_REG_RX_ADDR_P0, RF_WR_REG_RX_PW_P0, RF_WR_REG_SETUP_AW,
RF_WR_REG_SETUP_RETR, RF_WR_REG_STATUS, RF_WR_REG_TX_ADDR, serial_print_int_hex(),
serial_print_str(), set_pin, start_crit_sec, and uns8.
Here is the call graph for this function:
void pic_rf_quick_init (char * my_config, uns8 my_channel, bit my_receive_on)
While the usual pic_rf_init() routine is excellent when you want to programatically change the 2401a
config, if you're only doing this once (at the start) then it's likely you're burning a lot of instructions
(154 words on a PIC16 device) just to send some bytes of config out to the 2401a. If you know your
460
config in advance, then you can just send the byte-stream config using this routine. Use the
nrf2401a_config.pl script in the tools directory to generate this string.
Definition at line 62 of file pic_rf_2401a.c.
References clear_pin, make_output, pic_rf_chip_enable, pic_rf_chip_select, pic_rf_send_byte(),
rf_current_channel, rf_current_mode_receive, and uns8.
Here is the call graph for this function:
uns8 pic_rf_read_register (uns8 cmd, uns8 * data, uns8 data_len)
Internal routine to read a particular nRF24L01 register. Clocks out data_len bytes from the chip.
Internal routine.
Parameters:
cmd Read register command, eg RF_RD_REG_STATUS
data Pointer to array of bytes where data will be put
data_len Number of bytes to clock out
Definition at line 92 of file pic_rf_24l01.c.
References clear_pin, pic_rf_send_byte(), set_pin, and uns8.
Referenced by pic_rf_set_mode().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 pic_rf_read_register_inline (uns8 cmd, uns8 * data, uns8 data_len) [inline]
Internal routine to read a particular nRF24L01 register. Clocks out data_len bytes from the chip.
Internal routine. Inline version.
Parameters:
cmd Read register command, eg RF_RD_REG_STATUS
data Pointer to array of bytes where data will be put
data_len Number of bytes to clock out
Returns:
nRF24L01 status
Definition at line 326 of file pic_rf_24l01.h.
References clear_pin, pic_rf_send_byte_int(), set_pin, and uns8.
Referenced by pic_rf_receive(), pic_rf_receive_inline(), and pic_rf_transmit().
Here is the call graph for this function:
461
Here is the caller graph for this function:
uns8 pic_rf_receive (uns8 * data, uns8 bytes_to_receive)
Having been notified that there is data available, call this routine to clock the data in from the
nRF24L01.
Receive data from nRF24L01.
Having been notified that there is data available, call this routine to clock the data in from the
nrf2401a.
!pic_rf_chip_enable(0); // save power
pic_rf_chip_enable(1); // turn chip back on
!pic_rf_chip_enable(0); // save power
pic_rf_chip_enable(1); // turn chip back on
Definition at line 130 of file pic_rf_2401a.c.
References clear_pin, kill_interrupts, make_input, pic_rf_read_register_inline(),
pic_rf_send_command_inline(), RF_R_RX_PAYLOAD, RF_RD_REG_FIFO_STATUS,
RF_WR_REG_STATUS, set_pin, test_pin, and uns8.
Here is the call graph for this function:
void pic_rf_receive_inline (uns8 * data, uns8 bytes_to_receive) [inline]
Having been notified that there is data available, call this routine to clock the data in from the
nRF24L01.
Definition at line 348 of file pic_rf_24l01.c.
References pic_rf_read_register_inline(), and RF_R_RX_PAYLOAD.
Referenced by pic_rf_receive2().
Here is the call graph for this function:
462
Here is the caller graph for this function:
uns8 pic_rf_send_byte (uns8 b)
Clock one byte into the nRF24L01. Internal routine.
Parameters:
b The byte to send
Returns:
nRF24L01 status
Clock a byte into the nRF24L01.
Internal routine to send a byte to the nrf2401a. Generally you shouldn't need to use this, see
pic_rf_transmit instead
See also:
pic_rf_transmit
Definition at line 41 of file pic_rf_2401a.c.
References change_pin, clear_pin, set_pin, test_pin, and uns8.
Referenced by pic_rf_init(), pic_rf_quick_init(), pic_rf_read_register(), pic_rf_send_bytes(),
pic_rf_send_bytes_inline(), pic_rf_send_command(), pic_rf_send_command_single(), and
pic_rf_set_channel().
Here is the caller graph for this function:
uns8 pic_rf_send_byte_int (uns8 b)
Clock one byte into the nRF24L01. Internal routine.
Parameters:
b The byte to send
Returns:
nRF24L01 status
Definition at line 140 of file pic_rf_24l01.c.
463
References change_pin, clear_pin, set_pin, test_pin, and uns8.
Referenced by pic_rf_read_register_inline(), pic_rf_read_register_int(), and pic_rf_send_command_inline().
Here is the caller graph for this function:
uns8 pic_rf_send_command (uns8 cmd, uns8 * data, uns8 data_len)
Send a command and associated data to the nRF24L01
Parameters:
cmd Command to send, eg, RF_WR_REG_SETUP_RETR
data Pointer to an array of bytes to send as data for the command
data_len Number of bytes in the array
Returns:
nRF24L01 status
Definition at line 66 of file pic_rf_24l01.c.
References clear_pin, pic_rf_send_byte(), set_pin, and uns8.
Referenced by pic_rf_init(), pic_rf_set_channel(), pic_rf_set_mode(), and pic_rf_transmit().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 pic_rf_send_command_inline (uns8 cmd, uns8 * data, uns8 data_len) [inline]
Send a command and associated data to the nRF24L01. Internal routine. Inline version.
464
Parameters:
cmd Command to send, eg, RF_WR_REG_SETUP_RETR
data Pointer to an array of bytes to send as data for the command
data_len Number of bytes in the array
Returns:
nRF24L01 status
Definition at line 354 of file pic_rf_24l01.h.
References clear_pin, pic_rf_send_byte_int(), set_pin, and uns8.
Referenced by pic_rf_init(), and pic_rf_receive().
Here is the call graph for this function:
Here is the caller graph for this function:
uns8 pic_rf_send_command_single (uns8 cmd, uns8 data)
Send a command and 1 byte of data to the nRF24L01
Parameters:
cmd Command to send, eg, RF_WR_REG_SETUP_RETR
data One byte of data for the command
Returns:
nRF24L01 status
Definition at line 80 of file pic_rf_24l01.c.
References clear_pin, pic_rf_send_byte(), set_pin, and uns8.
Here is the call graph for this function:
void pic_rf_set_channel (uns8 channel)
Having been notified that there is data available, call this routine to clock the data in from the
nRF24L01. Change channel on the nRF24L01 Changes the current channel used by the nRF24L01.
Receive data from nRF24L01 (inline).
Reclocks the essential config to change the current channel used by the nrf2401a.
Definition at line 199 of file pic_rf_2401a.c.
References clear_pin, end_crit_sec, kill_interrupts, pic_rf_chip_enable, pic_rf_chip_select, pic_rf_send_byte(),
pic_rf_send_command(), rf_current_channel, rf_current_mode_receive, RF_WR_REG_RF_CH, set_pin, and
start_crit_sec.
Here is the call graph for this function:
465
void pic_rf_set_mode (uns8 mode)
Pass RECEIVE_MODE or TRANSMIT_MODE to change current mode. Generally, you shouldn't
need to call this routine. The library assumes you want to receive until you transmit, in which case it
switches automatically to transmit mode and back to receive afterwards.
Definition at line 178 of file pic_rf_2401a.c.
References change_pin, clear_pin, CONFIG_PRIM_RX, end_crit_sec, kill_interrupts, make_output,
pic_rf_chip_enable, pic_rf_chip_select, pic_rf_read_register(), pic_rf_send_command(), RECEIVE_MODE,
rf_current_mode_receive, RF_RD_REG_CONFIG_REG, RF_WR_REG_CONFIG_REG, set_pin,
start_crit_sec, TRANSMIT_MODE, and uns8.
Referenced by pic_rf_transmit().
Here is the call graph for this function:
Here is the caller graph for this function:
void pic_rf_setup ()
Set up ports and pins to correct input/output for communication with Nordic nRF24L01
Setup ports and pins for communication with nRF24L01.
Set up ports and pins to correct input/output for communication with Nordif nrf2401a
Definition at line 221 of file pic_rf_2401a.c.
References clear_pin, make_input, make_output, and set_pin.
void pic_rf_transmit (uns8 * data, uns8 bytes_to_transmit)
Changes to transmit mode, clocks data into the nrf24L01 and hits the shockburst button. Returns to
receive mode when finished.
Definition at line 326 of file pic_rf_24l01.c.
References clear_pin, end_crit_sec, pic_rf_read_register_inline(), pic_rf_send_command(), pic_rf_set_mode(),
RECEIVE_MODE, RF_RD_REG_CD, RF_W_TX_PAYLOAD, serial_print_int(), serial_print_nl(),
serial_print_str(), set_pin, start_crit_sec, TRANSMIT_MODE, and uns8.
Here is the call graph for this function:
466
Variable Documentation
uns8 rf_current_channel = 2 [static]
Maintain state of current channel
Definition at line 122 of file pic_rf_24l01.h.
bit rf_current_mode_receive = 0 [static]
Maintain state of current mode (1 = receive mode)
Definition at line 120 of file pic_rf_24l01.h.
pic_serial.c File Reference #include "config.h" #include "pic_utils.h" #include "pic_serial.h" #include <string.h> #include <stdlib.h> Include dependency graph for pic_serial.c:
467
Functions
uns8 bin2Hex (uns8 x)
uns8 serial_getc (void)
Retrieve a character from the serial port. void serial_print_int (uns16 i)
Print a 16 bit number to the serial port. void serial_print_int_hex (uns8 i)
Print an 8 bit number in hex to the serial port. void serial_print_int_hex_16bit (uns16 i)
Print a 16 bit number in hex to the serial port. void serial_print_nl ()
Print a newline. void serial_print_spc ()
Print a space. void serial_print_str (rom char *str)
Print a rom string out to the serial port. void serial_print_str (char *str)
Print a string out to the serial port. void serial_print_var (char *str, uns16 i)
void serial_putc (uns8 c)
Transmit a single character. uns8 serial_rx_avail ()
Tests if the serial rx fifo has a character available. void serial_rx_isr ()
Serial receive interrupt service routine. void serial_setup (uns8 req_spbrg)
Configure the pic for serial communicaitons. uns8 serial_tx_empty ()
Tests if the serial tx fifo is empty. void serial_tx_isr ()
Serial transmit interrupt service routine. Variables
uns8 rx_buffer [SERIAL_RX_BUFFER_SIZE]
uns8 rx_end = 0
uns8 rx_start = 0
uns8 tx_buffer [SERIAL_TX_BUFFER_SIZE]
uns8 tx_end = 0
uns8 tx_start = 0
Function Documentation
uns8 bin2Hex (uns8 x) [inline]
Definition at line 65 of file pic_serial.c.
468
Referenced by serial_print_int_hex().
Here is the caller graph for this function:
uns8 serial_getc (void)
Retrieve character from the serial port. Note that if there is nothing in the fifo, this function will wait
until a character is received - and this will never happen if interrupts are turned off when this is
called! So, be careful not to call getc during a critical section or during an ISR unless* you're sure
there's something in the fifo. You can do this by calling the serial_rx_avail() routine. In any other
situation, you can call getc() and happily wait for a character to arrive.
Definition at line 276 of file pic_serial.c.
References end_crit_sec, rx_buffer, rx_end, rx_start, start_crit_sec, and uns8.
Referenced by term_process().
Here is the caller graph for this function:
void serial_print_int (uns16 i)
Print a 16 bit unsigned number in decimal to the serial port
Parameters:
i the 16 bit number to be printed
Definition at line 322 of file pic_serial.c.
References serial_putc(), and uns8.
Referenced by ar1000_seek_more(), draw_print_buffer(), drv_print_buffer(), mrf24j40_active_channel_scan(),
ms5540_calc_temp_and_pressure(), ms5540_init(), pic_rf_transmit(), pkt_process_rf_data(),
pkt_process_tx_queue(), pkt_queue_packet(), pkt_send_payload(), serial_print_var(), sht15_read(),
469
sht15_read_temperature(), sht15_send_byte(), usb_cdc_handle_tx(), usb_ep_data_in_callback(),
usb_ep_data_out_callback(), usb_handle_class_ctrl_read_callback(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_standard_request(), usb_handle_transaction(),
usb_send_data(), and usb_send_data_chunk().
Here is the call graph for this function:
Here is the caller graph for this function:
470
void serial_print_int_hex (uns8 i)
Print a 8 bit unsigned number in hex to the serial port
Parameters:
i 8 bit number to be printed
Definition at line 343 of file pic_serial.c.
References bin2Hex(), and serial_putc().
Referenced by ar1000_tune(), draw_print_buffer(), mrf24j40_handle_isr(), mrf24j40_set_extended_address(),
pic_rf_init(), pkt_print_packet(), serial_print_int_hex_16bit(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_reset(), usb_handle_standard_request(),
usb_handle_transaction(), wpan_data_received_callback(), wpan_print_address(), and
wpan_print_mac_command().
Here is the call graph for this function:
Here is the caller graph for this function:
void serial_print_int_hex_16bit (uns16 i)
Print a 16 bit unsigned number in hex to the serial port
Parameters:
i 16 bit number to be printed
471
Definition at line 350 of file pic_serial.c.
References serial_print_int_hex().
Referenced by usb_handle_transaction(), and wpan_print_address().
Here is the call graph for this function:
Here is the caller graph for this function:
void serial_print_nl ()
Print a new line out the serial port - if you do this often, this routine can be used to save a couple of
instructions. Always helps!
Definition at line 361 of file pic_serial.c.
References serial_putc().
Referenced by ar1000_seek_more(), drv_print_buffer(), its1_controller_init(), its1_device_process(),
mrf24j40_active_channel_scan(), mrf24j40_handle_isr(), mrf24j40_set_extended_address(),
ms5540_calc_temp_and_pressure(), ms5540_init(), pic_rf_transmit(), serial_print_var(), and
wpan_data_received_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
472
void serial_print_spc ()
Print a space out the serial port - if you do this often, this routine can be used to save a couple of
instructions. Always helps!
Definition at line 356 of file pic_serial.c.
References serial_putc().
Referenced by drv_print_buffer(), ms5540_init(), pkt_print_packet(), pkt_process_tx_queue(), and
usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
473
void serial_print_str (rom char * str)
Send a null terminated rom string out the serial port
Parameters:
str the rom string to be sent
Definition at line 310 of file pic_serial.c.
References serial_putc(), and uns8.
Here is the call graph for this function:
void serial_print_str (char * str)
Send a null terminated string out the serial port
Parameters:
str the string to be sent
Definition at line 298 of file pic_serial.c.
References serial_putc(), and uns8.
Referenced by ar1000_seek_more(), ar1000_tune(), audio_queue_clear(), draw_print_buffer(),
draw_tests_run(), drv_paint(), its1_controller_handle_association(), its1_controller_init(), its1_device_init(),
its1_device_process(), mrf24j40_active_channel_scan(), mrf24j40_handle_isr(),
mrf24j40_set_extended_address(), ms5540_calc_temp_and_pressure(), ms5540_init(), pic_rf_init(),
pic_rf_transmit(), pkt_print_packet(), pkt_process_rf_data(), pkt_process_tx_queue(), pkt_queue_packet(),
pkt_send_packet(), pkt_send_payload(), serial_print_var(), sht15_read(), sht15_read_temperature(),
sht15_send_byte(), usb_cdc_handle_tx(), usb_configure_endpoints(), usb_ep_data_in_callback(),
usb_ep_data_out_callback(), usb_handle_class_ctrl_read_callback(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_reset(), usb_handle_stall(), usb_handle_standard_request(),
usb_handle_transaction(), usb_send_data(), usb_send_data_chunk(), wpan_data_received_callback(),
wpan_print_address(), wpan_print_frame_type(), and wpan_print_mac_command().
Here is the call graph for this function:
476
void serial_print_var (char * str, uns16 i)
Definition at line 365 of file pic_serial.c.
References serial_print_int(), serial_print_nl(), and serial_print_str().
Referenced by its1_controller_init(), and its1_device_process().
Here is the call graph for this function:
Here is the caller graph for this function:
void serial_putc (uns8 c)
Sends a single character out the serial connection. It is sent straight out if possible, otherwise put into
the fifo. Note that if you fill the fifo while interrupts are off (eg, in an interrupt routine or a critical
section) then this routine will hang the pic, since it's waiting for an interrupt to clear the fifo, which
never comes... The moral is to keep your fifo big enough or don't send too much while interrupts are
off (eg, in an interrupt response routine). Of course, you *can* send things in an ISR - just don't fill
the fifo up.
Parameters:
c the character to transmit
Definition at line 172 of file pic_serial.c.
References kill_interrupts, serial_handle_tx_isr, tx_buffer, tx_end, tx_start, and uns8.
Referenced by cat4016_write_data(), draw_print_buffer(), mrf24j40_receive(), mrf24j40_receive_callback(),
mrf24j40_set_extended_address(), pkt_process_rf_data(), serial_print_int(), serial_print_int_hex(),
serial_print_nl(), serial_print_spc(), serial_print_str(), term_process(), usb_cdc_handle_tx(),
usb_handle_class_ctrl_write_callback(), usb_handle_class_request_callback(), usb_handle_transaction(),
usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(), wpan_data_received_callback(),
wpan_print_address(), and wpan_print_mac_command().
Here is the caller graph for this function:
478
uns8 serial_rx_avail ()
Tests to see if the serial receive fifo has a character available. Useful to call before getc() if interrupts
are not enabled in that section of code.
Returns:
true (non zero) if there are one or more characters waiting in the fifo queue, false (zero) otherwise
Definition at line 371 of file pic_serial.c.
References rx_end, and rx_start.
Referenced by term_process().
Here is the caller graph for this function:
void serial_rx_isr ()
This routine needs to be called from your interrupt() routine when the receive hardware interrupt
occurs in order to put received bytes into the fifo buffer.
Definition at line 236 of file pic_serial.c.
References rx_buffer, rx_end, rx_start, and uns8.
void serial_setup (uns8 req_spbrg)
Configures the pic and gets ready for interrupt-driven serial communications. Includes setting the tris
bits appropriately, and getting the baud rate generator set up. After calling this you can immediately
start sending and receiving bytes.
Parameters:
brgh See sprg defines earlier in pic_serial.h
Definition at line 77 of file pic_serial.c.
Referenced by usb_handle_class_ctrl_write_callback().
Here is the caller graph for this function:
uns8 serial_tx_empty ()
Tests to see if the serial transmit fifo is empty.
Returns:
true (non zero) if tx fifo is empty, false (zero) otherwise
Definition at line 372 of file pic_serial.c.
References tx_end, and tx_start.
Referenced by usb_handle_class_ctrl_write_callback().
Here is the caller graph for this function:
479
void serial_tx_isr ()
serial_load_tx
This routine needs to be called from your interrupt() routine when the transmit hardware interrupt
occurs in order to send bytes that are waiting in the fifo buffer.
Definition at line 216 of file pic_serial.c.
References tx_buffer, tx_end, tx_start, and uns8.
Referenced by usb_handle_class_ctrl_write_callback().
Here is the caller graph for this function:
Variable Documentation
uns8 rx_buffer[SERIAL_RX_BUFFER_SIZE]
Receive fifo
Definition at line 51 of file pic_serial.c.
Referenced by serial_getc(), and serial_rx_isr().
uns8 rx_end = 0
Receive fifo end point
Definition at line 55 of file pic_serial.c.
Referenced by serial_getc(), serial_rx_avail(), and serial_rx_isr().
uns8 rx_start = 0
Receive fifo start point
Definition at line 53 of file pic_serial.c.
Referenced by serial_getc(), serial_rx_avail(), and serial_rx_isr().
uns8 tx_buffer[SERIAL_TX_BUFFER_SIZE]
Transmit fifo
Definition at line 44 of file pic_serial.c.
Referenced by pkt_send_packet(), serial_putc(), and serial_tx_isr().
uns8 tx_end = 0
Transmit fifo end point
Definition at line 48 of file pic_serial.c.
Referenced by serial_putc(), serial_tx_empty(), and serial_tx_isr().
480
uns8 tx_start = 0
Transmit fifo start point
Definition at line 46 of file pic_serial.c.
Referenced by serial_putc(), serial_tx_empty(), and serial_tx_isr().
pic_serial.h File Reference
Interrupt driven fifo serial support. #include "pic_utils.h" #include "config.h" Include dependency graph for pic_serial.h:
This graph shows which files directly or indirectly include this file:
Defines
#define BRGH_HIGH_SPEED 1
#define BRGH_LOW_SPEED 0
#define serial_handle_rx_isr() if (pir1.RCIF) { serial_rx_isr(); clear_bit( pir1, RCIF ); }
#define serial_handle_tx_isr() if (pir1.TXIF) { serial_tx_isr(); }
#define serial_print_debug(string, variable) serial_print_str(string); serial_print_int(variable); serial_print_nl();
Functions
uns8 serial_getc (void)
Retrieve a character from the serial port. void serial_print_int (uns16 i)
Print a 16 bit number to the serial port. void serial_print_int_hex (uns8 i)
Print an 8 bit number in hex to the serial port. void serial_print_int_hex_16bit (uns16 i)
Print a 16 bit number in hex to the serial port. void serial_print_nl ()
Print a newline. void serial_print_spc ()
Print a space. void serial_print_str (rom char *str)
Print a rom string out to the serial port. void serial_print_str (char *str)
481
Print a string out to the serial port. void serial_print_var (char *str, uns16 i)
void serial_putc (uns8 c)
Transmit a single character. uns8 serial_rx_avail ()
Tests if the serial rx fifo has a character available. void serial_rx_isr ()
Serial receive interrupt service routine. void serial_setup (uns8 req_spbrg)
Configure the pic for serial communicaitons. uns8 serial_tx_empty ()
Tests if the serial tx fifo is empty. void serial_tx_full ()
Tests if the serial tx fifo is full. void serial_tx_isr ()
Serial transmit interrupt service routine.
Detailed Description
Put the following into your config.h
- - - - - - - - - - - - - - - - - - - pic_serial defines
- - - - - - - - - - - - - - - - - - -
define SERIAL_TX_BUFFER_SIZE 20 define SERIAL_RX_BUFFER_SIZE 4
Use this define if you want fine-grained control of what happens in the serial port define
SERIAL_DEBUG_ON
Use this define if you are debugging in the IDE simulator and don't want it to hang waiting for serial
interrupts that will never come... define SERIAL_IDE_DEBUG
Use thie define if you want to drop a character if the TX buffer is full, rather than the default behaviour,
which is to wait until the TX buffer has a spare spot. define
SERIAL_DISCARD_ON_TX_FULL_DURING_INT
- - - - - - - - - - - - - - - - - - -
Put the following in your ISR
serial_handle_tx_isr(); serial_handle_rx_isr();
Put the following in your system setup routine
serial_setup(uns8/16 req_spbrg);
Definition in file pic_serial.h.
Define Documentation
#define BRGH_HIGH_SPEED 1
Definition at line 338 of file pic_serial.h.
#define BRGH_LOW_SPEED 0
Definition at line 339 of file pic_serial.h.
#define serial_handle_rx_isr() if (pir1.RCIF) { serial_rx_isr(); clear_bit( pir1, RCIF ); }
include in your ISR
482
Definition at line 90 of file pic_serial.h.
#define serial_handle_tx_isr() if (pir1.TXIF) { serial_tx_isr(); }
include in your ISR
Definition at line 87 of file pic_serial.h.
Referenced by serial_putc().
#define serial_print_debug(string, variable) serial_print_str(string); serial_print_int(variable); serial_print_nl();
Definition at line 93 of file pic_serial.h.
Function Documentation
uns8 serial_getc (void)
Retrieve character from the serial port. Note that if there is nothing in the fifo, this function will wait
until a character is received - and this will never happen if interrupts are turned off when this is
called! So, be careful not to call getc during a critical section or during an ISR unless* you're sure
there's something in the fifo. You can do this by calling the serial_rx_avail() routine. In any other
situation, you can call getc() and happily wait for a character to arrive.
Definition at line 276 of file pic_serial.c.
References end_crit_sec, rx_buffer, rx_end, rx_start, start_crit_sec, and uns8.
Referenced by term_process().
Here is the caller graph for this function:
void serial_print_int (uns16 i)
Print a 16 bit unsigned number in decimal to the serial port
Parameters:
i the 16 bit number to be printed
Definition at line 322 of file pic_serial.c.
References serial_putc(), and uns8.
Referenced by ar1000_seek_more(), draw_print_buffer(), drv_print_buffer(), mrf24j40_active_channel_scan(),
ms5540_calc_temp_and_pressure(), ms5540_init(), pic_rf_transmit(), pkt_process_rf_data(),
pkt_process_tx_queue(), pkt_queue_packet(), pkt_send_payload(), serial_print_var(), sht15_read(),
sht15_read_temperature(), sht15_send_byte(), usb_cdc_handle_tx(), usb_ep_data_in_callback(),
usb_ep_data_out_callback(), usb_handle_class_ctrl_read_callback(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_standard_request(), usb_handle_transaction(),
usb_send_data(), and usb_send_data_chunk().
Here is the call graph for this function:
483
Here is the caller graph for this function:
void serial_print_int_hex (uns8 i)
Print a 8 bit unsigned number in hex to the serial port
Parameters:
i 8 bit number to be printed
Definition at line 343 of file pic_serial.c.
References bin2Hex(), and serial_putc().
484
Referenced by ar1000_tune(), draw_print_buffer(), mrf24j40_handle_isr(), mrf24j40_set_extended_address(),
pic_rf_init(), pkt_print_packet(), serial_print_int_hex_16bit(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_reset(), usb_handle_standard_request(),
usb_handle_transaction(), wpan_data_received_callback(), wpan_print_address(), and
wpan_print_mac_command().
Here is the call graph for this function:
Here is the caller graph for this function:
void serial_print_int_hex_16bit (uns16 i)
Print a 16 bit unsigned number in hex to the serial port
Parameters:
i 16 bit number to be printed
Definition at line 350 of file pic_serial.c.
References serial_print_int_hex().
Referenced by usb_handle_transaction(), and wpan_print_address().
Here is the call graph for this function:
485
Here is the caller graph for this function:
void serial_print_nl ()
Print a new line out the serial port - if you do this often, this routine can be used to save a couple of
instructions. Always helps!
Definition at line 361 of file pic_serial.c.
References serial_putc().
Referenced by ar1000_seek_more(), drv_print_buffer(), its1_controller_init(), its1_device_process(),
mrf24j40_active_channel_scan(), mrf24j40_handle_isr(), mrf24j40_set_extended_address(),
ms5540_calc_temp_and_pressure(), ms5540_init(), pic_rf_transmit(), serial_print_var(), and
wpan_data_received_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
486
void serial_print_spc ()
Print a space out the serial port - if you do this often, this routine can be used to save a couple of
instructions. Always helps!
Definition at line 356 of file pic_serial.c.
References serial_putc().
Referenced by drv_print_buffer(), ms5540_init(), pkt_print_packet(), pkt_process_tx_queue(), and
usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
487
void serial_print_str (rom char * str)
Send a null terminated rom string out the serial port
Parameters:
str the rom string to be sent
Definition at line 310 of file pic_serial.c.
References serial_putc(), and uns8.
Here is the call graph for this function:
void serial_print_str (char * str)
Send a null terminated string out the serial port
Parameters:
str the string to be sent
Definition at line 298 of file pic_serial.c.
References serial_putc(), and uns8.
Referenced by ar1000_seek_more(), ar1000_tune(), audio_queue_clear(), draw_print_buffer(),
draw_tests_run(), drv_paint(), its1_controller_handle_association(), its1_controller_init(), its1_device_init(),
its1_device_process(), mrf24j40_active_channel_scan(), mrf24j40_handle_isr(),
mrf24j40_set_extended_address(), ms5540_calc_temp_and_pressure(), ms5540_init(), pic_rf_init(),
pic_rf_transmit(), pkt_print_packet(), pkt_process_rf_data(), pkt_process_tx_queue(), pkt_queue_packet(),
pkt_send_packet(), pkt_send_payload(), serial_print_var(), sht15_read(), sht15_read_temperature(),
sht15_send_byte(), usb_cdc_handle_tx(), usb_configure_endpoints(), usb_ep_data_in_callback(),
usb_ep_data_out_callback(), usb_handle_class_ctrl_read_callback(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_reset(), usb_handle_stall(), usb_handle_standard_request(),
usb_handle_transaction(), usb_send_data(), usb_send_data_chunk(), wpan_data_received_callback(),
wpan_print_address(), wpan_print_frame_type(), and wpan_print_mac_command().
Here is the call graph for this function:
490
void serial_print_var (char * str, uns16 i)
Definition at line 365 of file pic_serial.c.
References serial_print_int(), serial_print_nl(), and serial_print_str().
Referenced by its1_controller_init(), and its1_device_process().
Here is the call graph for this function:
Here is the caller graph for this function:
void serial_putc (uns8 c)
Sends a single character out the serial connection. It is sent straight out if possible, otherwise put into
the fifo. Note that if you fill the fifo while interrupts are off (eg, in an interrupt routine or a critical
section) then this routine will hang the pic, since it's waiting for an interrupt to clear the fifo, which
never comes... The moral is to keep your fifo big enough or don't send too much while interrupts are
off (eg, in an interrupt response routine). Of course, you *can* send things in an ISR - just don't fill
the fifo up.
Parameters:
c the character to transmit
Definition at line 172 of file pic_serial.c.
References kill_interrupts, serial_handle_tx_isr, tx_buffer, tx_end, tx_start, and uns8.
Referenced by cat4016_write_data(), draw_print_buffer(), mrf24j40_receive(), mrf24j40_receive_callback(),
mrf24j40_set_extended_address(), pkt_process_rf_data(), serial_print_int(), serial_print_int_hex(),
serial_print_nl(), serial_print_spc(), serial_print_str(), term_process(), usb_cdc_handle_tx(),
usb_handle_class_ctrl_write_callback(), usb_handle_class_request_callback(), usb_handle_transaction(),
usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(), wpan_data_received_callback(),
wpan_print_address(), and wpan_print_mac_command().
Here is the caller graph for this function:
492
uns8 serial_rx_avail ()
Tests to see if the serial receive fifo has a character available. Useful to call before getc() if interrupts
are not enabled in that section of code.
Returns:
true (non zero) if there are one or more characters waiting in the fifo queue, false (zero) otherwise
Definition at line 371 of file pic_serial.c.
References rx_end, and rx_start.
Referenced by term_process().
Here is the caller graph for this function:
void serial_rx_isr ()
This routine needs to be called from your interrupt() routine when the receive hardware interrupt
occurs in order to put received bytes into the fifo buffer.
Definition at line 236 of file pic_serial.c.
References rx_buffer, rx_end, rx_start, and uns8.
void serial_setup (uns8 req_spbrg)
Configures the pic and gets ready for interrupt-driven serial communications. Includes setting the tris
bits appropriately, and getting the baud rate generator set up. After calling this you can immediately
start sending and receiving bytes.
Parameters:
brgh See sprg defines earlier in pic_serial.h
Definition at line 77 of file pic_serial.c.
Referenced by usb_handle_class_ctrl_write_callback().
Here is the caller graph for this function:
uns8 serial_tx_empty ()
Tests to see if the serial transmit fifo is empty.
Returns:
true (non zero) if tx fifo is empty, false (zero) otherwise
Definition at line 372 of file pic_serial.c.
References tx_end, and tx_start.
Referenced by usb_handle_class_ctrl_write_callback().
Here is the caller graph for this function:
493
void serial_tx_full ()
Tests to see if the serial transmit fifo is full.
Returns:
true (non zero) if tx fifo is full, false (zero) otherwise
void serial_tx_isr ()
serial_load_tx
This routine needs to be called from your interrupt() routine when the transmit hardware interrupt
occurs in order to send bytes that are waiting in the fifo buffer.
Definition at line 216 of file pic_serial.c.
References tx_buffer, tx_end, tx_start, and uns8.
Referenced by usb_handle_class_ctrl_write_callback().
Here is the caller graph for this function:
pic_term.c File Reference #include "pic_term.h" Include dependency graph for pic_term.c:
494
Functions
void term_init ()
void term_process ()
Variables
uns8 buffer_len
uns8 term_buffer [TERM_BUFFER_SIZE]
Function Documentation
void term_init ()
Definition at line 82 of file pic_term.c.
References buffer_len, and term_buffer.
void term_process ()
Definition at line 43 of file pic_term.c.
References buffer_len, MAGIC_BOOSTBLOADER_REQUEST, serial_getc(), serial_putc(), serial_rx_avail(),
term_buffer, term_entry_callback(), and uns8.
Here is the call graph for this function:
Variable Documentation
uns8 buffer_len
Definition at line 41 of file pic_term.c.
Referenced by term_init(), and term_process().
uns8 term_buffer[TERM_BUFFER_SIZE]
Definition at line 40 of file pic_term.c.
495
Referenced by term_init(), and term_process().
pic_term.h File Reference
Pic terminal routines. #include "pic_utils.h" #include "config.h" #include "pic_serial.h" Include dependency graph for pic_term.h:
This graph shows which files directly or indirectly include this file:
Functions
void term_entry_callback (uns8 *term_buffer)
void term_init ()
void term_process ()
Detailed Description
Allows the use of a serial terminal for interaction with the PIC
Put the following into your config.h
496
// - - - - - - - - - - - - - - - - - - - -
// pic_term defines
// - - - - - - - - - - - - - - - - - - - -
#define TERM_BUFFER_SIZE 10
// Reset (go to bootloader) if magic character received
#define TERM_ALLOW_BOOSTBLOADER
// Echo typing so user can see what they're doing
#define TERM_ECHO_INPUT
// - - - - - - - - - - - - - - - - - - - -
// Create term_entry_callback in your own code
// void term_entry_callback(uns8 *term_buffer);
Definition in file pic_term.h.
Function Documentation
void term_entry_callback (uns8 * term_buffer)
Referenced by term_process().
Here is the caller graph for this function:
void term_init ()
Definition at line 82 of file pic_term.c.
References buffer_len, and term_buffer.
void term_process ()
Definition at line 43 of file pic_term.c.
References buffer_len, MAGIC_BOOSTBLOADER_REQUEST, serial_getc(), serial_putc(), serial_rx_avail(),
term_buffer, term_entry_callback(), and uns8.
Here is the call graph for this function:
497
pic_tick.c File Reference #include "pic_tick.h" Include dependency graph for pic_tick.c:
Functions
void handle_tick ()
Call this routine to increment tick count. uns16 tick_calc_diff (uns16 a, uns16 b)
Calculate the tick time difference between two values. uns16 tick_get_count ()
Return current tick count. void timer_0_callback ()
Timer 0 callback function.
498
Function Documentation
void handle_tick ()
Typically called during the interrupt routine of a timer to increment the tick count. Note this routine
assumes that interupts are off - which is always the case in an interrupt sub routine.
Definition at line 66 of file pic_tick.c.
References tick.
uns16 tick_calc_diff (uns16 a, uns16 b)
Calculates how many ticks have elapsed between two tick values. Covers cases where the tick count
wraps beyond its 16 bit value.
Definition at line 58 of file pic_tick.c.
Referenced by its1_device_process(), its2_device_process(), its2_process_tx_queue(), its2_router_process(),
pkt_process_tx_queue(), and platform_leds_process().
Here is the caller graph for this function:
uns16 tick_get_count ()
Returns the current tick count. Thread and interrupt safe.
Definition at line 47 of file pic_tick.c.
References end_crit_sec, start_crit_sec, tick, and uns16.
Referenced by its1_device_process(), its1_find_controller(), its2_device_process(), its2_find_controller(),
its2_print_queue(), its2_process_tx_queue(), its2_router_process(), its2_transmit(), pkt_process_tx_queue(),
platform_leds_flash(), and platform_leds_process().
Here is the caller graph for this function:
499
void timer_0_callback ()
When a timer 0 interrupt occurs, after handling the interupt and timing issues, this callback function is
executed. You will need to define this subroutine in your code, otherwise linking will fail.
Definition at line 43 of file pic_tick.c.
References handle_tick_inline().
Here is the call graph for this function:
pic_tick.h File Reference
Timer helper routines. #include "pic_utils.h" Include dependency graph for pic_tick.h:
500
This graph shows which files directly or indirectly include this file:
Functions
void handle_tick ()
Call this routine to increment tick count. void handle_tick_inline ()
Call this routine to increment tick count - inline version. uns16 tick_calc_diff (uns16 a, uns16 b)
Calculate the tick time difference between two values. uns16 tick_get_count ()
Return current tick count. Variables
static uns16 tick = 0
Detailed Description
Definition in file pic_tick.h.
Function Documentation
void handle_tick ()
Typically called during the interrupt routine of a timer to increment the tick count. Note this routine
assumes that interupts are off - which is always the case in an interrupt sub routine.
Definition at line 66 of file pic_tick.c.
References tick.
void handle_tick_inline () [inline]
Typically called during the interrupt routine of a timer to increment the tick count. Note this routine
assumes that interupts are off - which is always the case in an interrupt sub routine. Inline version so
you don't use up one stack level
Definition at line 84 of file pic_tick.h.
References tick.
Referenced by timer_0_callback().
501
Here is the caller graph for this function:
uns16 tick_calc_diff (uns16 a, uns16 b)
Calculates how many ticks have elapsed between two tick values. Covers cases where the tick count
wraps beyond its 16 bit value.
Definition at line 58 of file pic_tick.c.
Referenced by its1_device_process(), its2_device_process(), its2_process_tx_queue(), its2_router_process(),
pkt_process_tx_queue(), and platform_leds_process().
Here is the caller graph for this function:
uns16 tick_get_count ()
Returns the current tick count. Thread and interrupt safe.
Definition at line 47 of file pic_tick.c.
References end_crit_sec, start_crit_sec, tick, and uns16.
Referenced by its1_device_process(), its1_find_controller(), its2_device_process(), its2_find_controller(),
its2_print_queue(), its2_process_tx_queue(), its2_router_process(), its2_transmit(), pkt_process_tx_queue(),
platform_leds_flash(), and platform_leds_process().
Here is the caller graph for this function:
502
Variable Documentation
uns16 tick = 0 [static]
Global tick counter
Definition at line 51 of file pic_tick.h.
Referenced by handle_tick(), handle_tick_inline(), and tick_get_count().
pic_timer.c File Reference #include "pic_timer.h" Include dependency graph for pic_timer.c:
503
pic_timer.h File Reference
Access to timer 0. #include "pic_utils.h" Include dependency graph for pic_timer.h:
This graph shows which files directly or indirectly include this file:
504
Defines
#define TIMER_16BIT_MODE 0
#define TIMER_8BIT_MODE 1
#define TIMER_PRESCALER_1_TO_128 0x06
#define TIMER_PRESCALER_1_TO_16 0x03
#define TIMER_PRESCALER_1_TO_2 0x00
#define TIMER_PRESCALER_1_TO_256 0x07
#define TIMER_PRESCALER_1_TO_32 0x04
#define TIMER_PRESCALER_1_TO_4 0x01
#define TIMER_PRESCALER_1_TO_64 0x05
#define TIMER_PRESCALER_1_TO_8 0x02
#define TIMER_PRESCALER_OFF 0xff
Functions
void timer_0_callback ()
Timer 0 callback function. void timer_setup_0 (bit mode_16_bit, uns8 prescaler_setting, uns16
timer_start_value)
Setup timer zero with starting values. void timer_start_0 ()
Start timer 0. void timer_stop_0 ()
Stop timer 0.
Detailed Description
Definition in file pic_timer.h.
Define Documentation
#define TIMER_16BIT_MODE 0
Timer mode for devices where this is applicable (16bit timer)
Definition at line 45 of file pic_timer.h.
#define TIMER_8BIT_MODE 1
Timer mode for devices where this is applicable (8bit timer)
Definition at line 47 of file pic_timer.h.
#define TIMER_PRESCALER_1_TO_128 0x06
Definition at line 57 of file pic_timer.h.
#define TIMER_PRESCALER_1_TO_16 0x03
Definition at line 54 of file pic_timer.h.
#define TIMER_PRESCALER_1_TO_2 0x00
505
Definition at line 51 of file pic_timer.h.
#define TIMER_PRESCALER_1_TO_256 0x07
Definition at line 58 of file pic_timer.h.
#define TIMER_PRESCALER_1_TO_32 0x04
Definition at line 55 of file pic_timer.h.
#define TIMER_PRESCALER_1_TO_4 0x01
Definition at line 52 of file pic_timer.h.
#define TIMER_PRESCALER_1_TO_64 0x05
Definition at line 56 of file pic_timer.h.
#define TIMER_PRESCALER_1_TO_8 0x02
Definition at line 53 of file pic_timer.h.
#define TIMER_PRESCALER_OFF 0xff
Definition at line 50 of file pic_timer.h.
Function Documentation
void timer_0_callback ()
When a timer 0 interrupt occurs, after handling the interupt and timing issues, this callback function is
executed. You will need to define this subroutine in your code, otherwise linking will fail.
Definition at line 43 of file pic_tick.c.
References handle_tick_inline().
Here is the call graph for this function:
void timer_setup_0 (bit mode_16_bit, uns8 prescaler_setting, uns16 timer_start_value)
Turns off timer zero, congures 16/8bit mode (only for 18f devices), prescaler setting and start value
(which will be loaded on each reset.
506
void timer_start_0 ()
Kicks off timer 0. In pic18 devices this will turn the timer on, on pic16 devices this will turn on
timer0 interrupts.
void timer_stop_0 ()
Stops timer 0. In pic18 devices, this will switch the timer off. On pic16 devices this will merely turn
off the interrupt and the timer will continue running.
pic_timer1.c File Reference #include "pic_timer1.h" Include dependency graph for pic_timer1.c:
Functions
void timer_setup_1 (uns8 prescaler_setting, uns16 timer_start_value)
Setup timer 1 with starting values. void timer_start_1 ()
Start timer 1. void timer_stop_1 ()
Stop timer 1. Variables
uns16 timer_1_start_value = 0
Function Documentation
void timer_setup_1 (uns8 prescaler_setting, uns16 timer_start_value)
Turns off timer 1, sets prescaler setting and start value (which will be loaded on each reset).
Definition at line 43 of file pic_timer1.c.
References timer_1_start_value.
507
void timer_start_1 ()
Kicks off timer 1.
Definition at line 56 of file pic_timer1.c.
References timer_1_start_value.
void timer_stop_1 ()
Stops timer 1.
Definition at line 63 of file pic_timer1.c.
Variable Documentation
uns16 timer_1_start_value = 0
Definition at line 40 of file pic_timer1.c.
Referenced by timer_handle_1_isr(), timer_setup_1(), and timer_start_1().
pic_timer1.h File Reference
Timer 1 support. #include "pic_utils.h" Include dependency graph for pic_timer1.h:
This graph shows which files directly or indirectly include this file:
508
Defines
#define TIMER1_PRESCALER_1_TO_2 0b00010000
#define TIMER1_PRESCALER_1_TO_4 0b00100000
#define TIMER1_PRESCALER_1_TO_8 0b00110000
#define TIMER1_PRESCALER_OFF 0b00000000
Functions
void timer_1_callback ()
Timer 1 callback function. void timer_handle_1_isr ()
handle timer 1 in interrupt service routine void timer_setup_1 (uns8 prescaler_setting, uns16 timer_start_value)
Setup timer 1 with starting values. void timer_start_1 ()
Start timer 1. void timer_stop_1 ()
Stop timer 1. Variables
uns16 timer_1_start_value
Detailed Description
Definition in file pic_timer1.h.
Define Documentation
#define TIMER1_PRESCALER_1_TO_2 0b00010000
Definition at line 44 of file pic_timer1.h.
#define TIMER1_PRESCALER_1_TO_4 0b00100000
Definition at line 45 of file pic_timer1.h.
#define TIMER1_PRESCALER_1_TO_8 0b00110000
Definition at line 46 of file pic_timer1.h.
#define TIMER1_PRESCALER_OFF 0b00000000
Definition at line 43 of file pic_timer1.h.
Function Documentation
void timer_1_callback ()
When a timer 1 interrupt occurs, after handling the interupt and timing issues, this callback function is
executed. You will need to define this subroutine in your code, otherwise linking will fail.
509
Referenced by timer_handle_1_isr().
Here is the caller graph for this function:
void timer_handle_1_isr () [inline]
Call this routine in your interrupt subroutine to automatically service timer 1 interrupts if they have
occursed.
Definition at line 94 of file pic_timer1.h.
References timer_1_callback(), timer_1_start_value, and uns16.
Here is the call graph for this function:
void timer_setup_1 (uns8 prescaler_setting, uns16 timer_start_value)
Turns off timer 1, sets prescaler setting and start value (which will be loaded on each reset).
Definition at line 43 of file pic_timer1.c.
References timer_1_start_value.
void timer_start_1 ()
Kicks off timer 1.
Definition at line 56 of file pic_timer1.c.
References timer_1_start_value.
void timer_stop_1 ()
Stops timer 1.
Definition at line 63 of file pic_timer1.c.
Variable Documentation
uns16 timer_1_start_value
Definition at line 40 of file pic_timer1.c.
Referenced by timer_handle_1_isr(), timer_setup_1(), and timer_start_1().
pic_usb.c File Reference #include "pic_usb.h" #include "memory.h"
510
#include "config.h" #include "pic_usb_buffer_mgt.h" #include "pic_serial.h" Include dependency graph for pic_usb.c:
Functions
void turn_usb_ints_on ()
Turn on USB interrupts. void usb_configure_endpoints ()
void usb_enable_module ()
Enables the USB hardware and starts USB negotiations. usb_state_type usb_get_state ()
Query the current state of the USB connection. void usb_handle_isr ()
Handle USB interrupts. void usb_handle_reset ()
void usb_handle_stall ()
void usb_handle_standard_request (setup_data_packet sdp)
void usb_handle_transaction (uns8 stat)
void usb_prime_ep0_out_e ()
void usb_prime_ep0_out_o ()
void usb_send_data (uns8 ep, uns8 *data, uns8 send_count, bit first)
Send data over an endpoint pipe. void usb_send_data_chunk ()
void usb_send_empty_data_pkt ()
Send an empty data packet. void usb_send_one_byte (uns8 data)
void usb_setup ()
Setup USB hardware ready for use. void usb_stall_ep0 ()
Send a stall on control transfer endpoint. void usb_stall_on_in ()
Variables
uns8 buffer_byte
control_mode_type control_mode
buffer_descriptor * delivery_bd
511
uns8 * delivery_buffer
uns8 delivery_buffer_size
uns16 delivery_bytes_max_send
uns16 delivery_bytes_sent
uns16 delivery_bytes_to_send
uns8 * delivery_ptr
uns8 usb_address
setup_data_packet usb_sdp
usb_state_type usb_state = st_POWERED
usb_status_type usb_status
Function Documentation
void turn_usb_ints_on ()
If you are using interrupt-driven code (generally the best way of doing things) you can turn on USB
interrupts using turn_usb_ints_on(). Don't forget that you will also need to call turn_global_ints_on()
as well. Typically this is called in your system setup routine.
Definition at line 962 of file pic_usb.c.
void usb_configure_endpoints ()
Definition at line 66 of file pic_usb.c.
References buffer_descriptor::addr, BC8, BC9, bd1in, bd1out, bd2in, bd2out, bd3in, bd3out, BSTALL,
buffer_descriptor::count, DTS, DTSEN, INCDIS, KEN, serial_print_str(), buffer_descriptor::stat, and UOWN.
Referenced by usb_handle_standard_request().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_enable_module ()
After you've called usb_setup(), you can call usb_enable_module() whenever you're ready for USB
negotiations to occur. Normally, this would need to occur relatively quickly after power-up if your
PIC is powered by USB and it's purpose is to talk over USB. This is normally called from your main()
routine once all other configuration is done.
Once the USB module has successfully negotiated a connection with the host,
usb_device_configured_callback() will be called if you have requested this in your config.h file. This
will indicate a successful connection. Because of the way USB works, there is no way to tell that it
*hasn't* worked, except via a timer - if you haven't had a good connection in several seconds, you can
assume it has failed (although this may just mean the user is hunting for a driver disk etc).
Definition at line 1033 of file pic_usb.c.
References st_DEFAULT, and usb_state.
512
usb_state_type usb_get_state ()
Returns the USB state, either powered, default, address or connect. This is updated as the negotiation
progresses. It may be useful to query this if, after a suitable time-out, the connection has not been
made.
Definition at line 1039 of file pic_usb.c.
References usb_state.
void usb_handle_isr ()
usb_handle_isr() should be inserted in your interrupt service routine. Alternatively, if you have reason
not to want to do interrupt-driven USB, for example, a bootloader, you can poll this routine.
Make sure you call turn_usb_ints() and turn_global_ints_on() to ensure interrupts occur.
It will check for any of the USB interrupt flags and handle: USB transactions, USB reset, USB stall,
USB Start Of Frame (including calling usb_SOF_callback() if configured in your config.h and most
importantly USB transaction, which is where all the hard work is done.
Definition at line 928 of file pic_usb.c.
References uns8, usb_handle_reset(), usb_handle_stall(), usb_handle_transaction(), and usb_SOF_callback().
Here is the call graph for this function:
513
void usb_handle_reset ()
Definition at line 853 of file pic_usb.c.
References buffer_descriptor::addr, BC8, BC9, bd0in, bd0out_e, bd0out_o, BSTALL, cm_IDLE, control_mode,
buffer_descriptor::count, DTS, DTSEN, INCDIS, KEN, serial_print_int_hex(), serial_print_str(),
buffer_descriptor::stat, UOWN, us_IDLE, usb_address, USB_EP0_IN_ADDR, USB_EP0_OUT_E_ADDR,
USB_EP0_OUT_O_ADDR, and usb_status.
Referenced by usb_handle_isr().
Here is the call graph for this function:
514
Here is the caller graph for this function:
void usb_handle_stall ()
Definition at line 918 of file pic_usb.c.
References bd0in, BSTALL, serial_print_str(), buffer_descriptor::stat, and UOWN.
Referenced by usb_handle_isr().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_handle_standard_request (setup_data_packet sdp)
Definition at line 428 of file pic_usb.c.
References bd0in, setup_data_packet::bRequest, cm_CTRL_READ_DATA_STAGE,
cm_CTRL_WRITE_SENDING_STATUS, control_mode, delivery_buffer, delivery_buffer_size,
delivery_bytes_max_send, delivery_bytes_sent, delivery_bytes_to_send, delivery_ptr, DTS,
req_Get_Descriptor, req_Get_Interface, req_Get_Status, req_Set_Address, req_Set_Configuration,
serial_print_int(), serial_print_int_hex(), serial_print_str(), st_CONFIGURED, buffer_descriptor::stat, uns8,
us_SET_ADDRESS, usb_address, usb_configure_endpoints(), usb_device_configured_callback(),
USB_EP0_IN_ADDR, usb_get_descriptor_callback(), usb_send_data_chunk(), usb_send_one_byte(),
usb_send_status_ack, usb_stall_ep0(), usb_state, usb_status, setup_data_packet::wLength, and
setup_data_packet::wValue.
Referenced by usb_handle_transaction().
Here is the call graph for this function:
515
Here is the caller graph for this function:
void usb_handle_transaction (uns8 stat)
!usb_stall_on_in();
Definition at line 524 of file pic_usb.c.
References buffer_descriptor::addr, BC8, BC9, bd0in, bd0out_e, bd0out_o,
setup_data_packet::bmRequestType, setup_data_packet::bRequest, BSTALL, buffer_0_in, buffer_0_out_e,
buffer_0_out_o, cm_CTRL_READ_AWAITING_STATUS, cm_CTRL_READ_DATA_STAGE,
cm_CTRL_READ_DATA_STAGE_CLASS, cm_CTRL_WRITE_DATA_STAGE_CLASS,
cm_CTRL_WRITE_SENDING_STATUS, cm_IDLE, control_mode, buffer_descriptor::count,
DATA_STAGE_DIR, DTS, DTSEN, ep_in_bd_location, ep_out_bd_location, ep_out_buffer_location,
ep_out_buffer_size, INCDIS, KEN, pid_ACK, pid_IN, pid_OUT, pid_SETUP, REQUEST_TYPE0,
REQUEST_TYPE1, serial_print_int(), serial_print_int_hex(), serial_print_int_hex_16bit(), serial_print_spc(),
serial_print_str(), serial_putc(), st_ADDRESS, buffer_descriptor::stat, uns16, uns8, UOWN, us_IDLE,
us_SET_ADDRESS, usb_address, usb_ep_data_in_callback(), usb_ep_data_out_callback(),
usb_handle_class_ctrl_read_callback(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_standard_request(), usb_prime_ep0_out_e(),
usb_prime_ep0_out_o(), usb_send_data_chunk(), usb_state, usb_status, setup_data_packet::wIndex,
setup_data_packet::wLength, and setup_data_packet::wValue.
Referenced by usb_handle_isr().
Here is the call graph for this function:
517
! clear
Definition at line 384 of file pic_usb.c.
References buffer_descriptor::addr, BC8, BC9, bd0out_e, BSTALL, buffer_descriptor::count, DTS, DTSEN,
INCDIS, KEN, serial_putc(), buffer_descriptor::stat, UOWN, and USB_EP0_OUT_E_ADDR.
Referenced by usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_prime_ep0_out_o ()
! clear
Definition at line 406 of file pic_usb.c.
References buffer_descriptor::addr, BC8, BC9, bd0out_o, BSTALL, buffer_descriptor::count, DTS, DTSEN,
INCDIS, KEN, serial_putc(), buffer_descriptor::stat, UOWN, and USB_EP0_OUT_O_ADDR.
Referenced by usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_send_data (uns8 ep, uns8 * data, uns8 send_count, bit first)
Use this routine to send data across the USB pipe.
Parameters:
ep Endpoint that the data should be sent from
data pointer to the data
send_count the number of bytes to send
first True if this is the first in a series of sends. Generally, this can be set to False, since it will automatically
be set to the right value on endpoint creation. However, in the case of control transfers, the data stage needs
to have the first parameter set to True to ensure the DTS bit is set correctly.
Definition at line 211 of file pic_usb.c.
References buffer_descriptor::addr, BC8, BC9, BSTALL, buffer_descriptor::count, DTS, DTSEN,
ep_in_bd_location, ep_in_buffer_location, INCDIS, KEN, serial_print_int(), serial_print_str(), serial_putc(),
buffer_descriptor::stat, uns16, uns8, and UOWN.
518
Referenced by usb_handle_class_request_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_send_data_chunk ()
Definition at line 260 of file pic_usb.c.
References buffer_descriptor::addr, BC8, BC9, bd0in, BSTALL, buffer_0_in,
cm_CTRL_READ_AWAITING_STATUS, cm_CTRL_WRITE_SENDING_STATUS, control_mode,
buffer_descriptor::count, delivery_buffer, delivery_buffer_size, delivery_bytes_max_send, delivery_bytes_sent,
delivery_bytes_to_send, delivery_ptr, DTS, DTSEN, INCDIS, KEN, serial_print_int(), serial_print_str(),
buffer_descriptor::stat, uns16, uns8, and UOWN.
Referenced by usb_handle_standard_request(), usb_handle_transaction(), usb_send_empty_data_pkt(), and
usb_send_one_byte().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_send_empty_data_pkt ()
Use this routine to send an data across the USB pipe on endpoint 0. This is the equivalent of sending
a status acknowledge.
Definition at line 341 of file pic_usb.c.
519
References bd0in, buffer_0_in, delivery_buffer, delivery_buffer_size, delivery_bytes_max_send,
delivery_bytes_sent, delivery_bytes_to_send, delivery_ptr, DTS, buffer_descriptor::stat, uns8, and
usb_send_data_chunk().
Here is the call graph for this function:
void usb_send_one_byte (uns8 data)
Definition at line 370 of file pic_usb.c.
References bd0in, buffer_0_in, buffer_byte, delivery_buffer, delivery_buffer_size, delivery_bytes_max_send,
delivery_bytes_sent, delivery_bytes_to_send, delivery_ptr, DTS, buffer_descriptor::stat, uns8, and
usb_send_data_chunk().
Referenced by usb_handle_standard_request().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_setup ()
usb_setup() configures the PIC USB hardware ready for use and prepares the internal data structures
used to keep track of where the endpoint buffers are.
After calling usb_setup(), you are ready to call usb_enable_module() to actually start USB
negotiations. Ensure that you have usb_handle_isr() in your interrupt service routine.
Definition at line 973 of file pic_usb.c.
References bd0in, bd0out_e, bd1in, bd1out, bd2in, bd2out, bd3in, bd3out, bd4in, bd4out, ep_in_bd_location,
ep_out_bd_location, st_POWERED, and usb_state.
void usb_stall_ep0 ()
Use this routine to send a stall on the control transfer endpoint - usually used to indicate that the
requested function is not available.
Definition at line 203 of file pic_usb.c.
References bd0in, BSTALL, buffer_descriptor::stat, and UOWN.
Referenced by usb_handle_class_request_callback(), and usb_handle_standard_request().
Here is the caller graph for this function:
520
void usb_stall_on_in ()
Definition at line 353 of file pic_usb.c.
References BC8, BC9, bd0in, BSTALL, DTS, DTSEN, INCDIS, KEN, buffer_descriptor::stat, and UOWN.
Variable Documentation
uns8 buffer_byte
Definition at line 368 of file pic_usb.c.
Referenced by usb_send_one_byte().
control_mode_type control_mode
Store the control mode state
Definition at line 55 of file pic_usb.c.
Referenced by usb_handle_class_ctrl_read_callback(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_reset(), usb_handle_standard_request(),
usb_handle_transaction(), and usb_send_data_chunk().
buffer_descriptor* delivery_bd
Definition at line 62 of file pic_usb.c.
uns8* delivery_buffer
Definition at line 61 of file pic_usb.c.
Referenced by usb_handle_standard_request(), usb_send_data_chunk(), usb_send_empty_data_pkt(), and
usb_send_one_byte().
uns8 delivery_buffer_size
Definition at line 60 of file pic_usb.c.
Referenced by usb_handle_standard_request(), usb_send_data_chunk(), usb_send_empty_data_pkt(), and
usb_send_one_byte().
uns16 delivery_bytes_max_send
Definition at line 56 of file pic_usb.c.
521
Referenced by usb_handle_standard_request(), usb_send_data_chunk(), usb_send_empty_data_pkt(), and
usb_send_one_byte().
uns16 delivery_bytes_sent
Definition at line 56 of file pic_usb.c.
Referenced by usb_handle_standard_request(), usb_send_data_chunk(), usb_send_empty_data_pkt(), and
usb_send_one_byte().
uns16 delivery_bytes_to_send
Definition at line 56 of file pic_usb.c.
Referenced by usb_handle_standard_request(), usb_send_data_chunk(), usb_send_empty_data_pkt(), and
usb_send_one_byte().
uns8* delivery_ptr
Definition at line 59 of file pic_usb.c.
Referenced by usb_handle_standard_request(), usb_send_data_chunk(), usb_send_empty_data_pkt(), and
usb_send_one_byte().
uns8 usb_address
Store the usb address
Definition at line 54 of file pic_usb.c.
Referenced by usb_handle_reset(), usb_handle_standard_request(), and usb_handle_transaction().
setup_data_packet usb_sdp
Store the last setup data packet
Definition at line 52 of file pic_usb.c.
Referenced by usb_handle_class_ctrl_read_callback(), and usb_handle_class_ctrl_write_callback().
usb_state_type usb_state = st_POWERED
Store the current USB device state
Definition at line 50 of file pic_usb.c.
Referenced by usb_enable_module(), usb_get_state(), usb_handle_standard_request(),
usb_handle_transaction(), and usb_setup().
usb_status_type usb_status
Definition at line 64 of file pic_usb.c.
Referenced by usb_handle_reset(), usb_handle_standard_request(), and usb_handle_transaction().
522
pic_usb.h File Reference
Pic USB routines. #include "pic_utils.h" Include dependency graph for pic_usb.h:
This graph shows which files directly or indirectly include this file:
Data Structures
struct buffer_descriptor
struct CDC_ACM_functional_descriptor
struct CDC_call_mgt_functional_descriptor
struct CDC_header_functional_descriptor
struct CDC_union_functional_descriptor
struct configuration_descriptor
struct device_descriptor
struct endpoint_descriptor
struct hid_descriptor
struct interface_descriptor
struct setup_data_packet
Defines
#define BC8 0
#define BC9 1
#define BSTALL 2
#define DATA_STAGE_DIR 7
523
#define dt_CONFIGURATION 0x02
#define dt_CS_INTERFACE 0x24
#define dt_DEBUG 0x0a
#define dt_DEVICE 0x01
#define dt_DEVICE_QUALIFIER 0x06
#define dt_ENDPOINT 0x05
#define dt_HID 0x21
#define dt_HID_REPORT 0x22
#define dt_INTERFACE 0x04
#define dt_INTERFACE_ASSOC 0x0b
#define dt_INTERFACE_POWER 0x08
#define dt_OTG 0x09
#define dt_OTHER_SPEED_CONFIG 0x07
#define dt_STRING 0x03
#define DTS 6
#define DTSEN 3
#define INCDIS 4
#define KEN 5
#define PID0 2
#define PID1 3
#define PID2 4
#define PID3 5
#define pid_ACK 0b00000010
#define pid_DATA0 0b00000011
#define pid_DATA1 0b00001011
#define pid_DATA2 0b00000111
#define pid_IN 0b00001001
#define pid_MDATA 0b00001111
#define pid_NAK 0b00001010
#define pid_NYET 0b00000110
#define pid_OUT 0b00000001
#define pid_SETUP 0b00001101
#define pid_SOF 0b00000101
#define pid_STALL 0b00001110
#define req_Clear_Feature 0x01
#define req_Get_Configuration 0x08
#define req_Get_Descriptor 0x06
#define req_Get_Interface 0x0a
#define req_Get_Status 0x00
#define req_Set_Address 0x05
#define req_Set_Configuration 0x09
#define req_Set_Descriptor 0x07
#define req_Set_Feature 0x03
#define req_Set_Interface 0x0b
#define req_Synch_Frame 0x0c
#define REQUEST_TYPE0 5
#define REQUEST_TYPE1 6
#define UOWN 7
#define usb_send_status_ack() usb_send_empty_data_pkt()
524
Enumerations
enum control_mode_type { cm_IDLE, cm_CTRL_WRITE_DATA_STAGE,
cm_CTRL_WRITE_DATA_STAGE_CLASS, cm_CTRL_READ_DATA_STAGE,
cm_CTRL_READ_DATA_STAGE_CLASS, cm_CTRL_READ_AWAITING_STATUS,
cm_CTRL_WRITE_SENDING_STATUS }
enum usb_state_type { st_POWERED, st_DEFAULT, st_ADDRESS, st_CONFIGURED }
enum usb_status_type { us_IDLE, us_SET_ADDRESS }
Functions
void turn_usb_ints_on ()
Turn on USB interrupts. void usb_device_configured_callback ()
Callback routine triggered when a successful intial USB negotiation has completed. void usb_enable_module ()
Enables the USB hardware and starts USB negotiations. void usb_ep_data_in_callback (uns8 end_point, uns16
byte_count)
Callback routine triggered when data has been sent to the host. void usb_ep_data_out_callback (uns8
end_point, uns8 *buffer_location, uns16 byte_count)
Callback routine triggered when data has been sent to the device. void usb_get_descriptor_callback (uns8
descriptor_type, uns8 descriptor_num, uns8 **rtn_descriptor_ptr, uns16 *rtn_descriptor_size)
Callback routine triggered when the descriptor is requested by the host. usb_state_type usb_get_state ()
Query the current state of the USB connection. void usb_handle_class_ctrl_read_callback ()
Callback routine for a class control read. void usb_handle_class_ctrl_write_callback (uns8 *data, uns16 count)
Callback routine for a class control write. void usb_handle_class_request_callback (setup_data_packet sdp)
Callback routine for a control transfer request that is placed on the class. void usb_handle_isr ()
Handle USB interrupts. void usb_send_data (uns8 ep, uns8 *data, uns8 send_count, bit first)
Send data over an endpoint pipe. void usb_send_empty_data_pkt ()
Send an empty data packet. void usb_setup ()
Setup USB hardware ready for use. void usb_SOF_callback (uns16 frame)
Callback routine triggered each time a start of frame (SOF) has been received. void usb_stall_ep0 ()
Send a stall on control transfer endpoint. Variables
control_mode_type control_mode
uns8 usb_address
setup_data_packet usb_sdp
usb_state_type usb_state
Detailed Description
Put the following in your config.h
- - - - - - - - - - - - - - - - - - - pic_usb defines
- - - - - - - - - - - - - - - - - - -
Use this define if you would like to get USB negotiation and data transfer information out the serial
(UART) port. You'll also need to include pic_serial.c in your project. define USB_DEBUG
Use this define if you would like a high level (ie, lots) of USB debug information printed out the serial
(UART) port. define USB_DEBUG_HIGH
Define the highest numbered endpoint you will use (in this case, we choose 3). define
USB_HIGHEST_EP 3
Define either USB_SELF_POWERED or USB_BUS_POWERED define USB_SELF_POWERED define
USB_BUS_POWERED
525
Define your endpoint buffers. These start at 0x500 for a 18f4550. You'll always need endpoint 0, which is
the control transfer endpoint, and others as well depending on your use. You don't have to declare the
endpoints you don't use, even if they're not sequential.
define USB_EP0_OUT_SIZE 8 define USB_EP0_OUT_ADDR 0x0200
define USB_EP0_IN_SIZE 8 define USB_EP0_IN_ADDR 0x0208
EP1 not used
define USB_EP2_IN_SIZE 8 define USB_EP2_IN_ADDR 0x0210
define USB_EP3_OUT_SIZE 8 define USB_EP3_OUT_ADDR 0x0218 define USB_EP3_IN_SIZE 8
define USB_EP3_IN_ADDR 0x0220
Use this define if you want to get a callback each SOF (Start Of Frame), generally every 1ms define
USB_CALLBACK_ON_SOF if you define it, you'll need to include this routine in your code: void
usb_SOF_callback(uns16 frame) { }
Use this define if you would like to know when your device has been configured and is ready for use
define USB_CALLBACK_ON_DEVICE_CONFIGURED if you define it, you'll need to include this
routine in your code: void usb_device_configured_callback() { }
Use this define if your device uses class control transfers, eg, CDC (virtual serial port) is one that does
define USB_CALLBACK_ON_CTRL_CLASS if you define it, you'll need to include these routines in
your code: void usb_handle_class_ctrl_read_callback(); void usb_handle_class_ctrl_write_callback(uns8
*data, uns16 count); void usb_handle_class_request_callback(setup_data_packet sdp);
Use this define if you would like to get notified when data has arrived or been succesfully sent define
USB_EP_DATA_CALLBACK if you define it, you'll need to include these routines in your code: void
usb_ep_data_out_callback(uns8 end_point, uns8 *buffer_location, uns16 byte_count); void
usb_ep_data_in_callback(uns8 end_point, uns16 byte_count);
Put the following in your ISR
usb_handle_isr();
Put the following in your system setup routine
Setup USB usb_setup();
Turn on USB interrupts void turn_usb_ints_on();
Turn on global interrupts turn_global_ints_on();
When you're ready to start the USB subsystem and negotiate address, send descriptors etc, call
usb_enable_module();
Definition in file pic_usb.h.
Define Documentation
#define BC8 0
Definition at line 198 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_transaction(),
usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(), usb_send_data_chunk(), and
usb_stall_on_in().
526
#define BC9 1
Definition at line 197 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_transaction(),
usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(), usb_send_data_chunk(), and
usb_stall_on_in().
#define BSTALL 2
Definition at line 196 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_stall(),
usb_handle_transaction(), usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(),
usb_send_data_chunk(), usb_stall_ep0(), and usb_stall_on_in().
#define DATA_STAGE_DIR 7
Definition at line 178 of file pic_usb.h.
Referenced by usb_handle_transaction().
#define dt_CONFIGURATION 0x02
Definition at line 278 of file pic_usb.h.
#define dt_CS_INTERFACE 0x24
Definition at line 291 of file pic_usb.h.
#define dt_DEBUG 0x0a
Definition at line 286 of file pic_usb.h.
#define dt_DEVICE 0x01
Definition at line 277 of file pic_usb.h.
#define dt_DEVICE_QUALIFIER 0x06
Definition at line 282 of file pic_usb.h.
#define dt_ENDPOINT 0x05
Definition at line 281 of file pic_usb.h.
#define dt_HID 0x21
527
Definition at line 288 of file pic_usb.h.
#define dt_HID_REPORT 0x22
Definition at line 289 of file pic_usb.h.
#define dt_INTERFACE 0x04
Definition at line 280 of file pic_usb.h.
#define dt_INTERFACE_ASSOC 0x0b
Definition at line 287 of file pic_usb.h.
#define dt_INTERFACE_POWER 0x08
Definition at line 284 of file pic_usb.h.
#define dt_OTG 0x09
Definition at line 285 of file pic_usb.h.
#define dt_OTHER_SPEED_CONFIG 0x07
Definition at line 283 of file pic_usb.h.
#define dt_STRING 0x03
Definition at line 279 of file pic_usb.h.
#define DTS 6
Definition at line 192 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(),
usb_handle_standard_request(), usb_handle_transaction(), usb_prime_ep0_out_e(), usb_prime_ep0_out_o(),
usb_send_data(), usb_send_data_chunk(), usb_send_empty_data_pkt(), usb_send_one_byte(), and
usb_stall_on_in().
#define DTSEN 3
Definition at line 195 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_transaction(),
usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(), usb_send_data_chunk(), and
usb_stall_on_in().
528
#define INCDIS 4
Definition at line 194 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_transaction(),
usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(), usb_send_data_chunk(), and
usb_stall_on_in().
#define KEN 5
Definition at line 193 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_transaction(),
usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(), usb_send_data_chunk(), and
usb_stall_on_in().
#define PID0 2
Definition at line 206 of file pic_usb.h.
#define PID1 3
Definition at line 205 of file pic_usb.h.
#define PID2 4
Definition at line 204 of file pic_usb.h.
#define PID3 5
Definition at line 203 of file pic_usb.h.
#define pid_ACK 0b00000010
Definition at line 255 of file pic_usb.h.
Referenced by usb_handle_transaction().
#define pid_DATA0 0b00000011
Definition at line 248 of file pic_usb.h.
#define pid_DATA1 0b00001011
Definition at line 249 of file pic_usb.h.
#define pid_DATA2 0b00000111
529
Definition at line 250 of file pic_usb.h.
#define pid_IN 0b00001001
Definition at line 242 of file pic_usb.h.
Referenced by usb_handle_transaction().
#define pid_MDATA 0b00001111
Definition at line 251 of file pic_usb.h.
#define pid_NAK 0b00001010
Definition at line 256 of file pic_usb.h.
#define pid_NYET 0b00000110
Definition at line 258 of file pic_usb.h.
#define pid_OUT 0b00000001
Definition at line 241 of file pic_usb.h.
Referenced by usb_handle_transaction().
#define pid_SETUP 0b00001101
Definition at line 244 of file pic_usb.h.
Referenced by usb_handle_transaction().
#define pid_SOF 0b00000101
Definition at line 243 of file pic_usb.h.
#define pid_STALL 0b00001110
Definition at line 257 of file pic_usb.h.
#define req_Clear_Feature 0x01
Definition at line 264 of file pic_usb.h.
#define req_Get_Configuration 0x08
Definition at line 269 of file pic_usb.h.
530
#define req_Get_Descriptor 0x06
Definition at line 267 of file pic_usb.h.
Referenced by usb_handle_standard_request().
#define req_Get_Interface 0x0a
Definition at line 271 of file pic_usb.h.
Referenced by usb_handle_standard_request().
#define req_Get_Status 0x00
Definition at line 263 of file pic_usb.h.
Referenced by usb_handle_standard_request().
#define req_Set_Address 0x05
Definition at line 266 of file pic_usb.h.
Referenced by usb_handle_standard_request().
#define req_Set_Configuration 0x09
Definition at line 270 of file pic_usb.h.
Referenced by usb_handle_standard_request().
#define req_Set_Descriptor 0x07
Definition at line 268 of file pic_usb.h.
#define req_Set_Feature 0x03
Definition at line 265 of file pic_usb.h.
#define req_Set_Interface 0x0b
Definition at line 272 of file pic_usb.h.
#define req_Synch_Frame 0x0c
Definition at line 273 of file pic_usb.h.
#define REQUEST_TYPE0 5
531
Definition at line 181 of file pic_usb.h.
Referenced by usb_handle_transaction().
#define REQUEST_TYPE1 6
Definition at line 180 of file pic_usb.h.
Referenced by usb_handle_transaction().
#define UOWN 7
Definition at line 191 of file pic_usb.h.
Referenced by usb_cdc_handle_tx(), usb_configure_endpoints(), usb_handle_reset(), usb_handle_stall(),
usb_handle_transaction(), usb_prime_ep0_out_e(), usb_prime_ep0_out_o(), usb_send_data(),
usb_send_data_chunk(), usb_stall_ep0(), and usb_stall_on_in().
#define usb_send_status_ack() usb_send_empty_data_pkt()
Send a status acknowledge by sending an empty data packet
Definition at line 397 of file pic_usb.h.
Referenced by usb_handle_class_ctrl_write_callback(), usb_handle_class_request_callback(), and
usb_handle_standard_request().
Enumeration Type Documentation
enum control_mode_type
Describe the state of the control transfer
Enumerator:
cm_IDLE No control transfer taking place
cm_CTRL_WRITE_DATA_STAGE Device receiving data during the data stage
cm_CTRL_WRITE_DATA_STAGE_CLASS Device receiving data during the data stage
destined for the class
cm_CTRL_READ_DATA_STAGE Device sending data during the data stage
cm_CTRL_READ_DATA_STAGE_CLASS Device class is sending data during the data stage
cm_CTRL_READ_AWAITING_STATUS Device is awaiting reception of status after sending
data
cm_CTRL_WRITE_SENDING_STATUS Device is sending status after receiving data
Definition at line 211 of file pic_usb.h.
enum usb_state_type
Handle the different states that USB device can be in
Enumerator:
st_POWERED USB device is powered up, ready to start negotiating
532
st_DEFAULT USB device is now negotiating
st_ADDRESS USB device now has an address
st_CONFIGURED USB device is completely configured and ready to rock and roll
Definition at line 140 of file pic_usb.h.
enum usb_status_type
Handle the special case of when we send a status ack and THEN change the address. So we need to
know that the USB device is in that micro state (ie, received the new address but not yet sent the
status
Enumerator:
us_IDLE
us_SET_ADDRESS
Definition at line 232 of file pic_usb.h.
Function Documentation
void turn_usb_ints_on ()
If you are using interrupt-driven code (generally the best way of doing things) you can turn on USB
interrupts using turn_usb_ints_on(). Don't forget that you will also need to call turn_global_ints_on()
as well. Typically this is called in your system setup routine.
Definition at line 962 of file pic_usb.c.
void usb_device_configured_callback ()
Once descriptors have been received by the host and the host has selected a configuration to use, this
routine is triggered. Typically this means that negotiations have completed successfully and an
appropriate driver has been loaded.
In order for this callback to be triggered, you must define
USB_CALLBACK_ON_DEVICE_CONFIGURED in your config.h
Referenced by usb_handle_standard_request().
Here is the caller graph for this function:
void usb_enable_module ()
After you've called usb_setup(), you can call usb_enable_module() whenever you're ready for USB
negotiations to occur. Normally, this would need to occur relatively quickly after power-up if your
PIC is powered by USB and it's purpose is to talk over USB. This is normally called from your main()
routine once all other configuration is done.
Once the USB module has successfully negotiated a connection with the host,
usb_device_configured_callback() will be called if you have requested this in your config.h file. This
will indicate a successful connection. Because of the way USB works, there is no way to tell that it
533
*hasn't* worked, except via a timer - if you haven't had a good connection in several seconds, you can
assume it has failed (although this may just mean the user is hunting for a driver disk etc).
Definition at line 1033 of file pic_usb.c.
References st_DEFAULT, and usb_state.
void usb_ep_data_in_callback (uns8 end_point, uns16 byte_count)
If you have called usb_send_data to transfer data to the host, this routine will be fired once this data
has been transferred. You may send more data by using usb_send_data(). Since the current PicPack
USB library supports only single buffering, transfer speed is limited by how quickly you can refill the
buffer again. In the future, we may support double buffering (ping poing buffering) which will most
likely improve transfer speeds (to be fair, transfer performance has not been a limiting factor in tests
so far).
In order for this callback to be triggered, you must define USB_EP_DATA_CALLBACK in your
config.h
Parameters:
end_point The endpoint on which the data was transferred
byte_count The number of bytes that were actually transferred
Definition at line 323 of file usb_cdc_class.c.
References serial_print_int(), serial_print_str(), and usb_cdc_handle_tx().
Referenced by usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_ep_data_out_callback (uns8 end_point, uns8 * buffer_location, uns16 byte_count)
If data is sent to the device and the endpoint is not endpoint 0 (the control transfer endpoint) then this
routine is called. Since the routine is passed the actual hardware buffer location, it is important to pull
data out of the buffer as soon as possible in order to free up the buffer to receive more data. The
buffer is re-primed only once this routine completes since PicPack only supports single-buffered
mode. In the future, we may look at supporting double buffering (ping-pong buffering) in order to be
able to receive more data even while this routine is being called.
In order for this callback to be triggered, you must define USB_EP_DATA_CALLBACK in your
config.h
534
Parameters:
end_point The endpoint the data was sent do
buffer_lcoation The memory location of the USB buffer where the data was received into
byte_count The number of bytes received
Definition at line 283 of file usb_cdc_class.c.
References cdc_rx_buffer, cdc_rx_end, cdc_rx_start, platform_leds_flash(), serial_print_int(), serial_print_str(),
and uns8.
Referenced by usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_get_descriptor_callback (uns8 descriptor_type, uns8 descriptor_num, uns8 ** rtn_descriptor_ptr, uns16 * rtn_descriptor_size)
Once negotiations start, descriptors are quested by the host. The device must be able to respond to
these requests. Typically, this routine consists of a switch statement depending on the descriptor_type
parameter. The descriptor_num is used to specify which of the descriptor_type descriptors are
required, since they may be several (for example, string descriptors).
Since descriptors are specific to a particular device (and project), this callback routine and the
associated descriptors are put in a file called usb_config_xxxx.c and placed in the project workspace.
This is because while the descriptors could have been provided as part of the PicPack library, you will
almost always want to change them to suit your application, even if only for changing the vendor and
device IDs and serial numbers.
At present, descriptors are required to be in RAM.
Since descriptor requests are an essential part of the USB protocol, this callback routine is mandatory.
Referenced by usb_handle_standard_request().
Here is the caller graph for this function:
usb_state_type usb_get_state ()
Returns the USB state, either powered, default, address or connect. This is updated as the negotiation
progresses. It may be useful to query this if, after a suitable time-out, the connection has not been
made.
Definition at line 1039 of file pic_usb.c.
535
References usb_state.
void usb_handle_class_ctrl_read_callback ()
When a control transfer is taking place, this routine is called to indicate that a control read for the
class has taken place. Since everything in USB land is all about what has just happened, this callback
will occur after data has been transferred to the host. If you wish to send more data to the host, use
usb_send_data(), or if your control read has sent all the data required, you will need to indicate that
the state has changed by setting the control_mode variable to
cm_CTRL_READ_AWAITING_STATUS. This will indicate to the stack that it should now wait for
the status packet before completing the control transfer.
To allow this callback to trigger, ensure you define USB_CALLBACK_ON_CLASS_CTRL in your
config.h
Definition at line 268 of file usb_cdc_class.c.
References setup_data_packet::bRequest, cm_CTRL_READ_AWAITING_STATUS, control_mode,
req_GET_LINE_CODING, serial_print_int(), serial_print_str(), and usb_sdp.
Referenced by usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_handle_class_ctrl_write_callback (uns8 * data, uns16 count)
When a control transfer is taking place, this routine is called to indicate that a control write for the
class has taken place. Since everything in USB land is all about what has just happened, this callback
will occur after data has been received by the device. If you expect more data from the host, it will
arrive in due course since endpoint 0 will be primed for more data automatically. If you have received
all the data from the host, you will need to set the control_mode state variable to
cm_CTRL_WRITE_SENDING_STATUS and then actually send the status by calling
usb_send_status_ack(). Once the status has actually been sent, the control_mode state will
automatically change to cm_IDLE to indicate the transfer has completed.
To allow this callback to trigger, ensure you define USB_CALLBACK_ON_CLASS_CTRL in your
config.h
Definition at line 168 of file usb_cdc_class.c.
References long_union::as_byte_array, long_union::as_long, setup_data_packet::bRequest, class_data,
cm_CTRL_WRITE_SENDING_STATUS, control_mode, current_bit_rate, line_coding::data_bits,
line_coding::dte_rate, line_coding::parity, platform_leds_flash(), req_SET_LINE_CODING, serial_print_int(),
serial_print_int_hex(), serial_print_str(), serial_putc(), serial_setup(), serial_tx_empty(), serial_tx_isr(),
line_coding::stop_bits, usb_sdp, and usb_send_status_ack.
Referenced by usb_handle_transaction().
Here is the call graph for this function:
536
Here is the caller graph for this function:
void usb_handle_class_request_callback (setup_data_packet sdp)
After receiving a setup packet, where the request is placed on the class, this routine is called. In
usb_handle_class_request_callback, you can set up ready for the data stage of the control transfer.
The direction of the data stage can be determined by examining test_bit(sdp.bRequest,
DATA_STAGE_DIR) although generally it appears to be obvious from the request. The request is
stored in sdp.bRequest.
Typically, if it is a control read transfer (that is, it is a request by the host for data), then you will need
to move the control_mode state variable to cm_CTRL_READ_DATA_STAGE_CLASS and send
data using usb_send_data(). If you only intend to send one packet, you can immediately move the
control_mode state variable to cm_CTRL_READ_AWAITING_STATUS to indicate you are waiting
for the status to arrive. You could wait for the usb_handle_class_ctrl_read callback and do it (move to
cm_CTROL_READ_AWAITING_STATUS) but the PicPack USB stack can handle the control read
event for you if you've already switched states.
If it is a control write transfer (that is, it is a request by the host to send data to the device), then you
will need to move the control_mode state variable to cm_CTRL_WRITE_DATA_STAGE_CLASS.
Then, the usb_handle_class_ctrl_write will be fired when data is received by the device in the data
stage.
537
To allow this callback to trigger, ensure you define USB_CALLBACK_ON_CLASS_CTRL in your
config.h
Definition at line 112 of file usb_cdc_class.c.
References long_union::as_byte_array, setup_data_packet::bRequest,
cm_CTRL_READ_AWAITING_STATUS, cm_CTRL_READ_DATA_STAGE_CLASS,
cm_CTRL_WRITE_DATA_STAGE_CLASS, cm_CTRL_WRITE_SENDING_STATUS, control_mode,
line_coding::data_bits, line_coding::dte_rate, line_coding::parity, req_GET_IDLE, req_GET_LINE_CODING,
req_GET_PROTOCOL, req_GET_REPORT, req_SET_CONTROL_LINE_STATE, req_SET_IDLE,
req_SET_LINE_CODING, req_SET_PROTOCOL, req_SET_REPORT, serial_print_int(),
serial_print_int_hex(), serial_print_str(), serial_putc(), line_coding::stop_bits, uns8, usb_send_data(),
usb_send_status_ack, usb_stall_ep0(), setup_data_packet::wLength, and setup_data_packet::wValue.
Referenced by usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_handle_isr ()
usb_handle_isr() should be inserted in your interrupt service routine. Alternatively, if you have reason
not to want to do interrupt-driven USB, for example, a bootloader, you can poll this routine.
Make sure you call turn_usb_ints() and turn_global_ints_on() to ensure interrupts occur.
It will check for any of the USB interrupt flags and handle: USB transactions, USB reset, USB stall,
USB Start Of Frame (including calling usb_SOF_callback() if configured in your config.h and most
importantly USB transaction, which is where all the hard work is done.
Definition at line 928 of file pic_usb.c.
References uns8, usb_handle_reset(), usb_handle_stall(), usb_handle_transaction(), and usb_SOF_callback().
Here is the call graph for this function:
538
void usb_send_data (uns8 ep, uns8 * data, uns8 send_count, bit first)
Use this routine to send data across the USB pipe.
Parameters:
ep Endpoint that the data should be sent from
data pointer to the data
send_count the number of bytes to send
first True if this is the first in a series of sends. Generally, this can be set to False, since it will automatically
be set to the right value on endpoint creation. However, in the case of control transfers, the data stage needs
to have the first parameter set to True to ensure the DTS bit is set correctly.
Definition at line 211 of file pic_usb.c.
539
References buffer_descriptor::addr, BC8, BC9, BSTALL, buffer_descriptor::count, DTS, DTSEN,
ep_in_bd_location, ep_in_buffer_location, INCDIS, KEN, serial_print_int(), serial_print_str(), serial_putc(),
buffer_descriptor::stat, uns16, uns8, and UOWN.
Referenced by usb_handle_class_request_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_send_empty_data_pkt ()
Use this routine to send an data across the USB pipe on endpoint 0. This is the equivalent of sending
a status acknowledge.
Definition at line 341 of file pic_usb.c.
References bd0in, buffer_0_in, delivery_buffer, delivery_buffer_size, delivery_bytes_max_send,
delivery_bytes_sent, delivery_bytes_to_send, delivery_ptr, DTS, buffer_descriptor::stat, uns8, and
usb_send_data_chunk().
Here is the call graph for this function:
void usb_setup ()
usb_setup() configures the PIC USB hardware ready for use and prepares the internal data structures
used to keep track of where the endpoint buffers are.
After calling usb_setup(), you are ready to call usb_enable_module() to actually start USB
negotiations. Ensure that you have usb_handle_isr() in your interrupt service routine.
Definition at line 973 of file pic_usb.c.
References bd0in, bd0out_e, bd1in, bd1out, bd2in, bd2out, bd3in, bd3out, bd4in, bd4out, ep_in_bd_location,
ep_out_bd_location, st_POWERED, and usb_state.
void usb_SOF_callback (uns16 frame)
Frames in USB occur each 1ms. A SOF packet is sent to each device at the start of each frame. This is
a really neat way of getting a 1ms timer without any further work.
540
Parameters:
frame The frame number. Frames will wrap at 65535.
Definition at line 478 of file usb_cdc_class.c.
References usb_cdc_handle_tx().
Referenced by usb_handle_isr().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_stall_ep0 ()
Use this routine to send a stall on the control transfer endpoint - usually used to indicate that the
requested function is not available.
Definition at line 203 of file pic_usb.c.
References bd0in, BSTALL, buffer_descriptor::stat, and UOWN.
Referenced by usb_handle_class_request_callback(), and usb_handle_standard_request().
Here is the caller graph for this function:
Variable Documentation
control_mode_type control_mode
Store the control mode state
Definition at line 55 of file pic_usb.c.
Referenced by usb_handle_class_ctrl_read_callback(), usb_handle_class_ctrl_write_callback(),
usb_handle_class_request_callback(), usb_handle_reset(), usb_handle_standard_request(),
usb_handle_transaction(), and usb_send_data_chunk().
541
uns8 usb_address
Store the usb address
Definition at line 54 of file pic_usb.c.
Referenced by usb_handle_reset(), usb_handle_standard_request(), and usb_handle_transaction().
setup_data_packet usb_sdp
Store the last setup data packet
Definition at line 52 of file pic_usb.c.
Referenced by usb_handle_class_ctrl_read_callback(), and usb_handle_class_ctrl_write_callback().
usb_state_type usb_state
Store the current USB device state
Definition at line 50 of file pic_usb.c.
Referenced by usb_enable_module(), usb_get_state(), usb_handle_standard_request(),
usb_handle_transaction(), and usb_setup().
pic_usb_buffer_mgt.c File Reference #include "pic_usb_buffer_mgt.h" Include dependency graph for pic_usb_buffer_mgt.c:
Variables
buffer_descriptor bd0in
542
buffer_descriptor bd0out_e
buffer_descriptor bd0out_o
buffer_descriptor bd1in
buffer_descriptor bd1out
buffer_descriptor bd2in
buffer_descriptor bd2out
buffer_descriptor bd3in
buffer_descriptor bd3out
buffer_descriptor bd4in
buffer_descriptor bd4out
buffer_descriptor bd5in
buffer_descriptor bd5out
buffer_descriptor bd6in
buffer_descriptor bd6out
buffer_descriptor bd7in
buffer_descriptor bd7out
buffer_descriptor * ep_in_bd_location [USB_HIGHEST_EP+1]
uns8 * ep_in_buffer_location [USB_HIGHEST_EP+1]
uns16 ep_in_buffer_size [USB_HIGHEST_EP+1]
buffer_descriptor * ep_out_bd_location [USB_HIGHEST_EP+1]
uns8 * ep_out_buffer_location [USB_HIGHEST_EP+1]
uns16 ep_out_buffer_size [USB_HIGHEST_EP+1]
uns8 buffer_0_in[USB_EP0_IN_SIZE] USB_EP0_IN_ADDR
uns8 buffer_0_out_e[USB_EP0_OUT_E_SIZE] USB_EP0_OUT_E_ADDR
uns8 buffer_0_out_o[USB_EP0_OUT_O_SIZE] USB_EP0_OUT_O_ADDR
Variable Documentation
buffer_descriptor bd0in
Definition at line 42 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_reset(), usb_handle_stall(), usb_handle_standard_request(),
usb_handle_transaction(), usb_send_data_chunk(), usb_send_empty_data_pkt(), usb_send_one_byte(),
usb_setup(), usb_stall_ep0(), and usb_stall_on_in().
buffer_descriptor bd0out_e
Definition at line 40 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_reset(), usb_handle_transaction(), usb_prime_ep0_out_e(), and usb_setup().
buffer_descriptor bd0out_o
Definition at line 41 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_reset(), usb_handle_transaction(), and usb_prime_ep0_out_o().
buffer_descriptor bd1in
543
Definition at line 44 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd1out
Definition at line 43 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd2in
Definition at line 46 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd2out
Definition at line 45 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd3in
Definition at line 48 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd3out
Definition at line 47 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd4in
Definition at line 50 of file pic_usb_buffer_mgt.c.
Referenced by usb_setup().
buffer_descriptor bd4out
Definition at line 49 of file pic_usb_buffer_mgt.c.
Referenced by usb_setup().
buffer_descriptor bd5in
Definition at line 52 of file pic_usb_buffer_mgt.c.
544
buffer_descriptor bd5out
Definition at line 51 of file pic_usb_buffer_mgt.c.
buffer_descriptor bd6in
Definition at line 54 of file pic_usb_buffer_mgt.c.
buffer_descriptor bd6out
Definition at line 53 of file pic_usb_buffer_mgt.c.
buffer_descriptor bd7in
Definition at line 56 of file pic_usb_buffer_mgt.c.
buffer_descriptor bd7out
Definition at line 55 of file pic_usb_buffer_mgt.c.
buffer_descriptor* ep_in_bd_location[USB_HIGHEST_EP+1]
Definition at line 101 of file pic_usb_buffer_mgt.c.
Referenced by usb_cdc_handle_tx(), usb_handle_transaction(), usb_send_data(), and usb_setup().
uns8* ep_in_buffer_location[USB_HIGHEST_EP+1]
Definition at line 104 of file pic_usb_buffer_mgt.c.
Referenced by usb_cdc_handle_tx(), and usb_send_data().
uns16 ep_in_buffer_size[USB_HIGHEST_EP+1]
Definition at line 181 of file pic_usb_buffer_mgt.c.
Referenced by usb_cdc_handle_tx().
buffer_descriptor* ep_out_bd_location[USB_HIGHEST_EP+1]
Definition at line 102 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_transaction(), and usb_setup().
uns8* ep_out_buffer_location[USB_HIGHEST_EP+1]
Definition at line 142 of file pic_usb_buffer_mgt.c.
545
Referenced by usb_handle_transaction().
uns16 ep_out_buffer_size[USB_HIGHEST_EP+1]
Definition at line 219 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_transaction().
uns8 buffer_0_in [USB_EP0_IN_SIZE] USB_EP0_IN_ADDR
Definition at line 80 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_reset(), and usb_handle_standard_request().
uns8 buffer_0_out_e [USB_EP0_OUT_E_SIZE] USB_EP0_OUT_E_ADDR
Definition at line 77 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_reset(), and usb_prime_ep0_out_e().
uns8 buffer_0_out_o [USB_EP0_OUT_O_SIZE] USB_EP0_OUT_O_ADDR
Definition at line 78 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_reset(), and usb_prime_ep0_out_o().
pic_usb_buffer_mgt.h File Reference
Pic USB buffer routines. #include "pic_usb.h" #include "config.h" Include dependency graph for pic_usb_buffer_mgt.h:
546
This graph shows which files directly or indirectly include this file:
Defines
#define __pic_ubs_buffer_mgt_h
Variables
buffer_descriptor bd0in
buffer_descriptor bd0out_e
buffer_descriptor bd0out_o
buffer_descriptor bd1in
buffer_descriptor bd1out
buffer_descriptor bd2in
buffer_descriptor bd2out
buffer_descriptor bd3in
buffer_descriptor bd3out
buffer_descriptor bd4in
buffer_descriptor bd4out
buffer_descriptor bd5in
buffer_descriptor bd5out
buffer_descriptor bd6in
buffer_descriptor bd6out
buffer_descriptor bd7in
buffer_descriptor bd7out
uns8 buffer_0_in [USB_EP0_IN_SIZE]
uns8 buffer_0_out_e [USB_EP0_OUT_E_SIZE]
547
uns8 buffer_0_out_o [USB_EP0_OUT_O_SIZE]
buffer_descriptor * ep_in_bd_location [USB_HIGHEST_EP+1]
uns8 * ep_in_buffer_location [USB_HIGHEST_EP+1]
uns16 ep_in_buffer_size [USB_HIGHEST_EP+1]
buffer_descriptor * ep_out_bd_location [USB_HIGHEST_EP+1]
uns8 * ep_out_buffer_location [USB_HIGHEST_EP+1]
uns16 ep_out_buffer_size [USB_HIGHEST_EP+1]
Detailed Description
Buffer data structures for USB transfers
Definition in file pic_usb_buffer_mgt.h.
Define Documentation
#define __pic_ubs_buffer_mgt_h
Definition at line 46 of file pic_usb_buffer_mgt.h.
Variable Documentation
buffer_descriptor bd0in
Definition at line 42 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_reset(), usb_handle_stall(), usb_handle_standard_request(),
usb_handle_transaction(), usb_send_data_chunk(), usb_send_empty_data_pkt(), usb_send_one_byte(),
usb_setup(), usb_stall_ep0(), and usb_stall_on_in().
buffer_descriptor bd0out_e
Definition at line 40 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_reset(), usb_handle_transaction(), usb_prime_ep0_out_e(), and usb_setup().
buffer_descriptor bd0out_o
Definition at line 41 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_reset(), usb_handle_transaction(), and usb_prime_ep0_out_o().
buffer_descriptor bd1in
Definition at line 44 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
548
buffer_descriptor bd1out
Definition at line 43 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd2in
Definition at line 46 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd2out
Definition at line 45 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd3in
Definition at line 48 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd3out
Definition at line 47 of file pic_usb_buffer_mgt.c.
Referenced by usb_configure_endpoints(), and usb_setup().
buffer_descriptor bd4in
Definition at line 50 of file pic_usb_buffer_mgt.c.
Referenced by usb_setup().
buffer_descriptor bd4out
Definition at line 49 of file pic_usb_buffer_mgt.c.
Referenced by usb_setup().
buffer_descriptor bd5in
Definition at line 52 of file pic_usb_buffer_mgt.c.
buffer_descriptor bd5out
Definition at line 51 of file pic_usb_buffer_mgt.c.
549
buffer_descriptor bd6in
Definition at line 54 of file pic_usb_buffer_mgt.c.
buffer_descriptor bd6out
Definition at line 53 of file pic_usb_buffer_mgt.c.
buffer_descriptor bd7in
Definition at line 56 of file pic_usb_buffer_mgt.c.
buffer_descriptor bd7out
Definition at line 55 of file pic_usb_buffer_mgt.c.
uns8 buffer_0_in[USB_EP0_IN_SIZE]
Referenced by usb_handle_transaction(), usb_send_data_chunk(), usb_send_empty_data_pkt(), and
usb_send_one_byte().
uns8 buffer_0_out_e[USB_EP0_OUT_E_SIZE]
Referenced by usb_handle_transaction().
uns8 buffer_0_out_o[USB_EP0_OUT_O_SIZE]
Referenced by usb_handle_transaction().
buffer_descriptor* ep_in_bd_location[USB_HIGHEST_EP+1]
Definition at line 101 of file pic_usb_buffer_mgt.c.
Referenced by usb_cdc_handle_tx(), usb_handle_transaction(), usb_send_data(), and usb_setup().
uns8* ep_in_buffer_location[USB_HIGHEST_EP+1]
Definition at line 104 of file pic_usb_buffer_mgt.c.
Referenced by usb_cdc_handle_tx(), and usb_send_data().
uns16 ep_in_buffer_size[USB_HIGHEST_EP+1]
Definition at line 181 of file pic_usb_buffer_mgt.c.
Referenced by usb_cdc_handle_tx().
550
buffer_descriptor* ep_out_bd_location[USB_HIGHEST_EP+1]
Definition at line 102 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_transaction(), and usb_setup().
uns8* ep_out_buffer_location[USB_HIGHEST_EP+1]
Definition at line 142 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_transaction().
uns16 ep_out_buffer_size[USB_HIGHEST_EP+1]
Definition at line 219 of file pic_usb_buffer_mgt.c.
Referenced by usb_handle_transaction().
pic_utils.c File Reference #include "pic_utils.h" Include dependency graph for pic_utils.c:
pic_utils.h File Reference
Generic PIC helper routines. #include <system.h> #include "config.h" Include dependency graph for pic_utils.h:
551
Defines
#define change_pin(port, pin, value)
#define change_pin_var(port, pin, value) change_pin(port, pin, value)
#define clear_pin(port, pin) clear_bit(port_array[port - PORTA], pin);
#define clear_pin_var(port, pin) clear_pin(port, pin)
#define end_crit_sec() intcon.GIE = store_gie
#define int16 int
#define int32 long
#define int8 char
#define kill_interrupts()
#define MAGIC_BOOSTBLOADER_REQUEST 4
#define make_input(port, pin) set_bit(tris_array[port - PORTA], pin)
#define make_output(port, pin) clear_bit(tris_array[port - PORTA], pin)
#define NUMBER_PORTS 1
#define set_pin(port, pin) set_bit(port_array[port - PORTA], pin);
#define set_pin_var(port, pin) set_pin(port, pin)
#define start_crit_sec()
#define test_output_pin(port, pin) ((port_array[port - PORTA] & (1 << pin)) != 0)
#define test_pin(port, pin) ((port_in_array[port - PORTA] & (1 << pin)) != 0)
#define test_pin_var(port, pin) test_pin(port, pin)
#define toggle_pin(port, pin) port_array[port - PORTA] ^= (1 << (pin));
#define toggle_pin_var(port, pin) toggle_pin(port, pin)
#define turn_global_ints_off() clear_bit(intcon, GIE)
#define turn_global_ints_on() set_bit(intcon, GIE)
#define turn_peripheral_ints_off() clear_bit(intcon, PEIE)
#define turn_peripheral_ints_on() set_bit(intcon, PEIE)
#define uns16 unsigned int
#define uns32 unsigned long
#define uns8 unsigned char
Detailed Description
Defines datatypes, port/pin access helpers
Definition in file pic_utils.h.
Define Documentation
#define change_pin(port, pin, value)
Value:if (value) { \
set_pin(port, pin); \
552
} else { \
clear_pin(port, pin); \
}
Definition at line 251 of file pic_utils.h.
Referenced by i2c_send_byte(), lcd_write_nibble(), ms5540_get_config(), ms5540_reset(),
pcd8544_send_byte(), pic_rf_send_byte(), pic_rf_send_byte_int(), pic_rf_set_mode(), sht15_send_byte(),
spi_pulse_0(), spi_pulse_1(), spi_write(), spi_write_lsb(), and spi_write_sure().
#define change_pin_var(port, pin, value) change_pin(port, pin, value)
Definition at line 265 of file pic_utils.h.
Referenced by cat4016_write_data(), ht1632_write(), and sure_2416_write().
#define clear_pin(port, pin) clear_bit(port_array[port - PORTA], pin);
Definition at line 238 of file pic_utils.h.
Referenced by cat4016_enable_display(), cat4016_latch_data(), cat4016_setup_io(), cat4016_write_data(),
drv_paint(), drv_refresh(), ea_ldp6416_setup_io(), ea_ldp6432_setup_io(), ea_ldp8008_setup_io(),
ht1632_fill2(), ht1632_send_command(), ht1632_set_pixel(), ht1632_write(), i2c_read_eeprom(),
i2c_read_eeprom_16bit(), i2c_receive_byte(), i2c_send_ack(), i2c_send_byte(), i2c_start(), i2c_stop(),
lcd_setup(), lcd_toggle_e(), lcd_wait_busy(), lcd_write_command(), lcd_write_data(), lcd_write_data_str(),
mrf24j40_long_addr_read(), mrf24j40_long_addr_write(), mrf24j40_short_addr_read(),
mrf24j40_short_addr_write(), ms5540_get_raw_pressure(), ms5540_get_raw_temp(), ms5540_pulse_sclk(),
ms5540_send_stop(), ms5540_setup_io(), pcd8544_init(), pcd8544_send_byte(), pcd8544_send_command(),
pcd8544_send_data(), pcd8544_setup_io(), pic_rf_init(), pic_rf_quick_init(), pic_rf_read_register(),
pic_rf_read_register_inline(), pic_rf_read_register_int(), pic_rf_receive(), pic_rf_send_byte(),
pic_rf_send_byte_int(), pic_rf_send_command(), pic_rf_send_command_inline(),
pic_rf_send_command_single(), pic_rf_set_channel(), pic_rf_set_mode(), pic_rf_setup(), pic_rf_transmit(),
platform_leds_setup_io(), pwm_handle(), sht15_read_byte16(), sht15_send_byte(), sht15_setup_io(),
sht15_start(), somo_14d_reset(), somo_14d_send_data(), somo_14d_standby(), spi_pulse_0(), spi_pulse_1(),
spi_write(), spi_write_lsb(), spi_write_sure(), sure_2416_fill2(), sure_2416_send_command(),
sure_2416_set_pixel(), sure_2416_write(), and sure_7seg_write_str().
#define clear_pin_var(port, pin) clear_pin(port, pin)
Definition at line 260 of file pic_utils.h.
#define end_crit_sec() intcon.GIE = store_gie
Definition at line 300 of file pic_utils.h.
Referenced by audio_queue_clear(), drv_paint(), pic_rf_init(), pic_rf_set_channel(), pic_rf_set_mode(),
pic_rf_transmit(), pkt_process_rf_data(), serial_getc(), tick_get_count(), usb_cdc_getc(), usb_cdc_handle_tx(),
and usb_cdc_putc().
#define int16 int
Definition at line 82 of file pic_utils.h.
Referenced by ms5540_calc_temp_and_pressure(), and sht15_fix_temperature_h().
553
#define int32 long
Definition at line 84 of file pic_utils.h.
Referenced by ms5540_calc_temp_and_pressure(), and sht15_fix_humidity_r().
#define int8 char
Definition at line 79 of file pic_utils.h.
#define kill_interrupts()
Value:clear_bit(intcon, GIE); \
nop(); \
nop(); \
nop(); \
nop()
Definition at line 288 of file pic_utils.h.
Referenced by pic_rf_receive(), pic_rf_set_channel(), pic_rf_set_mode(), pic_rf_transmit(), and serial_putc().
#define MAGIC_BOOSTBLOADER_REQUEST 4
Definition at line 375 of file pic_utils.h.
Referenced by term_process().
#define make_input(port, pin) set_bit(tris_array[port - PORTA], pin)
Definition at line 279 of file pic_utils.h.
Referenced by ht1632_set_pixel(), i2c_setup_io(), mrf24j40_setup_io(), ms5540_setup_io(), pic_rf_receive(),
pic_rf_setup(), somo_14d_setup_io(), spi_hw_setup_io(), and sure_2416_set_pixel().
#define make_output(port, pin) clear_bit(tris_array[port - PORTA], pin)
Definition at line 278 of file pic_utils.h.
Referenced by cat4016_setup_io(), ea_ldp6416_setup_io(), ea_ldp6432_setup_io(), ea_ldp8008_setup_io(),
ht1632_set_pixel(), ht1632_setup_io(), i2c_setup_io(), lcd_setup(), mrf24j40_setup_io(), ms5540_setup_io(),
pcd8544_setup_io(), pic_rf_init(), pic_rf_quick_init(), pic_rf_set_mode(), pic_rf_setup(), pic_rf_transmit(),
platform_leds_setup_io(), pwm_setup_io(), sht15_setup_io(), somo_14d_setup_io(), spi_hw_setup_io(),
sure_2416_set_pixel(), and sure_2416_setup().
#define NUMBER_PORTS 1
Definition at line 51 of file pic_utils.h.
#define set_pin(port, pin) set_bit(port_array[port - PORTA], pin);
Definition at line 235 of file pic_utils.h.
Referenced by cat4016_enable_display(), cat4016_latch_data(), cat4016_setup_io(), cat4016_write_data(),
drv_paint(), drv_refresh(), ea_ldp6416_setup_io(), ea_ldp6432_setup_io(), ht1632_fill2(),
554
ht1632_send_command(), ht1632_set_pixel(), ht1632_setup_io(), ht1632_write(), i2c_read_eeprom(),
i2c_read_eeprom_16bit(), i2c_receive_byte(), i2c_send_ack(), i2c_send_byte(), i2c_start(), i2c_stop(),
lcd_toggle_e(), lcd_wait_busy(), lcd_write_data(), lcd_write_data_str(), mrf24j40_long_addr_read(),
mrf24j40_long_addr_write(), mrf24j40_setup_io(), mrf24j40_short_addr_read(), mrf24j40_short_addr_write(),
ms5540_get_raw_pressure(), ms5540_get_raw_temp(), ms5540_pulse_sclk(), ms5540_send_start(),
pcd8544_init(), pcd8544_send_byte(), pcd8544_send_command(), pcd8544_send_data(), pcd8544_setup_io(),
pic_rf_init(), pic_rf_read_register(), pic_rf_read_register_inline(), pic_rf_read_register_int(), pic_rf_receive(),
pic_rf_send_byte(), pic_rf_send_byte_int(), pic_rf_send_command(), pic_rf_send_command_inline(),
pic_rf_send_command_single(), pic_rf_set_channel(), pic_rf_set_mode(), pic_rf_setup(), pic_rf_transmit(),
pwm_handle(), sht15_read_byte16(), sht15_send_byte(), sht15_start(), somo_14d_reset(),
somo_14d_send_data(), somo_14d_setup_io(), somo_14d_wake(), spi_pulse_0(), spi_pulse_1(), spi_write(),
spi_write_lsb(), spi_write_sure(), sure_2416_fill2(), sure_2416_send_command(), sure_2416_set_pixel(),
sure_2416_setup(), sure_2416_write(), and sure_7seg_write_str().
#define set_pin_var(port, pin) set_pin(port, pin)
Definition at line 258 of file pic_utils.h.
#define start_crit_sec()
Value:bit store_gie = intcon.GIE; \
kill_interrupts()
Definition at line 295 of file pic_utils.h.
Referenced by audio_queue_clear(), drv_paint(), pic_rf_init(), pic_rf_set_channel(), pic_rf_set_mode(),
pic_rf_transmit(), pkt_process_rf_data(), serial_getc(), tick_get_count(), usb_cdc_getc(), usb_cdc_handle_tx(),
and usb_cdc_putc().
#define test_output_pin(port, pin) ((port_array[port - PORTA] & (1 << pin)) != 0)
Definition at line 248 of file pic_utils.h.
#define test_pin(port, pin) ((port_in_array[port - PORTA] & (1 << pin)) != 0)
Definition at line 245 of file pic_utils.h.
Referenced by ht1632_set_pixel(), i2c_ack_polling(), i2c_receive_byte(), lcd_wait_busy(),
ms5540_get_config(), ms5540_get_raw_pressure(), ms5540_get_raw_temp(), pic_rf_receive(),
pic_rf_send_byte(), pic_rf_send_byte_int(), sht15_read_byte16(), sht15_send_byte(), somo_14d_is_busy(), and
sure_2416_set_pixel().
#define test_pin_var(port, pin) test_pin(port, pin)
Definition at line 264 of file pic_utils.h.
#define toggle_pin(port, pin) port_array[port - PORTA] ^= (1 << (pin));
Definition at line 241 of file pic_utils.h.
#define toggle_pin_var(port, pin) toggle_pin(port, pin)
555
Definition at line 262 of file pic_utils.h.
#define turn_global_ints_off() clear_bit(intcon, GIE)
Definition at line 285 of file pic_utils.h.
#define turn_global_ints_on() set_bit(intcon, GIE)
Definition at line 284 of file pic_utils.h.
#define turn_peripheral_ints_off() clear_bit(intcon, PEIE)
Definition at line 282 of file pic_utils.h.
#define turn_peripheral_ints_on() set_bit(intcon, PEIE)
Definition at line 281 of file pic_utils.h.
#define uns16 unsigned int
Definition at line 81 of file pic_utils.h.
Referenced by ar1000_seek(), ar1000_seek_more(), ar1000_set_volume(), ar1000_test(), ar1000_tune(),
draw_length_str(), draw_print_buffer(), draw_print_str(), draw_rect(), draw_set_pixel(), drv_paint(),
hmc6352_get_data(), ht1632_fill2(), i2c_read_eeprom_16bit(), its1_device_process(), its2_device_process(),
its2_process_tx_queue(), its2_router_process(), its_transmit_to_sa(), mrf24j40_active_channel_scan(),
mrf24j40_receive(), mrf24j40_scan_for_lowest_channel_ed(), ms5540_get_config(),
ms5540_get_raw_pressure(), ms5540_get_raw_temp(), ms5540_init(), ms5540_reset(), pkt_init(),
pkt_process_rf_data(), pkt_process_tx_queue(), platform_leds_process(), sht15_fix_humidity_l(), sht15_read(),
sht15_read_byte16(), sht15_read_humidity(), sht15_read_temperature(), sure_2416_fill2(), tick_get_count(),
timer_handle_1_isr(), tmp75_read_16bit(), usb_cdc_handle_tx(), usb_handle_transaction(), usb_send_data(),
usb_send_data_chunk(), and wpan_data_received_callback().
#define uns32 unsigned long
Definition at line 83 of file pic_utils.h.
#define uns8 unsigned char
Definition at line 80 of file pic_utils.h.
Referenced by ar1000_init(), ar1000_set_volume(), ar1000_write_registers(), audio_queue_add(),
audio_queue_process(), cat4016_write_data(), draw_bitmap(), draw_clear_screen(), draw_length_str(),
draw_print_buffer(), draw_print_str(), draw_set_pixel(), draw_tests_run(), drv_paint(), drv_print_buffer(),
drv_refresh(), hc4led_write_str(), hmc6352_read_eeprom(), hmc6352_read_ram(), hmc6352_set_mode(),
ht1632_fill(), ht1632_send_command(), ht1632_set_pixel(), ht1632_write(), i2c_read_eeprom(),
i2c_receive_byte(), i2c_send_byte(), its1_controller_init(), its1_device_init(), its1_device_process(),
its2_find_free_queue_slot(), its2_forward_routed_packet(), its2_print_packet(), its2_print_queue(),
its2_process_tx_queue(), its2_rebroadcast_net_discover_req(), its2_router_init(), its2_router_queue_packet(),
556
its2_transmit(), its_add_local_device(), its_add_net_device(), its_get_device_handle(), its_init(),
its_print_devices(), its_transmit_to_ea(), its_transmit_to_sa(), mrf24j40_active_channel_scan(),
mrf24j40_flush_receive_buffer(), mrf24j40_handle_isr(), mrf24j40_init(), mrf24j40_init_coordinator(),
mrf24j40_long_addr_read(), mrf24j40_receive(), mrf24j40_scan_for_lowest_channel_ed(),
mrf24j40_set_extended_address(), mrf24j40_short_addr_read(), mrf24j40_transmit(),
mrf24j40_transmit_to_extended_address(), mrf24j40_transmit_to_short_address(), ms5540_get_config(),
ms5540_get_raw_pressure(), ms5540_get_raw_temp(), ms5540_reset(), pcd8544_send_byte(), pic_rf_init(),
pic_rf_quick_init(), pic_rf_read_register(), pic_rf_read_register_inline(), pic_rf_read_register_int(),
pic_rf_receive(), pic_rf_send_byte(), pic_rf_send_byte_int(), pic_rf_send_bytes(), pic_rf_send_bytes_inline(),
pic_rf_send_command(), pic_rf_send_command_inline(), pic_rf_send_command_single(), pic_rf_set_mode(),
pic_rf_transmit(), pkt_calc_check_byte(), pkt_check_check_byte(), pkt_init(), pkt_print_packet(),
pkt_process_rf_data(), pkt_process_tx_queue(), pkt_queue_packet(), pkt_seen(), pkt_send_packet(),
pkt_send_payload(), pwm_handle(), serial_getc(), serial_print_int(), serial_print_str(), serial_putc(),
serial_rx_isr(), serial_tx_isr(), sht15_read_byte16(), sht15_send_byte(), somo_14d_send_data(), spi_write(),
spi_write_lsb(), spi_write_sure(), sure_2416_fill(), sure_2416_send_command(), sure_2416_set_pixel(),
sure_2416_write(), sure_7seg_write_str(), term_process(), tmp75_read(), usb_cdc_getc(), usb_cdc_handle_tx(),
usb_cdc_print_int(), usb_cdc_print_str(), usb_cdc_putc(), usb_ep_data_out_callback(),
usb_handle_class_request_callback(), usb_handle_isr(), usb_handle_standard_request(),
usb_handle_transaction(), usb_send_data(), usb_send_data_chunk(), usb_send_empty_data_pkt(),
usb_send_one_byte(), wpan_data_received_callback(), wpan_handle_receive(), wpan_print_address(), and
wpan_print_mac_command().
platform.h File Reference
Platform definitions. This graph shows which files directly or indirectly include this file:
Defines
#define EA_LED_PANEL_DRIVER 7
#define EA_PLT1001 7
#define EA_PLT1002 8
#define EA_PLT1003 10
#define EA_PLT_1001 7
#define EA_PLT_1002 8
#define EA_PLT_1003 10
#define EA_USB2SERIAL 10
557
#define EA_WEATHER_STATION 9
#define EA_WIRELESS_TEMP_SENSOR 8
#define OLIMEX_BOARD 2
#define OLIMEX_PIC_LCD3310 5
#define SCHMARTBOARD 6
#define SFE_TDN_V1 3
#define SURE_PICDEM_2 1
#define TECH_TOYS_PIC18F4550 4
Detailed Description
Definition in file platform.h.
Define Documentation
#define EA_LED_PANEL_DRIVER 7
EA Clock board
Definition at line 58 of file platform.h.
#define EA_PLT1001 7
Definition at line 59 of file platform.h.
#define EA_PLT1002 8
Definition at line 63 of file platform.h.
#define EA_PLT1003 10
Definition at line 69 of file platform.h.
#define EA_PLT_1001 7
Definition at line 60 of file platform.h.
#define EA_PLT_1002 8
Definition at line 64 of file platform.h.
#define EA_PLT_1003 10
Definition at line 70 of file platform.h.
558
#define EA_USB2SERIAL 10
EA USB2TTL board
Definition at line 68 of file platform.h.
#define EA_WEATHER_STATION 9
EA weather station
Definition at line 66 of file platform.h.
#define EA_WIRELESS_TEMP_SENSOR 8
EA wireless temp sensor board
Definition at line 62 of file platform.h.
#define OLIMEX_BOARD 2
Standard Olimex board
Definition at line 48 of file platform.h.
#define OLIMEX_PIC_LCD3310 5
Olimex PIC LCD with Nokia 3310 LCD dispaly
Definition at line 54 of file platform.h.
#define SCHMARTBOARD 6
Schmartboard
Definition at line 56 of file platform.h.
#define SFE_TDN_V1 3
SparkFun RF Terminal Development Node
Definition at line 50 of file platform.h.
#define SURE_PICDEM_2 1
Sure Electronics PicDem 2 demo board
Definition at line 46 of file platform.h.
#define TECH_TOYS_PIC18F4550 4
Tech Toys HK Pic 18f4550 Eval Dev 4a
Definition at line 52 of file platform.h.
platform_leds.c File Reference #include "config.h" #include "platform_leds.h" #include "platform.h"
559
#include "pic_tick.h" Include dependency graph for platform_leds.c:
Defines
#define PLATFORM_LEDS_FLASH_TICKS 250
Functions
void platform_leds_flash (uns8 led)
void platform_leds_flashing (uns8 led, uns8 enable)
void platform_leds_process ()
void platform_leds_setup_io ()
Define Documentation
#define PLATFORM_LEDS_FLASH_TICKS 250
Definition at line 43 of file platform_leds.c.
Referenced by platform_leds_process().
Function Documentation
void platform_leds_flash (uns8 led)
Definition at line 81 of file platform_leds.c.
References tick_get_count().
Referenced by usb_cdc_handle_tx(), usb_ep_data_out_callback(), and usb_handle_class_ctrl_write_callback().
Here is the call graph for this function:
560
Here is the caller graph for this function:
void platform_leds_flashing (uns8 led, uns8 enable)
Definition at line 106 of file platform_leds.c.
void platform_leds_process ()
Definition at line 124 of file platform_leds.c.
References PLATFORM_LEDS_FLASH_TICKS, tick_calc_diff(), tick_get_count(), and uns16.
Here is the call graph for this function:
void platform_leds_setup_io ()
Definition at line 64 of file platform_leds.c.
References clear_pin, and make_output.
platform_leds.h File Reference
Easy access to the LEDs on your platform. #include "platform.h" #include "pic_utils.h" Include dependency graph for platform_leds.h:
561
This graph shows which files directly or indirectly include this file:
Defines
#define __platform_heds_h
Functions
void platform_leds_flash (uns8 led)
void platform_leds_flashing (uns8 led, uns8 enable)
void platform_leds_process ()
void platform_leds_setup_io ()
Detailed Description
Definition in file platform_leds.h.
Define Documentation
#define __platform_heds_h
Definition at line 43 of file platform_leds.h.
562
Function Documentation
void platform_leds_flash (uns8 led)
Definition at line 81 of file platform_leds.c.
References tick_get_count().
Referenced by usb_cdc_handle_tx(), usb_ep_data_out_callback(), and usb_handle_class_ctrl_write_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
void platform_leds_flashing (uns8 led, uns8 enable)
Definition at line 106 of file platform_leds.c.
void platform_leds_process ()
Definition at line 124 of file platform_leds.c.
References PLATFORM_LEDS_FLASH_TICKS, tick_calc_diff(), tick_get_count(), and uns16.
Here is the call graph for this function:
void platform_leds_setup_io ()
Definition at line 64 of file platform_leds.c.
References clear_pin, and make_output.
563
protocol.h File Reference
Protocol definitions for Pkt mesh network.
Defines
#define CAPS_INFO1_DATE 1
#define CAPS_INFO1_TIME 0
#define CAPS_INPUTS_SWITCH1 0
#define CAPS_INPUTS_SWITCH2 1
#define CAPS_INPUTS_SWITCH3 2
#define CAPS_INPUTS_SWITCH4 3
#define CAPS_INPUTS_SWITCH5 4
#define CAPS_INPUTS_SWITCH6 5
#define CAPS_INPUTS_SWITCH7 6
#define CAPS_INPUTS_SWITCH8 7
#define CAPS_OUTPUTS_DIMMER1 4
#define CAPS_OUTPUTS_DIMMER2 5
#define CAPS_OUTPUTS_DIMMER3 6
#define CAPS_OUTPUTS_DIMMER4 7
#define CAPS_OUTPUTS_RELAY1 0
#define CAPS_OUTPUTS_RELAY2 1
#define CAPS_OUTPUTS_RELAY3 2
#define CAPS_OUTPUTS_RELAY4 3
#define CAPS_SENSOR_AIR_PRESSURE 2
#define CAPS_SENSOR_HUMIDITY 1
#define CAPS_SENSOR_LIGHT 3
#define CAPS_SENSOR_PRESENCE 4
#define CAPS_SENSOR_TEMP 0
#define EE_MY_ADDR_H 0x00
#define EE_MY_ADDR_L 0x01
#define EE_MY_INFO1 0x07
#define EE_MY_INPUTS 0x05
#define EE_MY_LAST_PKT_ID_H 0x02
#define EE_MY_LAST_PKT_ID_L 0x03
#define EE_MY_OUTPUTS 0x06
#define EE_MY_SENSORS 0x04
#define PL_ADDR_RESPONSE 5
#define PL_CAPS_RESPONSE 4
#define PL_CHANGE_RESPONSE 9
#define PL_OTHER_RESPONSE 11
#define PL_REQ_ADDR 2
#define PL_REQ_CAPS 3
#define PL_REQ_INFO1 10
#define PL_REQ_INFORM_ON_CHANGE 8
#define PL_REQ_SENSOR 6
#define PL_SENSOR_RESPONSE 7
#define PL_SET_ADDR 1
#define PL_SET_OUTPUT 9
564
Detailed Description
Definition in file protocol.h.
Define Documentation
#define CAPS_INFO1_DATE 1
Definition at line 136 of file protocol.h.
#define CAPS_INFO1_TIME 0
Definition at line 135 of file protocol.h.
#define CAPS_INPUTS_SWITCH1 0
Definition at line 116 of file protocol.h.
#define CAPS_INPUTS_SWITCH2 1
Definition at line 117 of file protocol.h.
#define CAPS_INPUTS_SWITCH3 2
Definition at line 118 of file protocol.h.
#define CAPS_INPUTS_SWITCH4 3
Definition at line 119 of file protocol.h.
#define CAPS_INPUTS_SWITCH5 4
Definition at line 120 of file protocol.h.
#define CAPS_INPUTS_SWITCH6 5
Definition at line 121 of file protocol.h.
#define CAPS_INPUTS_SWITCH7 6
Definition at line 122 of file protocol.h.
565
#define CAPS_INPUTS_SWITCH8 7
Definition at line 123 of file protocol.h.
#define CAPS_OUTPUTS_DIMMER1 4
Definition at line 130 of file protocol.h.
#define CAPS_OUTPUTS_DIMMER2 5
Definition at line 131 of file protocol.h.
#define CAPS_OUTPUTS_DIMMER3 6
Definition at line 132 of file protocol.h.
#define CAPS_OUTPUTS_DIMMER4 7
Definition at line 133 of file protocol.h.
#define CAPS_OUTPUTS_RELAY1 0
Definition at line 126 of file protocol.h.
#define CAPS_OUTPUTS_RELAY2 1
Definition at line 127 of file protocol.h.
#define CAPS_OUTPUTS_RELAY3 2
Definition at line 128 of file protocol.h.
#define CAPS_OUTPUTS_RELAY4 3
Definition at line 129 of file protocol.h.
#define CAPS_SENSOR_AIR_PRESSURE 2
Definition at line 111 of file protocol.h.
#define CAPS_SENSOR_HUMIDITY 1
Definition at line 110 of file protocol.h.
566
#define CAPS_SENSOR_LIGHT 3
Definition at line 112 of file protocol.h.
#define CAPS_SENSOR_PRESENCE 4
Definition at line 113 of file protocol.h.
#define CAPS_SENSOR_TEMP 0
Definition at line 109 of file protocol.h.
#define EE_MY_ADDR_H 0x00
Definition at line 95 of file protocol.h.
#define EE_MY_ADDR_L 0x01
Definition at line 96 of file protocol.h.
#define EE_MY_INFO1 0x07
Definition at line 104 of file protocol.h.
#define EE_MY_INPUTS 0x05
Definition at line 102 of file protocol.h.
#define EE_MY_LAST_PKT_ID_H 0x02
Definition at line 98 of file protocol.h.
#define EE_MY_LAST_PKT_ID_L 0x03
Definition at line 99 of file protocol.h.
#define EE_MY_OUTPUTS 0x06
Definition at line 103 of file protocol.h.
#define EE_MY_SENSORS 0x04
Definition at line 101 of file protocol.h.
567
#define PL_ADDR_RESPONSE 5
Definition at line 60 of file protocol.h.
#define PL_CAPS_RESPONSE 4
Definition at line 52 of file protocol.h.
#define PL_CHANGE_RESPONSE 9
Definition at line 75 of file protocol.h.
#define PL_OTHER_RESPONSE 11
Definition at line 88 of file protocol.h.
#define PL_REQ_ADDR 2
Definition at line 50 of file protocol.h.
#define PL_REQ_CAPS 3
Definition at line 51 of file protocol.h.
#define PL_REQ_INFO1 10
Definition at line 85 of file protocol.h.
#define PL_REQ_INFORM_ON_CHANGE 8
Definition at line 71 of file protocol.h.
#define PL_REQ_SENSOR 6
Definition at line 63 of file protocol.h.
#define PL_SENSOR_RESPONSE 7
Definition at line 66 of file protocol.h.
#define PL_SET_ADDR 1
Definition at line 47 of file protocol.h.
568
#define PL_SET_OUTPUT 9
Definition at line 80 of file protocol.h.
sfe_tdn_v1.h File Reference
Defines
#define __sfe_tdn_v1_h defined
#define stat1 1
#define stat2 3
#define stat3 4
Define Documentation
#define __sfe_tdn_v1_h defined
Definition at line 42 of file sfe_tdn_v1.h.
#define stat1 1
Definition at line 45 of file sfe_tdn_v1.h.
#define stat2 3
Definition at line 46 of file sfe_tdn_v1.h.
#define stat3 4
Definition at line 47 of file sfe_tdn_v1.h.
sht15.c File Reference #include "sht15.h" #include "pic_utils.h" #include "pic_serial.h" Include dependency graph for sht15.c:
569
Defines
#define CHECK_HUMD 0b00000101
#define CHECK_STAT 0b00000111
#define CHECK_TEMP 0b00000011
#define sht15_read_sda() set_bit(tris_array[sht15_sda_port - PORTA], sht15_sda_pin);
#define sht15_write_sda() clear_bit(tris_array[sht15_sda_port - PORTA], sht15_sda_pin);
#define WRITE_STAT 0b00000110
Functions
uns16 sht15_fix_humidity (uns16 sensor_out)
uns16 sht15_fix_humidity_l (uns8 sensor_out)
uns16 sht15_fix_humidity_r (uns16 sensor_out)
int16 sht15_fix_temperature_h (uns16 sensor_out)
void sht15_read (void)
uns16 sht15_read_byte16 (void)
uns16 sht15_read_humidity (void)
uns16 sht15_read_temperature (void)
void sht15_send_byte (uns8 sht15_command)
void sht15_setup_io (void)
void sht15_start (void)
Define Documentation
#define CHECK_HUMD 0b00000101
Definition at line 46 of file sht15.c.
Referenced by sht15_read(), and sht15_read_humidity().
#define CHECK_STAT 0b00000111
570
Definition at line 47 of file sht15.c.
#define CHECK_TEMP 0b00000011
Definition at line 45 of file sht15.c.
Referenced by sht15_read(), and sht15_read_temperature().
#define sht15_read_sda() set_bit(tris_array[sht15_sda_port - PORTA], sht15_sda_pin);
Definition at line 42 of file sht15.c.
Referenced by sht15_read_byte16(), and sht15_send_byte().
#define sht15_write_sda() clear_bit(tris_array[sht15_sda_port - PORTA], sht15_sda_pin);
Definition at line 41 of file sht15.c.
Referenced by sht15_read_byte16(), sht15_send_byte(), and sht15_start().
#define WRITE_STAT 0b00000110
Definition at line 48 of file sht15.c.
Function Documentation
uns16 sht15_fix_humidity (uns16 sensor_out)
Definition at line 327 of file sht15.c.
Referenced by sht15_read().
Here is the caller graph for this function:
uns16 sht15_fix_humidity_l (uns8 sensor_out)
Definition at line 347 of file sht15.c.
References uns16.
Referenced by sht15_read_humidity().
Here is the caller graph for this function:
571
uns16 sht15_fix_humidity_r (uns16 sensor_out)
Definition at line 305 of file sht15.c.
References c1, c2, c3, and int32.
int16 sht15_fix_temperature_h (uns16 sensor_out)
Definition at line 366 of file sht15.c.
References int16.
Referenced by sht15_read(), and sht15_read_temperature().
Here is the caller graph for this function:
void sht15_read (void)
Definition at line 87 of file sht15.c.
References CHECK_HUMD, CHECK_TEMP, serial_print_int(), serial_print_str(), sht15_fix_humidity(),
sht15_fix_temperature_h(), sht15_read_byte16(), sht15_send_byte(), sht15_start(), and uns16.
Here is the call graph for this function:
572
uns16 sht15_read_byte16 (void)
Definition at line 216 of file sht15.c.
References clear_pin, set_pin, sht15_read_sda, sht15_write_sda, test_pin, uns16, and uns8.
Referenced by sht15_read(), sht15_read_humidity(), and sht15_read_temperature().
Here is the caller graph for this function:
uns16 sht15_read_humidity (void)
Definition at line 59 of file sht15.c.
References CHECK_HUMD, sht15_fix_humidity_l(), sht15_read_byte16(), sht15_send_byte(), sht15_start(),
and uns16.
Here is the call graph for this function:
uns16 sht15_read_temperature (void)
Definition at line 71 of file sht15.c.
References CHECK_TEMP, serial_print_int(), serial_print_str(), sht15_fix_temperature_h(),
sht15_read_byte16(), sht15_send_byte(), sht15_start(), and uns16.
Here is the call graph for this function:
573
void sht15_send_byte (uns8 sht15_command)
Definition at line 118 of file sht15.c.
References change_pin, clear_pin, serial_print_int(), serial_print_str(), set_pin, sht15_read_sda,
sht15_write_sda, test_pin, and uns8.
Referenced by sht15_read(), sht15_read_humidity(), and sht15_read_temperature().
Here is the call graph for this function:
Here is the caller graph for this function:
void sht15_setup_io (void)
Definition at line 51 of file sht15.c.
References clear_pin, and make_output.
574
void sht15_start (void)
Definition at line 172 of file sht15.c.
References clear_pin, set_pin, and sht15_write_sda.
Referenced by sht15_read(), sht15_read_humidity(), and sht15_read_temperature().
Here is the caller graph for this function:
sht15.h File Reference
Support for SHT15 and SHT11 digital humidity sensors. #include "pic_utils.h" #include "config.h" Include dependency graph for sht15.h:
This graph shows which files directly or indirectly include this file:
575
Defines
#define __sht15_h defined
Functions
uns16 sht15_fix_humidity (uns16 sensor_out)
uns16 sht15_fix_humidity_l (uns8 sensor_out)
uns16 sht15_fix_humidity_r (uns16 sensor_out)
int16 sht15_fix_temperature_h (uns16 sensor_out)
void sht15_read (void)
uns16 sht15_read_byte16 (void)
uns16 sht15_read_humidity (void)
uns16 sht15_read_temperature (void)
void sht15_send_byte (uns8 sht15_command)
*void sht15_setup_io (void)
void sht15_start (void)
Detailed Description
Include the following in your config.h:
- - - - - - - - - - sht15 defines
- - - - - - - - - -
define sht15_sck_port PORTA define sht15_sck_pin 1 define sht15_sda_port PORTA define
sht15_sda_pin 0
- - - - - - - - - -
Definition in file sht15.h.
Define Documentation
#define __sht15_h defined
Definition at line 56 of file sht15.h.
Function Documentation
uns16 sht15_fix_humidity (uns16 sensor_out)
Definition at line 327 of file sht15.c.
Referenced by sht15_read().
Here is the caller graph for this function:
576
uns16 sht15_fix_humidity_l (uns8 sensor_out)
Definition at line 347 of file sht15.c.
References uns16.
Referenced by sht15_read_humidity().
Here is the caller graph for this function:
uns16 sht15_fix_humidity_r (uns16 sensor_out)
Definition at line 305 of file sht15.c.
References c1, c2, c3, and int32.
int16 sht15_fix_temperature_h (uns16 sensor_out)
Definition at line 366 of file sht15.c.
References int16.
Referenced by sht15_read(), and sht15_read_temperature().
Here is the caller graph for this function:
void sht15_read (void)
Definition at line 87 of file sht15.c.
References CHECK_HUMD, CHECK_TEMP, serial_print_int(), serial_print_str(), sht15_fix_humidity(),
sht15_fix_temperature_h(), sht15_read_byte16(), sht15_send_byte(), sht15_start(), and uns16.
Here is the call graph for this function:
577
uns16 sht15_read_byte16 (void)
Definition at line 216 of file sht15.c.
References clear_pin, set_pin, sht15_read_sda, sht15_write_sda, test_pin, uns16, and uns8.
Referenced by sht15_read(), sht15_read_humidity(), and sht15_read_temperature().
Here is the caller graph for this function:
uns16 sht15_read_humidity (void)
Definition at line 59 of file sht15.c.
References CHECK_HUMD, sht15_fix_humidity_l(), sht15_read_byte16(), sht15_send_byte(), sht15_start(),
and uns16.
Here is the call graph for this function:
578
uns16 sht15_read_temperature (void)
Definition at line 71 of file sht15.c.
References CHECK_TEMP, serial_print_int(), serial_print_str(), sht15_fix_temperature_h(),
sht15_read_byte16(), sht15_send_byte(), sht15_start(), and uns16.
Here is the call graph for this function:
void sht15_send_byte (uns8 sht15_command)
Definition at line 118 of file sht15.c.
References change_pin, clear_pin, serial_print_int(), serial_print_str(), set_pin, sht15_read_sda,
sht15_write_sda, test_pin, and uns8.
Referenced by sht15_read(), sht15_read_humidity(), and sht15_read_temperature().
Here is the call graph for this function:
579
Here is the caller graph for this function:
* void sht15_setup_io (void)
Definition at line 51 of file sht15.c.
References clear_pin, and make_output.
void sht15_start (void)
Definition at line 172 of file sht15.c.
References clear_pin, set_pin, and sht15_write_sda.
Referenced by sht15_read(), sht15_read_humidity(), and sht15_read_temperature().
Here is the caller graph for this function:
somo_14d.c File Reference #include "somo_14d.h" #include "pic_serial.h" Include dependency graph for somo_14d.c:
580
Functions
uns8 somo_14d_is_busy ()
void somo_14d_play_pause ()
void somo_14d_reset ()
void somo_14d_send_data (uns16 data)
void somo_14d_set_file_id (uns16 file_id)
void somo_14d_set_volume (uns8 level)
void somo_14d_setup_io ()
void somo_14d_standby ()
void somo_14d_stop ()
void somo_14d_wake ()
Function Documentation
uns8 somo_14d_is_busy ()
Definition at line 123 of file somo_14d.c.
References test_pin.
Referenced by audio_queue_clear().
Here is the caller graph for this function:
void somo_14d_play_pause ()
Definition at line 113 of file somo_14d.c.
References SOMO_14D_PLAY_PAUSE_CMD, and somo_14d_send_data().
581
Here is the call graph for this function:
void somo_14d_reset ()
Definition at line 57 of file somo_14d.c.
References clear_pin, and set_pin.
void somo_14d_send_data (uns16 data)
Definition at line 79 of file somo_14d.c.
References clear_pin, set_pin, and uns8.
Referenced by somo_14d_play_pause(), somo_14d_set_file_id(), somo_14d_set_volume(), and
somo_14d_stop().
Here is the caller graph for this function:
void somo_14d_set_file_id (uns16 file_id)
Definition at line 103 of file somo_14d.c.
References somo_14d_send_data().
Referenced by audio_queue_add(), and audio_queue_process().
Here is the call graph for this function:
Here is the caller graph for this function:
582
void somo_14d_set_volume (uns8 level)
Definition at line 108 of file somo_14d.c.
References somo_14d_send_data(), and SOMO_14D_VOLUME_CMD.
Here is the call graph for this function:
void somo_14d_setup_io ()
Definition at line 41 of file somo_14d.c.
References make_input, make_output, and set_pin.
void somo_14d_standby ()
Definition at line 65 of file somo_14d.c.
References clear_pin.
void somo_14d_stop ()
Definition at line 117 of file somo_14d.c.
References somo_14d_send_data(), and SOMO_14D_STOP_CMD.
Referenced by audio_queue_clear().
Here is the call graph for this function:
Here is the caller graph for this function:
void somo_14d_wake ()
Definition at line 73 of file somo_14d.c.
References set_pin.
583
somo_14d.h File Reference
Somo-14D audio player interface. #include "pic_utils.h" Include dependency graph for somo_14d.h:
This graph shows which files directly or indirectly include this file:
Defines
#define SOMO_14D_PLAY_PAUSE_CMD 0xfffe
#define SOMO_14D_STOP_CMD 0xffff
#define SOMO_14D_VOLUME_CMD 0xfff0
Functions
uns8 somo_14d_is_busy ()
void somo_14d_play_pause ()
void somo_14d_reset ()
void somo_14d_set_file_id (uns16 file_id)
void somo_14d_set_volume (uns8 level)
void somo_14d_setup_io ()
void somo_14d_standby ()
void somo_14d_stop ()
void somo_14d_wake ()
Detailed Description
Library for accessing the functionality of the 4D systems .ad4 audio player
Put the following into your config.h
584
- - - - - - - - - - - - - - - - - - - somo_14d defines
- - - - - - - - - - - - - - - - - - -
define somo_14d_clk_port PORTA define somo_14d_clk_pin 1
define somo_14d_data_port PORTA define somo_14d_data_pin 2
don't define these if you don't want to use them
define somo_14d_reset_port PORTA define somo_14d_reset_pin 3
define somo_14d_busy_port PORTA define somo_14d_busy_pin 4
- - - - - - - - - - - - - - - - - - -
Definition in file somo_14d.h.
Define Documentation
#define SOMO_14D_PLAY_PAUSE_CMD 0xfffe
Definition at line 69 of file somo_14d.h.
Referenced by somo_14d_play_pause().
#define SOMO_14D_STOP_CMD 0xffff
Definition at line 70 of file somo_14d.h.
Referenced by somo_14d_stop().
#define SOMO_14D_VOLUME_CMD 0xfff0
Definition at line 71 of file somo_14d.h.
Referenced by somo_14d_set_volume().
Function Documentation
uns8 somo_14d_is_busy ()
Definition at line 123 of file somo_14d.c.
References test_pin.
Referenced by audio_queue_clear().
Here is the caller graph for this function:
585
void somo_14d_play_pause ()
Definition at line 113 of file somo_14d.c.
References SOMO_14D_PLAY_PAUSE_CMD, and somo_14d_send_data().
Here is the call graph for this function:
void somo_14d_reset ()
Definition at line 57 of file somo_14d.c.
References clear_pin, and set_pin.
void somo_14d_set_file_id (uns16 file_id)
Definition at line 103 of file somo_14d.c.
References somo_14d_send_data().
Referenced by audio_queue_add(), and audio_queue_process().
Here is the call graph for this function:
Here is the caller graph for this function:
void somo_14d_set_volume (uns8 level)
Definition at line 108 of file somo_14d.c.
References somo_14d_send_data(), and SOMO_14D_VOLUME_CMD.
Here is the call graph for this function:
void somo_14d_setup_io ()
Definition at line 41 of file somo_14d.c.
References make_input, make_output, and set_pin.
586
void somo_14d_standby ()
Definition at line 65 of file somo_14d.c.
References clear_pin.
void somo_14d_stop ()
Definition at line 117 of file somo_14d.c.
References somo_14d_send_data(), and SOMO_14D_STOP_CMD.
Referenced by audio_queue_clear().
Here is the call graph for this function:
Here is the caller graph for this function:
void somo_14d_wake ()
Definition at line 73 of file somo_14d.c.
References set_pin.
spi.c File Reference #include "spi.h" Include dependency graph for spi.c:
587
Functions
void spi_pulse_0 ()
SPI test routine. void spi_pulse_1 ()
SPI test routine. void spi_setup ()
Setup ports and pins for SPI output. void spi_write (uns8 data)
Send a byte of data using software spi. void spi_write_lsb (uns8 data)
Send a byte of data using software spi. void spi_write_sure (uns8 data)
SPI write for Sure devices.
Function Documentation
void spi_pulse_0 ()
Definition at line 90 of file spi.c.
References change_pin, clear_pin, and set_pin.
void spi_pulse_1 ()
Definition at line 96 of file spi.c.
References change_pin, clear_pin, and set_pin.
void spi_setup ()
Setup ports and pins for SPI output
Definition at line 69 of file spi.c.
Referenced by hc4led_setup(), and sure_7seg_setup().
Here is the caller graph for this function:
void spi_write (uns8 data)
Sends a byte of data MSB first, data only changes on clock low
Definition at line 41 of file spi.c.
References change_pin, clear_pin, set_pin, and uns8.
Referenced by hc4led_write_str().
Here is the caller graph for this function:
588
void spi_write_lsb (uns8 data)
Sends a byte of data LSB first, data only changes on clock low
Definition at line 55 of file spi.c.
References change_pin, clear_pin, set_pin, and uns8.
void spi_write_sure (uns8 data)
SPI write byte for Sure devices. Sure devices do things a little differently. Data goes LSB first but
data changes on clock high.
Definition at line 75 of file spi.c.
References change_pin, clear_pin, set_pin, and uns8.
Referenced by sure_7seg_write_str().
Here is the caller graph for this function:
spi.h File Reference
Outputs SPI-like interfaces (clock+data). #include "pic_utils.h" #include "config.h" Include dependency graph for spi.h:
This graph shows which files directly or indirectly include this file:
589
Functions
void spi_pulse_0 ()
SPI test routine. void spi_pulse_1 ()
SPI test routine. void spi_setup ()
Setup ports and pins for SPI output. void spi_write (uns8 data)
Send a byte of data using software spi. void spi_write_lsb (uns8 data)
Send a byte of data using software spi. void spi_write_sure (uns8 data)
SPI write for Sure devices.
Detailed Description
Covers standard SPI-like interfaces (clock + data) and Sure Electronics displays which are a little
different
Definition in file spi.h.
Function Documentation
void spi_pulse_0 ()
Definition at line 90 of file spi.c.
References change_pin, clear_pin, and set_pin.
void spi_pulse_1 ()
Definition at line 96 of file spi.c.
References change_pin, clear_pin, and set_pin.
void spi_setup ()
Setup ports and pins for SPI output
Definition at line 69 of file spi.c.
Referenced by hc4led_setup(), and sure_7seg_setup().
Here is the caller graph for this function:
590
void spi_write (uns8 data)
Sends a byte of data MSB first, data only changes on clock low
Definition at line 41 of file spi.c.
References change_pin, clear_pin, set_pin, and uns8.
Referenced by hc4led_write_str().
Here is the caller graph for this function:
void spi_write_lsb (uns8 data)
Sends a byte of data LSB first, data only changes on clock low
Definition at line 55 of file spi.c.
References change_pin, clear_pin, set_pin, and uns8.
void spi_write_sure (uns8 data)
SPI write byte for Sure devices. Sure devices do things a little differently. Data goes LSB first but
data changes on clock high.
Definition at line 75 of file spi.c.
References change_pin, clear_pin, set_pin, and uns8.
Referenced by sure_7seg_write_str().
Here is the caller graph for this function:
spi_hw.c File Reference #include "spi_hw.h" #include "pic_serial.h" Include dependency graph for spi_hw.c:
591
Functions
void spi_hw_init ()
uns8 spi_hw_receive ()
void spi_hw_setup_io ()
void spi_hw_transmit (uns8 data)
Function Documentation
void spi_hw_init ()
Definition at line 82 of file spi_hw.c.
uns8 spi_hw_receive ()
Definition at line 106 of file spi_hw.c.
References spi_hw_transmit().
Here is the call graph for this function:
void spi_hw_setup_io ()
Definition at line 40 of file spi_hw.c.
References make_input, and make_output.
void spi_hw_transmit (uns8 data)
592
Definition at line 91 of file spi_hw.c.
spi_hw.h File Reference #include "pic_utils.h" #include "config.h" Include dependency graph for spi_hw.h:
This graph shows which files directly or indirectly include this file:
Functions
void spi_hw_init ()
uns8 spi_hw_receive ()
void spi_hw_setup_io ()
void spi_hw_transmit (uns8 data)
Detailed Description
Serial Peripheral Interface (HW) routines
Put the following into your config.h
593
- - - - - - - - - - - - - - - - - - - spi_hw defines
- - - - - - - - - - - - - - - - - - -
define SPI_HW_MASTER_MODE or define SPI_HW_SLAVE_MODE
In slave mode, we can use ss: define SPI_HW_USE_SS
In master mode, we need to define clock define SPI_HW_MASTER_CLOCK_TMR2_DIV_2 define
SPI_HW_MASTER_CLOCK_FOSC_DIV_64 define SPI_HW_MASTER_CLOCK_FOSC_DIV_16
define SPI_HW_MASTER_CLOCK_FOSC_DIV_4
- - - - - - - - - - - - - - - - - - -
Definition in file spi_hw.h.
Function Documentation
void spi_hw_init ()
Definition at line 82 of file i2c_hw.c.
uns8 spi_hw_receive ()
Definition at line 106 of file i2c_hw.c.
References spi_hw_transmit().
Referenced by mrf24j40_long_addr_read(), and mrf24j40_short_addr_read().
Here is the call graph for this function:
Here is the caller graph for this function:
594
void spi_hw_setup_io ()
Definition at line 40 of file i2c_hw.c.
References make_input, and make_output.
void spi_hw_transmit (uns8 data)
Definition at line 91 of file i2c_hw.c.
Referenced by mrf24j40_long_addr_read(), mrf24j40_long_addr_write(), mrf24j40_short_addr_read(),
mrf24j40_short_addr_write(), and spi_hw_receive().
Here is the caller graph for this function:
sure_2416.c File Reference
Sure 2416 led matrix display routines. #include "sure_2416.h" #include "pic_serial.h" Include dependency graph for sure_2416.c:
595
Functions
void sure_2416_fill (uns8 colour)
void sure_2416_fill2 (uns8 colour)
void sure_2416_init ()
void sure_2416_send_command (uns8 command)
void sure_2416_set_brightness (uns8 brightness)
void sure_2416_set_pixel (uns8 x, uns8 y, uns8 colour)
void sure_2416_setup ()
void sure_2416_write (uns8 mem_addr, uns8 data)
Detailed Description
Definition in file sure_2416.c.
Function Documentation
void sure_2416_fill (uns8 colour)
Definition at line 308 of file sure_2416.c.
References sure_2416_write(), and uns8.
Here is the call graph for this function:
void sure_2416_fill2 (uns8 colour)
596
Definition at line 323 of file sure_2416.c.
References clear_pin, set_pin, SURE_2416_CMD_LEDS_OFF, SURE_2416_CMD_LEDS_ON,
sure_2416_send_command(), and uns16.
Here is the call graph for this function:
void sure_2416_init ()
Definition at line 58 of file sure_2416.c.
References SURE_2416_CMD_CLK_MASTER_MODE, SURE_2416_CMD_LEDS_ON,
SURE_2416_CMD_PMOS_16_COMMON, SURE_2416_CMD_SYS_DISABLE,
SURE_2416_CMD_SYS_ENABLE, and sure_2416_send_command().
Here is the call graph for this function:
void sure_2416_send_command (uns8 command)
Definition at line 68 of file sure_2416.c.
References clear_pin, set_pin, and uns8.
Referenced by sure_2416_fill2(), sure_2416_init(), and sure_2416_set_brightness().
Here is the caller graph for this function:
void sure_2416_set_brightness (uns8 brightness)
Definition at line 188 of file sure_2416.c.
References sure_2416_send_command().
Here is the call graph for this function:
597
void sure_2416_set_pixel (uns8 x, uns8 y, uns8 colour)
Definition at line 193 of file sure_2416.c.
References clear_pin, make_input, make_output, set_pin, test_pin, and uns8.
void sure_2416_setup ()
Definition at line 43 of file sure_2416.c.
References make_output, and set_pin.
void sure_2416_write (uns8 mem_addr, uns8 data)
Definition at line 124 of file sure_2416.c.
References change_pin_var, clear_pin, set_pin, and uns8.
Referenced by sure_2416_fill().
Here is the caller graph for this function:
sure_2416.h File Reference
Sure 2416 led matrix display routines. #include "config.h" #include "pic_utils.h" Include dependency graph for sure_2416.h:
This graph shows which files directly or indirectly include this file:
598
Defines
#define SURE_2416_CMD_BLINK_OFF 0b00001000
#define SURE_2416_CMD_BLINK_ON 0b00001001
#define SURE_2416_CMD_CLK_MASTER_MODE 0b00010100
#define SURE_2416_CMD_CLK_SLAVE_MODE 0b00010000
#define SURE_2416_CMD_CLK_SOURCE_EXT 0b00011100
#define SURE_2416_CMD_CLK_SOURCE_INT_RC 0b00011000
#define SURE_2416_CMD_LEDS_OFF 0b00000010
#define SURE_2416_CMD_LEDS_ON 0b00000011
#define SURE_2416_CMD_NMOS_16_COMMON 0b00100100
#define SURE_2416_CMD_NMOS_8_COMMON 0b00100000
#define SURE_2416_CMD_PMOS_16_COMMON 0b00101100
#define SURE_2416_CMD_PMOS_8_COMMON 0b00101000
#define SURE_2416_CMD_SYS_DISABLE 0b00000000
#define SURE_2416_CMD_SYS_ENABLE 0b00000001
Functions
void sure_2416_clear ()
void sure_2416_fill (uns8 colour)
void sure_2416_fill2 (uns8 colour)
uns8 sure_2416_get_pixel (uns8 x, uns8 y)
void sure_2416_horizontal_line (uns8 x, uns8 y, uns8 length, uns8 colour)
void sure_2416_init ()
void sure_2416_send_command (uns8 command)
void sure_2416_set_brightness (uns8 brightness)
void sure_2416_set_pixel (uns8 x, uns8 y, uns8 colour)
void sure_2416_setup ()
void sure_2416_vertical_line (uns8 x, uns8 y, uns8 length, uns8 colour)
void sure_2416_write (uns8 mem_addr, uns8 data)
Detailed Description
Definition in file sure_2416.h.
Define Documentation
#define SURE_2416_CMD_BLINK_OFF 0b00001000
599
Definition at line 86 of file sure_2416.h.
#define SURE_2416_CMD_BLINK_ON 0b00001001
Definition at line 87 of file sure_2416.h.
#define SURE_2416_CMD_CLK_MASTER_MODE 0b00010100
Definition at line 77 of file sure_2416.h.
Referenced by sure_2416_init().
#define SURE_2416_CMD_CLK_SLAVE_MODE 0b00010000
Definition at line 78 of file sure_2416.h.
#define SURE_2416_CMD_CLK_SOURCE_EXT 0b00011100
Definition at line 81 of file sure_2416.h.
#define SURE_2416_CMD_CLK_SOURCE_INT_RC 0b00011000
Definition at line 80 of file sure_2416.h.
#define SURE_2416_CMD_LEDS_OFF 0b00000010
Definition at line 83 of file sure_2416.h.
Referenced by sure_2416_fill2().
#define SURE_2416_CMD_LEDS_ON 0b00000011
Definition at line 84 of file sure_2416.h.
Referenced by sure_2416_fill2(), and sure_2416_init().
#define SURE_2416_CMD_NMOS_16_COMMON 0b00100100
Definition at line 73 of file sure_2416.h.
#define SURE_2416_CMD_NMOS_8_COMMON 0b00100000
Definition at line 72 of file sure_2416.h.
#define SURE_2416_CMD_PMOS_16_COMMON 0b00101100
Definition at line 75 of file sure_2416.h.
600
Referenced by sure_2416_init().
#define SURE_2416_CMD_PMOS_8_COMMON 0b00101000
Definition at line 74 of file sure_2416.h.
#define SURE_2416_CMD_SYS_DISABLE 0b00000000
Definition at line 69 of file sure_2416.h.
Referenced by sure_2416_init().
#define SURE_2416_CMD_SYS_ENABLE 0b00000001
Definition at line 70 of file sure_2416.h.
Referenced by sure_2416_init().
Function Documentation
void sure_2416_clear ()
void sure_2416_fill (uns8 colour)
Definition at line 308 of file sure_2416.c.
References sure_2416_write(), and uns8.
Here is the call graph for this function:
void sure_2416_fill2 (uns8 colour)
Definition at line 323 of file sure_2416.c.
References clear_pin, set_pin, SURE_2416_CMD_LEDS_OFF, SURE_2416_CMD_LEDS_ON,
sure_2416_send_command(), and uns16.
Here is the call graph for this function:
601
uns8 sure_2416_get_pixel (uns8 x, uns8 y)
void sure_2416_horizontal_line (uns8 x, uns8 y, uns8 length, uns8 colour)
void sure_2416_init ()
Definition at line 58 of file sure_2416.c.
References SURE_2416_CMD_CLK_MASTER_MODE, SURE_2416_CMD_LEDS_ON,
SURE_2416_CMD_PMOS_16_COMMON, SURE_2416_CMD_SYS_DISABLE,
SURE_2416_CMD_SYS_ENABLE, and sure_2416_send_command().
Here is the call graph for this function:
void sure_2416_send_command (uns8 command)
Definition at line 68 of file sure_2416.c.
References clear_pin, set_pin, and uns8.
Referenced by sure_2416_fill2(), sure_2416_init(), and sure_2416_set_brightness().
Here is the caller graph for this function:
void sure_2416_set_brightness (uns8 brightness)
Definition at line 188 of file sure_2416.c.
References sure_2416_send_command().
Here is the call graph for this function:
void sure_2416_set_pixel (uns8 x, uns8 y, uns8 colour)
Definition at line 193 of file sure_2416.c.
References clear_pin, make_input, make_output, set_pin, test_pin, and uns8.
602
void sure_2416_setup ()
Definition at line 43 of file sure_2416.c.
References make_output, and set_pin.
void sure_2416_vertical_line (uns8 x, uns8 y, uns8 length, uns8 colour)
void sure_2416_write (uns8 mem_addr, uns8 data)
Definition at line 124 of file sure_2416.c.
References change_pin_var, clear_pin, set_pin, and uns8.
Referenced by sure_2416_fill().
Here is the caller graph for this function:
sure_7seg.c File Reference
Routines to talk to Sure electronics seven segment displays. #include "sure_7seg.h" Include dependency graph for sure_7seg.c:
603
Functions
uns8 sure_7seg_convert (uns8 digit)
void sure_7seg_setup ()
Setup ports and pins to communicate to Sure display. void sure_7seg_write_str (char *data)
Display ASCII string to 7 segment displays.
Detailed Description
Definition in file sure_7seg.c.
Function Documentation
uns8 sure_7seg_convert (uns8 digit)
Definition at line 48 of file sure_7seg.c.
Referenced by sure_7seg_write_str().
Here is the caller graph for this function:
void sure_7seg_setup ()
Set up ports and pins as appropriate to communicate via SPI to Sure 7 segment displays
Definition at line 43 of file sure_7seg.c.
References spi_setup().
Here is the call graph for this function:
void sure_7seg_write_str (char * data)
Converts ASCII to the appropriate magic characters to display on a Sure 7 segment display. Only
numbers 0-9 and space are implented for now.
To create your own characters, add together: 0x40 -------- | | 0x02 | | 0x20 | 0x01 | |------| | | 0x04 | |
0x10 | | -------- 0x08
Definition at line 64 of file sure_7seg.c.
References clear_pin, set_pin, spi_write_sure(), sure_7seg_convert(), and uns8.
Here is the call graph for this function:
604
sure_7seg.h File Reference
Routines to talk to Sure electronics seven segment displays. #include "spi.h" #include "pic_utils.h" Include dependency graph for sure_7seg.h:
This graph shows which files directly or indirectly include this file:
Functions
void sure_7seg_setup ()
Setup ports and pins to communicate to Sure display. void sure_7seg_write_str (char *data)
Display ASCII string to 7 segment displays.
Detailed Description
Definition in file sure_7seg.h.
605
Function Documentation
void sure_7seg_setup ()
Set up ports and pins as appropriate to communicate via SPI to Sure 7 segment displays
Definition at line 43 of file sure_7seg.c.
References spi_setup().
Here is the call graph for this function:
void sure_7seg_write_str (char * data)
Converts ASCII to the appropriate magic characters to display on a Sure 7 segment display. Only
numbers 0-9 and space are implented for now.
To create your own characters, add together: 0x40 -------- | | 0x02 | | 0x20 | 0x01 | |------| | | 0x04 | |
0x10 | | -------- 0x08
Definition at line 64 of file sure_7seg.c.
References clear_pin, set_pin, spi_write_sure(), sure_7seg_convert(), and uns8.
Here is the call graph for this function:
tmp75.c File Reference
Routines to access TMP75 temperature sensor. #include "tmp75.h" #include "pic_serial.h" Include dependency graph for tmp75.c:
606
Functions
void tmp75_convert_temp (uns8 addr)
Start temperature conversion on tmp75. uns8 tmp75_get_config (uns8 addr)
Get tmp75 config register. uns16 tmp75_get_temp (uns8 addr)
Read temperature from tmp75. uns8 tmp75_read (uns8 addr, uns8 pointer)
uns16 tmp75_read_16bit (uns8 addr, uns8 pointer)
void tmp75_set_config (uns8 addr, uns8 config)
Set tmp75 config register. void tmp75_setup ()
uns8 tmp75_write (uns8 addr, uns8 pointer, uns8 data)
Detailed Description
Definition in file tmp75.c.
Function Documentation
void tmp75_convert_temp (uns8 addr)
This routine starts the temperature conversion in the tmp75. Issue this command before actually
reading the temperature.
needs fixing
Definition at line 107 of file tmp75.c.
607
uns8 tmp75_get_config (uns8 addr)
Gets the tmp75 config register (memory location 0x01)
Definition at line 102 of file tmp75.c.
References TMP75_CONFIG_REGISTER, and tmp75_read().
Here is the call graph for this function:
uns16 tmp75_get_temp (uns8 addr)
Returns 16bit raw temperature register from tmp75.
Definition at line 115 of file tmp75.c.
References tmp75_read_16bit(), and TMP75_TEMP_REGISTER.
Here is the call graph for this function:
uns8 tmp75_read (uns8 addr, uns8 pointer)
Definition at line 42 of file tmp75.c.
References i2c_receive_byte(), i2c_send_byte(), i2c_start(), i2c_stop(), and uns8.
Referenced by tmp75_get_config().
Here is the call graph for this function:
608
Here is the caller graph for this function:
uns16 tmp75_read_16bit (uns8 addr, uns8 pointer)
Definition at line 73 of file tmp75.c.
References i2c_receive_byte(), i2c_send_ack(), i2c_send_byte(), i2c_start(), i2c_stop(), and uns16.
Referenced by tmp75_get_temp().
Here is the call graph for this function:
Here is the caller graph for this function:
void tmp75_set_config (uns8 addr, uns8 config)
Sets the tmp75 config register
Definition at line 97 of file tmp75.c.
609
References TMP75_CONFIG_REGISTER, and tmp75_write().
Here is the call graph for this function:
void tmp75_setup ()
Definition at line 93 of file tmp75.c.
References i2c_setup.
uns8 tmp75_write (uns8 addr, uns8 pointer, uns8 data)
Definition at line 61 of file tmp75.c.
References i2c_send_byte(), i2c_start(), and i2c_stop().
Referenced by tmp75_set_config().
Here is the call graph for this function:
Here is the caller graph for this function:
tmp75.h File Reference
Routines to access TMP75 temperature sensor. #include "pic_utils.h" #include "i2c.h"
610
Include dependency graph for tmp75.h:
This graph shows which files directly or indirectly include this file:
Defines
#define TMP75_CONF_F0 3
#define TMP75_CONF_F1 4
#define TMP75_CONF_OS 7
#define TMP75_CONF_POL 2
#define TMP75_CONF_R0 5
#define TMP75_CONF_R1 6
#define TMP75_CONF_SD 0
#define TMP75_CONF_TM 1
#define TMP75_CONFIG_REGISTER 0b00000001
#define tmp75_setup() tmp75_setup_io()
Setup tmp75 ports and pins. #define TMP75_TEMP_REGISTER 0b00000000
#define TMP75_THI_REGISTER 0b00000011
#define TMP75_TLOW_REGISTER 0b00000010
Functions
void tmp75_convert_temp (uns8 addr)
Start temperature conversion on tmp75. uns8 tmp75_get_config (uns8 addr)
Get tmp75 config register. uns16 tmp75_get_temp (uns8 addr)
Read temperature from tmp75. void tmp75_set_config (uns8 addr, uns8 config)
Set tmp75 config register. void tmp75_setup_io (void)
611
Detailed Description
Put the following in your config.h
// - - - - - - - - - - - - - - - - - - - -
// TMP75 defines
// - - - - - - - - - - - - - - - - - - - -
#define TMP75_ADDR 0x00
Definition in file tmp75.h.
Define Documentation
#define TMP75_CONF_F0 3
Definition at line 62 of file tmp75.h.
#define TMP75_CONF_F1 4
Definition at line 61 of file tmp75.h.
#define TMP75_CONF_OS 7
Definition at line 58 of file tmp75.h.
#define TMP75_CONF_POL 2
Definition at line 63 of file tmp75.h.
#define TMP75_CONF_R0 5
Definition at line 60 of file tmp75.h.
#define TMP75_CONF_R1 6
Definition at line 59 of file tmp75.h.
#define TMP75_CONF_SD 0
Definition at line 65 of file tmp75.h.
#define TMP75_CONF_TM 1
Definition at line 64 of file tmp75.h.
612
#define TMP75_CONFIG_REGISTER 0b00000001
Definition at line 54 of file tmp75.h.
Referenced by tmp75_get_config(), and tmp75_set_config().
#define tmp75_setup() tmp75_setup_io()
Definition at line 74 of file tmp75.h.
#define TMP75_TEMP_REGISTER 0b00000000
Definition at line 53 of file tmp75.h.
Referenced by tmp75_get_temp().
#define TMP75_THI_REGISTER 0b00000011
Definition at line 56 of file tmp75.h.
#define TMP75_TLOW_REGISTER 0b00000010
Definition at line 55 of file tmp75.h.
Function Documentation
void tmp75_convert_temp (uns8 addr)
This routine starts the temperature conversion in the tmp75. Issue this command before actually
reading the temperature.
needs fixing
Definition at line 107 of file tmp75.c.
uns8 tmp75_get_config (uns8 addr)
Gets the tmp75 config register (memory location 0x01)
Definition at line 102 of file tmp75.c.
References TMP75_CONFIG_REGISTER, and tmp75_read().
Here is the call graph for this function:
613
uns16 tmp75_get_temp (uns8 addr)
Returns 16bit raw temperature register from tmp75.
Definition at line 115 of file tmp75.c.
References tmp75_read_16bit(), and TMP75_TEMP_REGISTER.
Here is the call graph for this function:
void tmp75_set_config (uns8 addr, uns8 config)
Sets the tmp75 config register
Definition at line 97 of file tmp75.c.
References TMP75_CONFIG_REGISTER, and tmp75_write().
Here is the call graph for this function:
614
void tmp75_setup_io (void)
usb_cdc_class.c File Reference
Pic CDC USB routines. #include "config.h" #include "pic_usb.h" #include "pic_usb_buffer_mgt.h" #include "pic_serial.h" #include "usb_cdc_class.h" #include "memory.h" Include dependency graph for usb_cdc_class.c:
615
Data Structures
struct line_coding
union long_union
Defines
#define not_SERIAL_STATE 0xa1
#define req_CLEAR_COMM_FEATURE 0x04
#define req_GET_COMM_FEATURE 0x03
#define req_GET_ENCAPSULATED_RESPONSE 0x01
#define req_GET_LINE_CODING 0x21
#define req_SEND_BREAK 0x23
#define req_SEND_ENCAPSULATED_COMMAND 0x00
#define req_SET_COMM_FEATURE 0x02
#define req_SET_CONTROL_LINE_STATE 0x22
#define req_SET_LINE_CODING 0x20
Functions
uns8 usb_cdc_getc (void)
Retrieve a received character from the USB serial port. void usb_cdc_handle_tx ()
Transmit any buffered characters over ther USB virtual serial port. void usb_cdc_print_int (uns16 i)
Print a 16 bit number to the USB virtual serial port. void usb_cdc_print_str (char *str)
Print a string out to the USB virtual serial port. void usb_cdc_putc (uns8 c)
Sends a single character to the USB serial port. uns8 usb_cdc_rx_avail ()
Check to see if a character is available in the receive buffer. void usb_cdc_set_dcd ()
void usb_cdc_set_dsr ()
void usb_cdc_setup ()
Set up data structures ready for USB CDC use. uns8 usb_cdc_tx_empty ()
Check to see if the transmit buffer is empty. void usb_ep_data_in_callback (uns8 end_point, uns16 byte_count)
Callback routine triggered when data has been sent to the host. void usb_ep_data_out_callback (uns8
end_point, uns8 *buffer, uns16 byte_count)
Callback routine triggered when data has been sent to the device. void usb_handle_class_ctrl_read_callback ()
Callback routine for a class control read. void usb_handle_class_ctrl_write_callback (uns8 *data, uns16 count)
Callback routine for a class control write. void usb_handle_class_request_callback (setup_data_packet sdp)
Callback routine for a control transfer request that is placed on the class. void usb_SOF_callback (uns16
frame)
Callback routine triggered each time a start of frame (SOF) has been received. Variables
uns8 cdc_rx_buffer [USB_CDC_RX_BUFFER_SIZE]
uns8 cdc_rx_end = 0
uns8 cdc_rx_start = 0
uns8 cdc_tx_buffer [USB_CDC_TX_BUFFER_SIZE]
uns8 cdc_tx_end = 0
uns8 cdc_tx_start = 0
uns8 class_data [8]
uns16 current_bit_rate
long_union dte_rate
616
Detailed Description
Communication Device Class (Serial Port) USB routines
Definition in file usb_cdc_class.c.
Define Documentation
#define not_SERIAL_STATE 0xa1
Definition at line 74 of file usb_cdc_class.c.
#define req_CLEAR_COMM_FEATURE 0x04
Definition at line 68 of file usb_cdc_class.c.
#define req_GET_COMM_FEATURE 0x03
Definition at line 67 of file usb_cdc_class.c.
#define req_GET_ENCAPSULATED_RESPONSE 0x01
Definition at line 65 of file usb_cdc_class.c.
#define req_GET_LINE_CODING 0x21
Definition at line 70 of file usb_cdc_class.c.
Referenced by usb_handle_class_ctrl_read_callback(), and usb_handle_class_request_callback().
#define req_SEND_BREAK 0x23
Definition at line 72 of file usb_cdc_class.c.
#define req_SEND_ENCAPSULATED_COMMAND 0x00
Definition at line 64 of file usb_cdc_class.c.
#define req_SET_COMM_FEATURE 0x02
Definition at line 66 of file usb_cdc_class.c.
#define req_SET_CONTROL_LINE_STATE 0x22
Definition at line 71 of file usb_cdc_class.c.
617
Referenced by usb_handle_class_request_callback().
#define req_SET_LINE_CODING 0x20
Definition at line 69 of file usb_cdc_class.c.
Referenced by usb_handle_class_ctrl_write_callback(), and usb_handle_class_request_callback().
Function Documentation
uns8 usb_cdc_getc ()
Receive a character from the USB serial port. If a character has not been received, this routine will
wait indefinately.
Returns:
Byte from the receive buffer.
Definition at line 371 of file usb_cdc_class.c.
References cdc_rx_buffer, cdc_rx_end, cdc_rx_start, end_crit_sec, start_crit_sec, and uns8.
void usb_cdc_handle_tx ()
Generally only used internally, this routine will attempt to place any characters in the transmit queue
into the USB buffers. It will fail gracefully if the USB buffer is already owned by the SIE.
Definition at line 392 of file usb_cdc_class.c.
References buffer_descriptor::addr, BC8, BC9, BSTALL, cdc_tx_buffer, cdc_tx_end, cdc_tx_start,
buffer_descriptor::count, DTS, DTSEN, end_crit_sec, ep_in_bd_location, ep_in_buffer_location,
ep_in_buffer_size, INCDIS, KEN, platform_leds_flash(), serial_print_int(), serial_print_str(), serial_putc(),
start_crit_sec, buffer_descriptor::stat, uns16, uns8, and UOWN.
Referenced by usb_ep_data_in_callback(), and usb_SOF_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
618
void usb_cdc_print_int (uns16 i)
Print a 16 bit unsigned number in decimal to the USB virtual serial port
Parameters:
i the 16 bit number to be printed
Definition at line 491 of file usb_cdc_class.c.
References uns8, and usb_cdc_putc().
Here is the call graph for this function:
void usb_cdc_print_str (char * str)
Send a null terminated string out the virtual serial port
Parameters:
str the string to be sent
Definition at line 459 of file usb_cdc_class.c.
References uns8, and usb_cdc_putc().
Here is the call graph for this function:
void usb_cdc_putc (uns8 c)
Deliver a single character out the virtual serial port. This routine will add the character to the transmit
buffer. The actual buffer will be physically sent on the Start Of Frame (SOF) interrupt (each 1ms) or
on the end point interrupt - ie, when the last character or chunk of characters was sent.
Parameters:
c The 8 bit byte to be transmitted.
Definition at line 343 of file usb_cdc_class.c.
References cdc_tx_buffer, cdc_tx_end, cdc_tx_start, end_crit_sec, start_crit_sec, and uns8.
Referenced by usb_cdc_print_int(), and usb_cdc_print_str().
Here is the caller graph for this function:
uns8 usb_cdc_rx_avail ()
If one or more bytes are available in the USB serial port receive buffer, this routine will return true. If
there are no bytes available, it will return false.
Returns:
True if buffer is not empty, False if buffer is empty.
619
Definition at line 456 of file usb_cdc_class.c.
References cdc_rx_end, and cdc_rx_start.
void usb_cdc_set_dcd ()
Definition at line 335 of file usb_cdc_class.c.
void usb_cdc_set_dsr ()
Definition at line 338 of file usb_cdc_class.c.
void usb_cdc_setup ()
Configures the default DTE rate, stop bits etc.
Definition at line 483 of file usb_cdc_class.c.
References long_union::as_long, and current_bit_rate.
uns8 usb_cdc_tx_empty ()
Sometimes it is useful to see if the transmit buffer is empty, since then you can be sure your data is
well on its way. In the case of USB, this means that the data has been at least placed into the
outbound USB buffer; it's not possible to tell until after the fact if the data has actually been squirted
out the USB port.
Returns:
True if transmit buffer is empty, False if buffer still has data in it.
Definition at line 457 of file usb_cdc_class.c.
References cdc_tx_end, and cdc_tx_start.
void usb_ep_data_in_callback (uns8 end_point, uns16 byte_count)
If you have called usb_send_data to transfer data to the host, this routine will be fired once this data
has been transferred. You may send more data by using usb_send_data(). Since the current PicPack
USB library supports only single buffering, transfer speed is limited by how quickly you can refill the
buffer again. In the future, we may support double buffering (ping poing buffering) which will most
likely improve transfer speeds (to be fair, transfer performance has not been a limiting factor in tests
so far).
In order for this callback to be triggered, you must define USB_EP_DATA_CALLBACK in your
config.h
Parameters:
end_point The endpoint on which the data was transferred
byte_count The number of bytes that were actually transferred
Definition at line 323 of file usb_cdc_class.c.
References serial_print_int(), serial_print_str(), and usb_cdc_handle_tx().
Referenced by usb_handle_transaction().
Here is the call graph for this function:
620
Here is the caller graph for this function:
void usb_ep_data_out_callback (uns8 end_point, uns8 * buffer_location, uns16 byte_count)
If data is sent to the device and the endpoint is not endpoint 0 (the control transfer endpoint) then this
routine is called. Since the routine is passed the actual hardware buffer location, it is important to pull
data out of the buffer as soon as possible in order to free up the buffer to receive more data. The
buffer is re-primed only once this routine completes since PicPack only supports single-buffered
mode. In the future, we may look at supporting double buffering (ping-pong buffering) in order to be
able to receive more data even while this routine is being called.
In order for this callback to be triggered, you must define USB_EP_DATA_CALLBACK in your
config.h
Parameters:
end_point The endpoint the data was sent do
buffer_lcoation The memory location of the USB buffer where the data was received into
byte_count The number of bytes received
Definition at line 283 of file usb_cdc_class.c.
References cdc_rx_buffer, cdc_rx_end, cdc_rx_start, platform_leds_flash(), serial_print_int(), serial_print_str(),
and uns8.
Referenced by usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
621
void usb_handle_class_ctrl_read_callback ()
When a control transfer is taking place, this routine is called to indicate that a control read for the
class has taken place. Since everything in USB land is all about what has just happened, this callback
will occur after data has been transferred to the host. If you wish to send more data to the host, use
usb_send_data(), or if your control read has sent all the data required, you will need to indicate that
the state has changed by setting the control_mode variable to
cm_CTRL_READ_AWAITING_STATUS. This will indicate to the stack that it should now wait for
the status packet before completing the control transfer.
To allow this callback to trigger, ensure you define USB_CALLBACK_ON_CLASS_CTRL in your
config.h
Definition at line 268 of file usb_cdc_class.c.
References setup_data_packet::bRequest, cm_CTRL_READ_AWAITING_STATUS, control_mode,
req_GET_LINE_CODING, serial_print_int(), serial_print_str(), and usb_sdp.
Here is the call graph for this function:
void usb_handle_class_ctrl_write_callback (uns8 * data, uns16 count)
When a control transfer is taking place, this routine is called to indicate that a control write for the
class has taken place. Since everything in USB land is all about what has just happened, this callback
will occur after data has been received by the device. If you expect more data from the host, it will
arrive in due course since endpoint 0 will be primed for more data automatically. If you have received
all the data from the host, you will need to set the control_mode state variable to
cm_CTRL_WRITE_SENDING_STATUS and then actually send the status by calling
usb_send_status_ack(). Once the status has actually been sent, the control_mode state will
automatically change to cm_IDLE to indicate the transfer has completed.
To allow this callback to trigger, ensure you define USB_CALLBACK_ON_CLASS_CTRL in your
config.h
Definition at line 168 of file usb_cdc_class.c.
References long_union::as_byte_array, long_union::as_long, setup_data_packet::bRequest, class_data,
cm_CTRL_WRITE_SENDING_STATUS, control_mode, current_bit_rate, line_coding::data_bits,
line_coding::dte_rate, line_coding::parity, platform_leds_flash(), req_SET_LINE_CODING, serial_print_int(),
serial_print_int_hex(), serial_print_str(), serial_putc(), serial_setup(), serial_tx_empty(), serial_tx_isr(),
line_coding::stop_bits, usb_sdp, and usb_send_status_ack.
Here is the call graph for this function:
622
void usb_handle_class_request_callback (setup_data_packet sdp)
After receiving a setup packet, where the request is placed on the class, this routine is called. In
usb_handle_class_request_callback, you can set up ready for the data stage of the control transfer.
The direction of the data stage can be determined by examining test_bit(sdp.bRequest,
DATA_STAGE_DIR) although generally it appears to be obvious from the request. The request is
stored in sdp.bRequest.
Typically, if it is a control read transfer (that is, it is a request by the host for data), then you will need
to move the control_mode state variable to cm_CTRL_READ_DATA_STAGE_CLASS and send
data using usb_send_data(). If you only intend to send one packet, you can immediately move the
control_mode state variable to cm_CTRL_READ_AWAITING_STATUS to indicate you are waiting
for the status to arrive. You could wait for the usb_handle_class_ctrl_read callback and do it (move to
cm_CTROL_READ_AWAITING_STATUS) but the PicPack USB stack can handle the control read
event for you if you've already switched states.
If it is a control write transfer (that is, it is a request by the host to send data to the device), then you
will need to move the control_mode state variable to cm_CTRL_WRITE_DATA_STAGE_CLASS.
Then, the usb_handle_class_ctrl_write will be fired when data is received by the device in the data
stage.
To allow this callback to trigger, ensure you define USB_CALLBACK_ON_CLASS_CTRL in your
config.h
Definition at line 112 of file usb_cdc_class.c.
References long_union::as_byte_array, setup_data_packet::bRequest,
cm_CTRL_READ_AWAITING_STATUS, cm_CTRL_READ_DATA_STAGE_CLASS,
623
cm_CTRL_WRITE_DATA_STAGE_CLASS, cm_CTRL_WRITE_SENDING_STATUS, control_mode,
line_coding::data_bits, line_coding::dte_rate, line_coding::parity, req_GET_LINE_CODING,
req_SET_CONTROL_LINE_STATE, req_SET_LINE_CODING, serial_print_int(), serial_print_int_hex(),
serial_print_str(), serial_putc(), line_coding::stop_bits, uns8, usb_send_data(), usb_send_status_ack,
setup_data_packet::wLength, and setup_data_packet::wValue.
Here is the call graph for this function:
void usb_SOF_callback (uns16 frame)
Frames in USB occur each 1ms. A SOF packet is sent to each device at the start of each frame. This is
a really neat way of getting a 1ms timer without any further work.
Parameters:
frame The frame number. Frames will wrap at 65535.
Definition at line 478 of file usb_cdc_class.c.
References usb_cdc_handle_tx().
Referenced by usb_handle_isr().
Here is the call graph for this function:
Here is the caller graph for this function:
624
Variable Documentation
uns8 cdc_rx_buffer[USB_CDC_RX_BUFFER_SIZE]
Receive fifo
Definition at line 102 of file usb_cdc_class.c.
Referenced by usb_cdc_getc(), and usb_ep_data_out_callback().
uns8 cdc_rx_end = 0
Receive fifo end point
Definition at line 106 of file usb_cdc_class.c.
Referenced by usb_cdc_getc(), usb_cdc_rx_avail(), and usb_ep_data_out_callback().
uns8 cdc_rx_start = 0
Receive fifo start point
Definition at line 104 of file usb_cdc_class.c.
Referenced by usb_cdc_getc(), usb_cdc_rx_avail(), and usb_ep_data_out_callback().
uns8 cdc_tx_buffer[USB_CDC_TX_BUFFER_SIZE]
Transmit fifo
Definition at line 95 of file usb_cdc_class.c.
Referenced by usb_cdc_handle_tx(), and usb_cdc_putc().
uns8 cdc_tx_end = 0
Transmit fifo end point
Definition at line 99 of file usb_cdc_class.c.
Referenced by usb_cdc_handle_tx(), usb_cdc_putc(), and usb_cdc_tx_empty().
uns8 cdc_tx_start = 0
Transmit fifo start point
Definition at line 97 of file usb_cdc_class.c.
Referenced by usb_cdc_handle_tx(), usb_cdc_putc(), and usb_cdc_tx_empty().
uns8 class_data[8]
Definition at line 109 of file usb_cdc_class.c.
Referenced by usb_handle_class_ctrl_write_callback().
uns16 current_bit_rate
Definition at line 91 of file usb_cdc_class.c.
Referenced by usb_cdc_setup(), and usb_handle_class_ctrl_write_callback().
625
long_union dte_rate
Definition at line 92 of file usb_cdc_class.c.
usb_cdc_class.h File Reference
USB Communications Device Class (Serial Port) routines. This graph shows which files directly or indirectly include this file:
Functions
uns8 usb_cdc_getc ()
Retrieve a received character from the USB serial port. void usb_cdc_handle_tx ()
Transmit any buffered characters over ther USB virtual serial port. void usb_cdc_print_int (uns16 i)
Print a 16 bit number to the USB virtual serial port. void usb_cdc_print_str (char *str)
Print a string out to the USB virtual serial port. void usb_cdc_putc (uns8 c)
Sends a single character to the USB serial port. uns8 usb_cdc_rx_avail ()
Check to see if a character is available in the receive buffer. void usb_cdc_setup ()
Set up data structures ready for USB CDC use. uns8 usb_cdc_tx_empty ()
Check to see if the transmit buffer is empty.
Detailed Description
Definition in file usb_cdc_class.h.
Function Documentation
uns8 usb_cdc_getc ()
Receive a character from the USB serial port. If a character has not been received, this routine will
wait indefinately.
Returns:
Byte from the receive buffer.
Definition at line 371 of file usb_cdc_class.c.
References cdc_rx_buffer, cdc_rx_end, cdc_rx_start, end_crit_sec, start_crit_sec, and uns8.
626
void usb_cdc_handle_tx ()
Generally only used internally, this routine will attempt to place any characters in the transmit queue
into the USB buffers. It will fail gracefully if the USB buffer is already owned by the SIE.
Definition at line 392 of file usb_cdc_class.c.
References buffer_descriptor::addr, BC8, BC9, BSTALL, cdc_tx_buffer, cdc_tx_end, cdc_tx_start,
buffer_descriptor::count, DTS, DTSEN, end_crit_sec, ep_in_bd_location, ep_in_buffer_location,
ep_in_buffer_size, INCDIS, KEN, platform_leds_flash(), serial_print_int(), serial_print_str(), serial_putc(),
start_crit_sec, buffer_descriptor::stat, uns16, uns8, and UOWN.
Referenced by usb_ep_data_in_callback(), and usb_SOF_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
void usb_cdc_print_int (uns16 i)
Print a 16 bit unsigned number in decimal to the USB virtual serial port
Parameters:
i the 16 bit number to be printed
Definition at line 491 of file usb_cdc_class.c.
References uns8, and usb_cdc_putc().
Here is the call graph for this function:
void usb_cdc_print_str (char * str)
Send a null terminated string out the virtual serial port
Parameters:
str the string to be sent
Definition at line 459 of file usb_cdc_class.c.
627
References uns8, and usb_cdc_putc().
Here is the call graph for this function:
void usb_cdc_putc (uns8 c)
Deliver a single character out the virtual serial port. This routine will add the character to the transmit
buffer. The actual buffer will be physically sent on the Start Of Frame (SOF) interrupt (each 1ms) or
on the end point interrupt - ie, when the last character or chunk of characters was sent.
Parameters:
c The 8 bit byte to be transmitted.
Definition at line 343 of file usb_cdc_class.c.
References cdc_tx_buffer, cdc_tx_end, cdc_tx_start, end_crit_sec, start_crit_sec, and uns8.
Referenced by usb_cdc_print_int(), and usb_cdc_print_str().
Here is the caller graph for this function:
uns8 usb_cdc_rx_avail ()
If one or more bytes are available in the USB serial port receive buffer, this routine will return true. If
there are no bytes available, it will return false.
Returns:
True if buffer is not empty, False if buffer is empty.
Definition at line 456 of file usb_cdc_class.c.
References cdc_rx_end, and cdc_rx_start.
void usb_cdc_setup ()
Configures the default DTE rate, stop bits etc.
Definition at line 483 of file usb_cdc_class.c.
References long_union::as_long, and current_bit_rate.
uns8 usb_cdc_tx_empty ()
Sometimes it is useful to see if the transmit buffer is empty, since then you can be sure your data is
well on its way. In the case of USB, this means that the data has been at least placed into the
outbound USB buffer; it's not possible to tell until after the fact if the data has actually been squirted
out the USB port.
Returns:
True if transmit buffer is empty, False if buffer still has data in it.
Definition at line 457 of file usb_cdc_class.c.
References cdc_tx_end, and cdc_tx_start.
628
usb_hid_class.c File Reference
Callbacks for implementing USB HID class. #include "config.h" #include "pic_usb.h" #include "pic_usb_buffer_mgt.h" #include "pic_serial.h" #include "usb_hid_class.h" #include "memory.h" Include dependency graph for usb_hid_class.c:
Functions
void usb_handle_class_ctrl_read_callback ()
Callback routine for a class control read. void usb_handle_class_ctrl_write_callback (uns8 *data, uns16 count)
Callback routine for a class control write. void usb_handle_class_request_callback (setup_data_packet sdp)
Callback routine for a control transfer request that is placed on the class.
Detailed Description
Definition in file usb_hid_class.c.
629
Function Documentation
void usb_handle_class_ctrl_read_callback ()
When a control transfer is taking place, this routine is called to indicate that a control read for the
class has taken place. Since everything in USB land is all about what has just happened, this callback
will occur after data has been transferred to the host. If you wish to send more data to the host, use
usb_send_data(), or if your control read has sent all the data required, you will need to indicate that
the state has changed by setting the control_mode variable to
cm_CTRL_READ_AWAITING_STATUS. This will indicate to the stack that it should now wait for
the status packet before completing the control transfer.
To allow this callback to trigger, ensure you define USB_CALLBACK_ON_CLASS_CTRL in your
config.h
Definition at line 54 of file usb_hid_class.c.
Referenced by usb_handle_transaction().
Here is the caller graph for this function:
void usb_handle_class_ctrl_write_callback (uns8 * data, uns16 count)
When a control transfer is taking place, this routine is called to indicate that a control write for the
class has taken place. Since everything in USB land is all about what has just happened, this callback
will occur after data has been received by the device. If you expect more data from the host, it will
arrive in due course since endpoint 0 will be primed for more data automatically. If you have received
all the data from the host, you will need to set the control_mode state variable to
cm_CTRL_WRITE_SENDING_STATUS and then actually send the status by calling
usb_send_status_ack(). Once the status has actually been sent, the control_mode state will
automatically change to cm_IDLE to indicate the transfer has completed.
To allow this callback to trigger, ensure you define USB_CALLBACK_ON_CLASS_CTRL in your
config.h
Definition at line 57 of file usb_hid_class.c.
Referenced by usb_handle_transaction().
Here is the caller graph for this function:
void usb_handle_class_request_callback (setup_data_packet sdp)
After receiving a setup packet, where the request is placed on the class, this routine is called. In
usb_handle_class_request_callback, you can set up ready for the data stage of the control transfer.
The direction of the data stage can be determined by examining test_bit(sdp.bRequest,
DATA_STAGE_DIR) although generally it appears to be obvious from the request. The request is
stored in sdp.bRequest.
Typically, if it is a control read transfer (that is, it is a request by the host for data), then you will need
to move the control_mode state variable to cm_CTRL_READ_DATA_STAGE_CLASS and send
data using usb_send_data(). If you only intend to send one packet, you can immediately move the
630
control_mode state variable to cm_CTRL_READ_AWAITING_STATUS to indicate you are waiting
for the status to arrive. You could wait for the usb_handle_class_ctrl_read callback and do it (move to
cm_CTROL_READ_AWAITING_STATUS) but the PicPack USB stack can handle the control read
event for you if you've already switched states.
If it is a control write transfer (that is, it is a request by the host to send data to the device), then you
will need to move the control_mode state variable to cm_CTRL_WRITE_DATA_STAGE_CLASS.
Then, the usb_handle_class_ctrl_write will be fired when data is received by the device in the data
stage.
To allow this callback to trigger, ensure you define USB_CALLBACK_ON_CLASS_CTRL in your
config.h
Definition at line 60 of file usb_hid_class.c.
References setup_data_packet::bRequest, req_GET_IDLE, req_GET_PROTOCOL, req_GET_REPORT,
req_SET_IDLE, req_SET_PROTOCOL, req_SET_REPORT, serial_print_int(), serial_print_str(), and
usb_stall_ep0().
Referenced by usb_handle_transaction().
Here is the call graph for this function:
Here is the caller graph for this function:
usb_hid_class.h File Reference
Helper definitions for USB HID class. This graph shows which files directly or indirectly include this file:
631
Defines
#define req_GET_IDLE 0x02
#define req_GET_PROTOCOL 0x03
#define req_GET_REPORT 0x01
#define req_SET_IDLE 0x0a
#define req_SET_PROTOCOL 0x0b
#define req_SET_REPORT 0x09
Detailed Description
Definition in file usb_hid_class.h.
Define Documentation
#define req_GET_IDLE 0x02
Definition at line 46 of file usb_hid_class.h.
Referenced by usb_handle_class_request_callback().
#define req_GET_PROTOCOL 0x03
Definition at line 47 of file usb_hid_class.h.
Referenced by usb_handle_class_request_callback().
#define req_GET_REPORT 0x01
Definition at line 45 of file usb_hid_class.h.
Referenced by usb_handle_class_request_callback().
#define req_SET_IDLE 0x0a
Definition at line 49 of file usb_hid_class.h.
Referenced by usb_handle_class_request_callback().
#define req_SET_PROTOCOL 0x0b
Definition at line 50 of file usb_hid_class.h.
Referenced by usb_handle_class_request_callback().
#define req_SET_REPORT 0x09
Definition at line 48 of file usb_hid_class.h.
632
Referenced by usb_handle_class_request_callback().
wpan.c File Reference
Wireless Personal Area Network routines. #include "wpan.h" #include "pic_utils.h" #include "pic_serial.h" #include "debug.h" Include dependency graph for wpan.c:
Defines
#define debug_on
Functions
void mrf24j40_receive_callback ()
Callback is actioned when mrf24j40 has a packet received off air. void mrf24j40_transmit_callback (uns8
status, uns8 retries, uns8 channel_busy)
Callback is actioned when mrf24j40 has finished transmitting a packet, or failed to do so. void
wpan_handle_receive ()
Handle reception of packet. void wpan_init ()
Initialise this and lower layers ready for use. void wpan_print_address (wpan_address *addr)
Print the address of the packet. void wpan_print_frame_type (uns8 frame_type)
Print information about the WPAN frame type. void wpan_print_mac_command (uns8 *data)
Debug routine that prints out the mac command type. void wpan_process ()
633
Process WPAN layer. void wpan_setup_io ()
Setup IO as requred. Variables
uns8 pkt_received = 0
uns8 receive_lost = 0
uns8 wpan_rx_buffer [50]
uns8 wpan_rx_count
Detailed Description
Definition in file wpan.c.
Define Documentation
#define debug_on
Definition at line 40 of file wpan.c.
Function Documentation
void mrf24j40_receive_callback ()
Callback indicating the mrf24j40 has a packet ready.
Definition at line 56 of file wpan.c.
References debug_int, debug_str, mrf24j40_flush_receive_buffer(), mrf24j40_receive(), pkt_received,
receive_lost, serial_putc(), wpan_rx_buffer, and wpan_rx_count.
Referenced by mrf24j40_handle_isr().
Here is the call graph for this function:
Here is the caller graph for this function:
634
void mrf24j40_transmit_callback (uns8 status, uns8 retries, uns8 channel_busy)
Callback indicating the mrf24j40 has finished the transmission sequence.
Parameters:
status Set to 0 for success or 1 for failure
retries Set to the number of retries
channel_busy Set to 1 if failure was due to the channel being busy.
Definition at line 75 of file wpan.c.
References debug_int, debug_str, and wpan_data_transmitted_callback().
Referenced by mrf24j40_handle_isr().
Here is the call graph for this function:
Here is the caller graph for this function:
void wpan_handle_receive ()
Internal routine for WPAN layer to handle the reception of a packet.
Definition at line 225 of file wpan.c.
References wpan_address::dest_address_type, wpan_address::dest_ea, wpan_address::dest_pan_id,
wpan_address::dest_sa, FRAME_TYPE_BEACON, FRAME_TYPE_DATA,
FRAME_TYPE_MAC_COMMAND, pkt_received, wpan_address::source_address_type,
wpan_address::source_ea, wpan_address::source_pan_id, wpan_address::source_sa, uns8,
WPAN_ADDR_TYPE_EXTENDED, WPAN_ADDR_TYPE_NONE, WPAN_ADDR_TYPE_SHORT,
wpan_data_received_callback(), wpan_rx_buffer, and wpan_rx_count.
Referenced by wpan_process().
Here is the call graph for this function:
Here is the caller graph for this function:
635
void wpan_init ()
Initialise underlying hardware (typically mrf24j40)
Definition at line 336 of file wpan.c.
References mrf24j40_init().
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void wpan_print_address (wpan_address * addr)
Print out the source and destination address
Definition at line 96 of file wpan.c.
References debug_str, wpan_address::dest_address_type, wpan_address::dest_ea, wpan_address::dest_pan_id,
wpan_address::dest_sa, serial_print_int_hex(), serial_print_int_hex_16bit(), serial_print_str(), serial_putc(),
wpan_address::source_address_type, wpan_address::source_ea, wpan_address::source_pan_id,
wpan_address::source_sa, uns8, WPAN_ADDR_TYPE_EXTENDED, and WPAN_ADDR_TYPE_SHORT.
Referenced by wpan_data_received_callback().
Here is the call graph for this function:
636
Here is the caller graph for this function:
void wpan_print_frame_type (uns8 frame_type)
Definition at line 148 of file wpan.c.
References FRAME_TYPE_ACK, FRAME_TYPE_BEACON, FRAME_TYPE_DATA,
FRAME_TYPE_MAC_COMMAND, and serial_print_str().
Referenced by wpan_data_received_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
void wpan_print_mac_command (uns8 * data)
Print the MAC layer command details
Definition at line 166 of file wpan.c.
References MAC_CMD_ASSOC_REQ, MAC_CMD_ASSOC_RES, MAC_CMD_BEACON_REQ,
MAC_CMD_COORD_REALIGN, MAC_CMD_DATA_REQ, MAC_CMD_DISASSOC,
MAC_CMD_GTS_REQ, MAC_CMD_ORPHAN, MAC_CMD_PAN_ID_CONFLICT, serial_print_int_hex(),
serial_print_str(), serial_putc(), and uns8.
Here is the call graph for this function:
637
void wpan_process ()
Call wpan_process() regularly to handle events at the WPAN layer. Typically this includes handling
any received packets, processing them, and handing up to a higher layer.
Definition at line 214 of file wpan.c.
References pkt_received, and wpan_handle_receive().
Here is the call graph for this function:
void wpan_setup_io ()
Set up ports and pins for WPAN use
Definition at line 332 of file wpan.c.
References mrf24j40_setup_io().
Referenced by its1_setup_io(), and its2_setup_io().
Here is the call graph for this function:
Here is the caller graph for this function:
Variable Documentation
uns8 pkt_received = 0
Definition at line 53 of file wpan.c.
Referenced by mrf24j40_receive_callback(), wpan_handle_receive(), and wpan_process().
uns8 receive_lost = 0
638
Definition at line 51 of file wpan.c.
Referenced by mrf24j40_receive_callback().
uns8 wpan_rx_buffer[50]
Definition at line 49 of file wpan.c.
Referenced by mrf24j40_receive_callback(), and wpan_handle_receive().
uns8 wpan_rx_count
Definition at line 50 of file wpan.c.
Referenced by mrf24j40_receive_callback(), and wpan_handle_receive().
wpan.h File Reference
Wireless Personal Area Network routines. #include "pic_utils.h" #include "config.h" #include "mrf24j40.h" #include "spi_hw.h" Include dependency graph for wpan.h:
This graph shows which files directly or indirectly include this file:
639
Data Structures
struct wpan_address
Defines
#define FRAME_TYPE_ACK 0b010
#define FRAME_TYPE_BEACON 0b000
#define FRAME_TYPE_DATA 0b001
#define FRAME_TYPE_MAC_COMMAND 0b011
#define MAC_CMD_ASSOC_REQ 0x01
#define MAC_CMD_ASSOC_RES 0x02
#define MAC_CMD_BEACON_REQ 0x07
#define MAC_CMD_COORD_REALIGN 0x08
#define MAC_CMD_DATA_REQ 0x04
#define MAC_CMD_DISASSOC 0x03
#define MAC_CMD_GTS_REQ 0x09
#define MAC_CMD_ORPHAN 0x06
#define MAC_CMD_PAN_ID_CONFLICT 0x05
#define WPAN_ADDR_TYPE_EXTENDED 0b00000011
#define WPAN_ADDR_TYPE_NONE 0b00000000
#define WPAN_ADDR_TYPE_SHORT 0b00000010
Functions
void wpan_data_received_callback (wpan_address *addr, uns8 *data, uns8 data_size, uns8 lqi, uns8 rssi)
Callback for data received. void wpan_data_transmitted_callback (uns8 status, uns8 retries, uns8 channel_busy)
Callback for data transmitted. void wpan_handle_receive ()
Handle reception of packet. void wpan_init ()
Initialise this and lower layers ready for use. void wpan_print_address (wpan_address *addr)
Print the address of the packet. void wpan_print_frame_type (uns8 frame_type)
Print information about the WPAN frame type. void wpan_print_mac_command (uns8 *data)
Debug routine that prints out the mac command type. void wpan_process ()
Process WPAN layer. void wpan_setup_io ()
Setup IO as requred. Variables
uns8 pkt_received
Detailed Description
Put this in your config.h
// ------------------------
// WPAN (802.15.4) wireless
// ------------------------
640
#define WPAN_USE_MRF24J50
// ------------------------
Definition in file wpan.h.
Define Documentation
#define FRAME_TYPE_ACK 0b010
Definition at line 79 of file wpan.h.
Referenced by wpan_print_frame_type().
#define FRAME_TYPE_BEACON 0b000
Definition at line 77 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_frame_type().
#define FRAME_TYPE_DATA 0b001
Definition at line 78 of file wpan.h.
Referenced by its2_transmit(), its_transmit_to_ea(), its_transmit_to_sa(), wpan_handle_receive(), and
wpan_print_frame_type().
#define FRAME_TYPE_MAC_COMMAND 0b011
Definition at line 80 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_frame_type().
#define MAC_CMD_ASSOC_REQ 0x01
Definition at line 67 of file wpan.h.
Referenced by wpan_print_mac_command().
#define MAC_CMD_ASSOC_RES 0x02
Definition at line 68 of file wpan.h.
Referenced by wpan_print_mac_command().
#define MAC_CMD_BEACON_REQ 0x07
Definition at line 73 of file wpan.h.
Referenced by wpan_print_mac_command().
641
#define MAC_CMD_COORD_REALIGN 0x08
Definition at line 74 of file wpan.h.
Referenced by wpan_print_mac_command().
#define MAC_CMD_DATA_REQ 0x04
Definition at line 70 of file wpan.h.
Referenced by wpan_print_mac_command().
#define MAC_CMD_DISASSOC 0x03
Definition at line 69 of file wpan.h.
Referenced by wpan_print_mac_command().
#define MAC_CMD_GTS_REQ 0x09
Definition at line 75 of file wpan.h.
Referenced by wpan_print_mac_command().
#define MAC_CMD_ORPHAN 0x06
Definition at line 72 of file wpan.h.
Referenced by wpan_print_mac_command().
#define MAC_CMD_PAN_ID_CONFLICT 0x05
Definition at line 71 of file wpan.h.
Referenced by wpan_print_mac_command().
#define WPAN_ADDR_TYPE_EXTENDED 0b00000011
Definition at line 63 of file wpan.h.
Referenced by wpan_handle_receive(), and wpan_print_address().
#define WPAN_ADDR_TYPE_NONE 0b00000000
Definition at line 65 of file wpan.h.
Referenced by wpan_handle_receive().
#define WPAN_ADDR_TYPE_SHORT 0b00000010
Definition at line 64 of file wpan.h.
642
Referenced by wpan_handle_receive(), and wpan_print_address().
Function Documentation
void wpan_data_received_callback (wpan_address * addr, uns8 * data, uns8 data_size, uns8 lqi, uns8 rssi)
After the packet has been processed and the address extracted, it is delivered to the callback function.
void wpan_data_transmitted_callback (uns8 status, uns8 retries, uns8 channel_busy)
Once the lower layers have attempted to transmit the packet, the results will be presented to the
callback.
Parameters:
status Set to 0 for success or 1 for failure
retries Set to the number of retries
channel_busy Set to 1 if failure was due to the channel being busy.
Definition at line 804 of file its_mode2.c.
References its2_transmitting.
Referenced by mrf24j40_transmit_callback().
Here is the caller graph for this function:
void wpan_handle_receive ()
Internal routine for WPAN layer to handle the reception of a packet.
Definition at line 225 of file wpan.c.
References wpan_address::dest_address_type, wpan_address::dest_ea, wpan_address::dest_pan_id,
wpan_address::dest_sa, FRAME_TYPE_BEACON, FRAME_TYPE_DATA,
FRAME_TYPE_MAC_COMMAND, pkt_received, wpan_address::source_address_type,
wpan_address::source_ea, wpan_address::source_pan_id, wpan_address::source_sa, uns8,
WPAN_ADDR_TYPE_EXTENDED, WPAN_ADDR_TYPE_NONE, WPAN_ADDR_TYPE_SHORT,
wpan_data_received_callback(), wpan_rx_buffer, and wpan_rx_count.
Referenced by wpan_process().
Here is the call graph for this function:
643
Here is the caller graph for this function:
void wpan_init ()
Initialise underlying hardware (typically mrf24j40)
Definition at line 336 of file wpan.c.
References mrf24j40_init().
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its_init().
Here is the call graph for this function:
Here is the caller graph for this function:
void wpan_print_address (wpan_address * addr)
Print out the source and destination address
Definition at line 96 of file wpan.c.
References debug_str, wpan_address::dest_address_type, wpan_address::dest_ea, wpan_address::dest_pan_id,
wpan_address::dest_sa, serial_print_int_hex(), serial_print_int_hex_16bit(), serial_print_str(), serial_putc(),
wpan_address::source_address_type, wpan_address::source_ea, wpan_address::source_pan_id,
wpan_address::source_sa, uns8, WPAN_ADDR_TYPE_EXTENDED, and WPAN_ADDR_TYPE_SHORT.
Referenced by wpan_data_received_callback().
Here is the call graph for this function:
644
Here is the caller graph for this function:
void wpan_print_frame_type (uns8 frame_type)
Definition at line 148 of file wpan.c.
References FRAME_TYPE_ACK, FRAME_TYPE_BEACON, FRAME_TYPE_DATA,
FRAME_TYPE_MAC_COMMAND, and serial_print_str().
Referenced by wpan_data_received_callback().
Here is the call graph for this function:
Here is the caller graph for this function:
void wpan_print_mac_command (uns8 * data)
Print the MAC layer command details
Definition at line 166 of file wpan.c.
References MAC_CMD_ASSOC_REQ, MAC_CMD_ASSOC_RES, MAC_CMD_BEACON_REQ,
MAC_CMD_COORD_REALIGN, MAC_CMD_DATA_REQ, MAC_CMD_DISASSOC,
MAC_CMD_GTS_REQ, MAC_CMD_ORPHAN, MAC_CMD_PAN_ID_CONFLICT, serial_print_int_hex(),
serial_print_str(), serial_putc(), and uns8.
Here is the call graph for this function:
645
void wpan_process ()
Call wpan_process() regularly to handle events at the WPAN layer. Typically this includes handling
any received packets, processing them, and handing up to a higher layer.
Definition at line 214 of file wpan.c.
References pkt_received, and wpan_handle_receive().
Here is the call graph for this function:
void wpan_setup_io ()
Set up ports and pins for WPAN use
Definition at line 332 of file wpan.c.
References mrf24j40_setup_io().
Referenced by its1_setup_io(), and its2_setup_io().
Here is the call graph for this function:
Here is the caller graph for this function:
Variable Documentation
uns8 pkt_received
Definition at line 53 of file wpan.c.
Referenced by mrf24j40_receive_callback(), wpan_handle_receive(), and wpan_process().
646
Index
__cat4016_H
cat4016.h, 68
__ds1307_h
ds1307.h, 126
__hc4led_h
hc4led.h, 151
__i2c_h
i2c.h, 193
__lcd_h
lcd.h, 278
__m41t81s_h
m41t81s.h, 300
__pic_ubs_buffer_mgt_h
pic_usb_buffer_mgt.h, 547
__platform_heds_h
platform_leds.h, 561
__sfe_tdn_v1_h
sfe_tdn_v1.h, 568
__sht15_h
sht15.h, 575
_its1_result
its_mode1.h, 236
_its1_state
its_mode1.h, 236
_its2_result
its_mode2.h, 260
_its2_state
its_mode2.h, 260
a
rf_packet, 29
a_big_bitmap
ea_bitmaps.c, 138
ea_bitmaps.h, 140
a_bitmap
ea_bitmaps.c, 138
ea_bitmaps.h, 140
ACKTMOUT
mrf24j40_defines.h, 355
ACKTMOUT_DRPACK
mrf24j40_defines.h, 355
ACKTMOUT_MAWD0
mrf24j40_defines.h, 355
ACKTMOUT_MAWD1
mrf24j40_defines.h, 355
ACKTMOUT_MAWD2
mrf24j40_defines.h, 355
ACKTMOUT_MAWD3
mrf24j40_defines.h, 355
ACKTMOUT_MAWD4
mrf24j40_defines.h, 355
ACKTMOUT_MAWD5
mrf24j40_defines.h, 355
ACKTMOUT_MAWD6
mrf24j40_defines.h, 355
addr
buffer_descriptor, 5
its_device_info, 20
address_ch1
rf_config, 27
address_ch2
rf_config, 27
address_width
rf_config, 28
adventures_bitmap
ea_bitmaps.c, 138
ea_bitmaps.h, 140
alternate_setting
interface_descriptor, 15
aq_end
audio_queue.c, 64
aq_start
audio_queue.c, 64
ar1000.c, 37
ar1000_get_register, 38
ar1000_init, 38
ar1000_read_register, 39
ar1000_read_registers, 39
ar1000_seek, 39
ar1000_seek_more, 40
ar1000_seek_threshold, 43
ar1000_seek2, 40
ar1000_set_register, 41
ar1000_set_seek_threshold, 41
ar1000_set_volume, 41
ar1000_setup_io, 41
ar1000_test, 42
ar1000_tune, 42
ar1000_write_register, 42
ar1000_write_registers, 43
regs, 43
vol_lookup, 43
ar1000.h, 44
AR1000_CHIP_ID, 47
AR1000_DEV_ADDR, 47
AR1000_DEV_ID, 47
ar1000_get_register, 57
ar1000_init, 57
AR1000_R0, 47
AR1000_R1, 47
AR1000_R10, 47
AR1000_R11, 48
AR1000_R13, 48
AR1000_R14, 48
AR1000_R15, 48
AR1000_R2, 48
AR1000_R3, 48
647
AR1000_RBS, 48
AR1000_RDS_1, 48
AR1000_RDS_2, 48
AR1000_RDS_3, 48
AR1000_RDS_4, 48
AR1000_RDS_5, 49
AR1000_RDS_6, 49
ar1000_read_register, 58
ar1000_read_registers, 58
AR1000_RSSI, 49
ar1000_seek, 58
ar1000_seek_more, 59
ar1000_seek2, 59
ar1000_set_register, 60
ar1000_set_seek_threshold, 60
ar1000_set_volume, 60
ar1000_setup, 49
ar1000_setup_io, 60
AR1000_STATUS, 49
ar1000_test, 61
ar1000_tune, 61
ar1000_write_register, 61
ar1000_write_registers, 62
DEV_ID_MFID_0, 49
DEV_ID_MFID_1, 49
DEV_ID_MFID_10, 49
DEV_ID_MFID_11, 49
DEV_ID_MFID_2, 49
DEV_ID_MFID_3, 49
DEV_ID_MFID_4, 50
DEV_ID_MFID_5, 50
DEV_ID_MFID_6, 50
DEV_ID_MFID_7, 50
DEV_ID_MFID_8, 50
DEV_ID_MFID_9, 50
DEV_ID_VERSION_0, 50
DEV_ID_VERSION_1, 50
DEV_ID_VERSION_2, 50
DEV_ID_VERSION_3, 50
R0_ENABLE, 51
R0_INT_OSC_EN, 51
R1_DEEMP_SETTING, 53
R1_FORCE_MONO, 53
R1_HARD_MUTE_ENABLE, 53
R1_RDS_ENABLE, 53
R1_RDS_INT_ENABLE, 53
R1_SOFT_MUTE_ENABLE, 53
R1_STC_INT_ENABLE, 53
R10_SEEK_WRAP_ENABLE, 51
R11_AFC_HIGH_SIDE_b1, 51
R11_AFC_HIGH_SIDE_b2, 51
R11_AFC_INJECTION_CONTROL, 51
R11_HILO_SIDE, 51
R13_GPIO1_0, 51
R13_GPIO1_1, 51
R13_GPIO2_0, 51
R13_GPIO2_1, 51
R13_GPIO3_0, 52
R13_GPIO3_1, 52
R14_VOL2_0, 52
R14_VOL2_1, 52
R14_VOL2_2, 52
R14_VOL2_3, 52
R15_RDS_CTRL, 52
R15_RDS_MECC_0, 52
R15_RDS_MECC_1, 52
R15_RDS_STA_EN, 52
R2_CHAN_0, 53
R2_CHAN_1, 53
R2_CHAN_2, 53
R2_CHAN_3, 53
R2_CHAN_4, 54
R2_CHAN_5, 54
R2_CHAN_6, 54
R2_CHAN_7, 54
R2_CHAN_8, 54
R2_TUNE_ENABLE, 54
R3_BAND_0, 54
R3_BAND_1, 54
R3_SEEK_CHANNEL_SPACING, 54
R3_SEEK_ENABLE, 54
R3_SEEK_UP, 55
R3_SEEKTH_0, 55
R3_SEEKTH_1, 55
R3_SEEKTH_2, 55
R3_SEEKTH_3, 55
R3_SEEKTH_4, 55
R3_SEEKTH_5, 55
R3_SEEKTH_6, 55
R3_VOL_0, 55
R3_VOL_1, 55
R3_VOL_2, 56
R3_VOL_3, 56
STATUS_BIT_2, 56
STATUS_CHAN_0, 56
STATUS_CHAN_1, 56
STATUS_CHAN_2, 56
STATUS_CHAN_3, 56
STATUS_CHAN_4, 56
STATUS_CHAN_5, 56
STATUS_CHAN_6, 56
STATUS_CHAN_7, 56
STATUS_CHAN_8, 57
STATUS_RDS_DATA_READY, 57
STATUS_SEEK_FAIL, 57
STATUS_SEEK_TUNE_COMPLETE, 57
STATUS_STEREO, 57
AR1000_CHIP_ID
ar1000.h, 47
AR1000_DEV_ADDR
ar1000.h, 47
AR1000_DEV_ID
648
ar1000.h, 47
ar1000_get_register
ar1000.c, 38
ar1000.h, 57
ar1000_init
ar1000.c, 38
ar1000.h, 57
AR1000_R0
ar1000.h, 47
AR1000_R1
ar1000.h, 47
AR1000_R10
ar1000.h, 47
AR1000_R11
ar1000.h, 48
AR1000_R13
ar1000.h, 48
AR1000_R14
ar1000.h, 48
AR1000_R15
ar1000.h, 48
AR1000_R2
ar1000.h, 48
AR1000_R3
ar1000.h, 48
AR1000_RBS
ar1000.h, 48
AR1000_RDS_1
ar1000.h, 48
AR1000_RDS_2
ar1000.h, 48
AR1000_RDS_3
ar1000.h, 48
AR1000_RDS_4
ar1000.h, 48
AR1000_RDS_5
ar1000.h, 49
AR1000_RDS_6
ar1000.h, 49
ar1000_read_register
ar1000.c, 39
ar1000.h, 58
ar1000_read_registers
ar1000.c, 39
ar1000.h, 58
AR1000_RSSI
ar1000.h, 49
ar1000_seek
ar1000.c, 39
ar1000.h, 58
ar1000_seek_more
ar1000.c, 40
ar1000.h, 59
ar1000_seek_threshold
ar1000.c, 43
ar1000_seek2
ar1000.c, 40
ar1000.h, 59
ar1000_set_register
ar1000.c, 41
ar1000.h, 60
ar1000_set_seek_threshold
ar1000.c, 41
ar1000.h, 60
ar1000_set_volume
ar1000.c, 41
ar1000.h, 60
ar1000_setup
ar1000.h, 49
ar1000_setup_io
ar1000.c, 41
ar1000.h, 60
AR1000_STATUS
ar1000.h, 49
ar1000_test
ar1000.c, 42
ar1000.h, 61
ar1000_tune
ar1000.c, 42
ar1000.h, 61
ar1000_write_register
ar1000.c, 42
ar1000.h, 61
ar1000_write_registers
ar1000.c, 43
ar1000.h, 62
as_byte_array
long_union, 23
as_long
long_union, 23
ASSOEADR0
mrf24j40_defines.h, 356
ASSOEADR1
mrf24j40_defines.h, 356
ASSOEADR2
mrf24j40_defines.h, 356
ASSOEADR3
mrf24j40_defines.h, 356
ASSOEADR4
mrf24j40_defines.h, 356
ASSOEADR5
mrf24j40_defines.h, 356
ASSOEADR6
mrf24j40_defines.h, 356
ASSOEADR7
mrf24j40_defines.h, 356
ASSOSADR0
mrf24j40_defines.h, 356
ASSOSADR1
mrf24j40_defines.h, 356
attributes
configuration_descriptor, 9
649
endpoint_descriptor, 13
audio_playing
audio_queue.c, 64
audio_queue.c, 62
aq_end, 64
aq_start, 64
audio_playing, 64
audio_queue_add, 63
audio_queue_clear, 63
audio_queue_empty, 63
audio_queue_fifo, 64
audio_queue_process, 63
audio_queue.h, 64
audio_queue_add, 65
audio_queue_clear, 66
audio_queue_empty, 66
audio_queue_process, 66
audio_queue_add
audio_queue.c, 63
audio_queue.h, 65
audio_queue_clear
audio_queue.c, 63
audio_queue.h, 66
audio_queue_empty
audio_queue.c, 63
audio_queue.h, 66
audio_queue_fifo
audio_queue.c, 64
audio_queue_process
audio_queue.c, 63
audio_queue.h, 66
BBREG0
mrf24j40_defines.h, 356
BBREG0_TURBO
mrf24j40_defines.h, 357
BBREG1
mrf24j40_defines.h, 357
BBREG1_RXDECINV
mrf24j40_defines.h, 357
BBREG2
mrf24j40_defines.h, 357
BBREG2_CCACSTH0
mrf24j40_defines.h, 357
BBREG2_CCACSTH1
mrf24j40_defines.h, 357
BBREG2_CCACSTH2
mrf24j40_defines.h, 357
BBREG2_CCACSTH3
mrf24j40_defines.h, 357
BBREG2_CCAMODE0
mrf24j40_defines.h, 357
BBREG2_CCAMODE1
mrf24j40_defines.h, 357
BBREG3
mrf24j40_defines.h, 358
BBREG3_PREDETTH0
mrf24j40_defines.h, 358
BBREG3_PREDETTH1
mrf24j40_defines.h, 358
BBREG3_PREDETTH2
mrf24j40_defines.h, 358
BBREG3_PREVALIDTH0
mrf24j40_defines.h, 358
BBREG3_PREVALIDTH1
mrf24j40_defines.h, 358
BBREG3_PREVALIDTH2
mrf24j40_defines.h, 358
BBREG3_PREVALIDTH3
mrf24j40_defines.h, 358
BBREG4
mrf24j40_defines.h, 358
BBREG4_CSTH0
mrf24j40_defines.h, 358
BBREG4_CSTH1
mrf24j40_defines.h, 358
BBREG4_CSTH2
mrf24j40_defines.h, 359
BBREG4_PRECNT0
mrf24j40_defines.h, 359
BBREG4_PRECNT1
mrf24j40_defines.h, 359
BBREG4_PRECNT2
mrf24j40_defines.h, 359
BBREG6
mrf24j40_defines.h, 359
BBREG6_RSSIMODE1
mrf24j40_defines.h, 359
BBREG6_RSSIMODE2
mrf24j40_defines.h, 359
BBREG6_RSSIRDY
mrf24j40_defines.h, 359
BC8
pic_usb.h, 525
BC9
pic_usb.h, 526
bcd_to_dec
ds1307.c, 118
m41t81s.c, 288
bd0in
pic_usb_buffer_mgt.c, 542
pic_usb_buffer_mgt.h, 547
bd0out_e
pic_usb_buffer_mgt.c, 542
pic_usb_buffer_mgt.h, 547
bd0out_o
pic_usb_buffer_mgt.c, 542
pic_usb_buffer_mgt.h, 547
bd1in
pic_usb_buffer_mgt.c, 542
pic_usb_buffer_mgt.h, 547
bd1out
pic_usb_buffer_mgt.c, 543
650
pic_usb_buffer_mgt.h, 548
bd2in
pic_usb_buffer_mgt.c, 543
pic_usb_buffer_mgt.h, 548
bd2out
pic_usb_buffer_mgt.c, 543
pic_usb_buffer_mgt.h, 548
bd3in
pic_usb_buffer_mgt.c, 543
pic_usb_buffer_mgt.h, 548
bd3out
pic_usb_buffer_mgt.c, 543
pic_usb_buffer_mgt.h, 548
bd4in
pic_usb_buffer_mgt.c, 543
pic_usb_buffer_mgt.h, 548
bd4out
pic_usb_buffer_mgt.c, 543
pic_usb_buffer_mgt.h, 548
bd5in
pic_usb_buffer_mgt.c, 543
pic_usb_buffer_mgt.h, 548
bd5out
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 548
bd6in
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 549
bd6out
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 549
bd7in
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 549
bd7out
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 549
bin2Hex
pic_serial.c, 467
bmRequestType
setup_data_packet, 35
BOTTOM_LEFT
draw.h, 84
bRequest
setup_data_packet, 35
BRGH_HIGH_SPEED
pic_serial.h, 481
BRGH_LOW_SPEED
pic_serial.h, 481
bright_count
drv_ea_ldp6416.c, 104
drv_ea_ldp6432.c, 108
drv_ea_ldp8008.c, 111
bright_level
drv_ea_ldp6416.c, 104
drv_ea_ldp6432.c, 108
drv_ea_ldp8008.c, 111
BSTALL
pic_usb.h, 526
buffer_0_in
pic_usb_buffer_mgt.h, 549
buffer_0_out_e
pic_usb_buffer_mgt.h, 549
buffer_0_out_o
pic_usb_buffer_mgt.h, 549
buffer_byte
pic_usb.c, 520
buffer_descriptor, 4
addr, 5
count, 5
stat, 5
buffer_len
pic_term.c, 494
buffer_position
drv_ea_ldp6416.c, 104
buffer_position0
drv_ea_ldp6432.c, 108
drv_ea_ldp8008.c, 112
buffer0
drv_ea_ldp6416.c, 104
drv_ea_ldp6432.c, 108
drv_ea_ldp8008.c, 111
buffer1
drv_ea_ldp6432.c, 108
c1
ms5540.c, 406
c2
ms5540.c, 406
c3
ms5540.c, 406
c4
ms5540.c, 406
c5
ms5540.c, 406
c6
ms5540.c, 406
capabilities
CDC_ACM_functional_descriptor, 6
CDC_call_mgt_functional_descriptor, 6
CAPS_INFO1_DATE
protocol.h, 564
CAPS_INFO1_TIME
protocol.h, 564
CAPS_INPUTS_SWITCH1
protocol.h, 564
CAPS_INPUTS_SWITCH2
protocol.h, 564
CAPS_INPUTS_SWITCH3
protocol.h, 564
CAPS_INPUTS_SWITCH4
protocol.h, 564
CAPS_INPUTS_SWITCH5
651
protocol.h, 564
CAPS_INPUTS_SWITCH6
protocol.h, 564
CAPS_INPUTS_SWITCH7
protocol.h, 564
CAPS_INPUTS_SWITCH8
protocol.h, 565
CAPS_OUTPUTS_DIMMER1
protocol.h, 565
CAPS_OUTPUTS_DIMMER2
protocol.h, 565
CAPS_OUTPUTS_DIMMER3
protocol.h, 565
CAPS_OUTPUTS_DIMMER4
protocol.h, 565
CAPS_OUTPUTS_RELAY1
protocol.h, 565
CAPS_OUTPUTS_RELAY2
protocol.h, 565
CAPS_OUTPUTS_RELAY3
protocol.h, 565
CAPS_OUTPUTS_RELAY4
protocol.h, 565
CAPS_SENSOR_AIR_PRESSURE
protocol.h, 565
CAPS_SENSOR_HUMIDITY
protocol.h, 565
CAPS_SENSOR_LIGHT
protocol.h, 566
CAPS_SENSOR_PRESENCE
protocol.h, 566
CAPS_SENSOR_TEMP
protocol.h, 566
cat4016.c, 66
cat4016_enable_display, 67
cat4016_latch_data, 67
cat4016_setup_io, 67
cat4016_write_data, 67
cat4016.h, 68
__cat4016_H, 68
cat4016_enable_display, 69
cat4016_latch_data, 69
cat4016_setup_io, 69
cat4016_write_data, 69
cat4016_enable_display
cat4016.c, 67
cat4016.h, 69
cat4016_latch_data
cat4016.c, 67
cat4016.h, 69
cat4016_setup_io
cat4016.c, 67
cat4016.h, 69
cat4016_write_data
cat4016.c, 67
cat4016.h, 69
CCAEDTH
mrf24j40_defines.h, 359
CCAEDTH_CCAEDTH0
mrf24j40_defines.h, 359
CCAEDTH_CCAEDTH1
mrf24j40_defines.h, 360
CCAEDTH_CCAEDTH2
mrf24j40_defines.h, 360
CCAEDTH_CCAEDTH3
mrf24j40_defines.h, 360
CCAEDTH_CCAEDTH4
mrf24j40_defines.h, 360
CCAEDTH_CCAEDTH5
mrf24j40_defines.h, 360
CCAEDTH_CCAEDTH6
mrf24j40_defines.h, 360
CCAEDTH_CCAEDTH7
mrf24j40_defines.h, 360
CDC_ACM_functional_descriptor, 5
capabilities, 6
descriptor_subtype, 6
descriptor_type, 6
length, 6
CDC_call_mgt_functional_descriptor, 6
capabilities, 6
data_interface, 7
descriptor_subtype, 7
descriptor_type, 7
length, 7
CDC_header_functional_descriptor, 7
CDC_version, 7
descriptor_subtype, 8
descriptor_type, 8
length, 8
cdc_rx_buffer
usb_cdc_class.c, 624
cdc_rx_end
usb_cdc_class.c, 624
cdc_rx_start
usb_cdc_class.c, 624
cdc_tx_buffer
usb_cdc_class.c, 624
cdc_tx_end
usb_cdc_class.c, 624
cdc_tx_start
usb_cdc_class.c, 624
CDC_union_functional_descriptor, 8
descriptor_subtype, 8
descriptor_type, 8
length, 9
master_interface, 9
slave_interface, 9
CDC_version
CDC_header_functional_descriptor, 7
change_pin
pic_utils.h, 551
652
change_pin_var
pic_utils.h, 552
channel
its_mode1.c, 234
its_mode2.c, 252
rf_config, 28
check_byte
rf_packet_det, 30
CHECK_HUMD
sht15.c, 569
CHECK_STAT
sht15.c, 569
CHECK_TEMP
sht15.c, 570
class_data
usb_cdc_class.c, 624
class_descriptor_length
hid_descriptor, 14
class_descriptor_type
hid_descriptor, 14
clear_pin
pic_utils.h, 552
clear_pin_var
pic_utils.h, 552
cm_CTRL_READ_AWAITING_STATUS
pic_usb.h, 531
cm_CTRL_READ_DATA_STAGE
pic_usb.h, 531
cm_CTRL_READ_DATA_STAGE_CLASS
pic_usb.h, 531
cm_CTRL_WRITE_DATA_STAGE
pic_usb.h, 531
cm_CTRL_WRITE_DATA_STAGE_CLASS
pic_usb.h, 531
cm_CTRL_WRITE_SENDING_STATUS
pic_usb.h, 531
cm_IDLE
pic_usb.h, 531
config_bits.h, 69
CONFIG_CRCO
pic_rf_24l01.h, 454
CONFIG_EN_CRC
pic_rf_24l01.h, 454
CONFIG_MASK_MAX_RT
pic_rf_24l01.h, 454
CONFIG_MASK_RX_DR
pic_rf_24l01.h, 454
CONFIG_MASK_TX_DS
pic_rf_24l01.h, 454
CONFIG_PRIM_RX
pic_rf_24l01.h, 454
CONFIG_PWR_UP
pic_rf_24l01.h, 454
configuration_descriptor, 9
attributes, 9
configuration_string_id, 10
configuration_value, 10
descriptor_type, 10
length, 10
max_power, 10
num_interfaces, 10
total_length, 10
configuration_string_id
configuration_descriptor, 10
configuration_value
configuration_descriptor, 10
control_mode
pic_usb.c, 520
pic_usb.h, 540
control_mode_type
pic_usb.h, 531
controller_handle
its_mode1.c, 234
its_mode2.c, 253
convert.c, 70
convert_to_dec1, 70
convert_to_dec2, 70
convert_to_dec2b, 71
temp_to_str, 71
convert.h, 71
convert_to_dec1, 72
convert_to_dec2, 72
convert_to_dec2b, 72
temp_to_str, 72
convert_to_dec1
convert.c, 70
convert.h, 72
convert_to_dec2
convert.c, 70
convert.h, 72
convert_to_dec2b
convert.c, 71
convert.h, 72
count
buffer_descriptor, 5
country_code
hid_descriptor, 14
crystal
rf_config, 28
current_bit_rate
usb_cdc_class.c, 624
current_buffer
drv_ea_ldp6416.c, 105
current_channel
mrf24j40.c, 329
current_row
drv_ea_ldp6416.c, 105
drv_ea_ldp6432.c, 108
drv_ea_ldp8008.c, 112
d
rf_packet, 29
data
653
queued_item, 25
data_bits
line_coding, 22
data_interface
CDC_call_mgt_functional_descriptor, 7
data_length
queued_item, 25
data_sequence_number
mrf24j40.c, 329
DATA_STAGE_DIR
pic_usb.h, 526
debug.h, 72
debug_int, 73
debug_int_hex, 73
debug_int_hex_16bit, 73
debug_nl, 74
debug_putc, 74
debug_spc, 74
debug_str, 74
debug_var, 74
debug_int
debug.h, 73
debug_int_hex
debug.h, 73
debug_int_hex_16bit
debug.h, 73
debug_module
its_mode2.c, 253
its_mode2.h, 270
debug_nl
debug.h, 74
debug_on
wpan.c, 633
debug_putc
debug.h, 74
debug_spc
debug.h, 74
debug_str
debug.h, 74
debug_var
debug.h, 74
dec_to_bcd
ds1307.c, 119
m41t81s.c, 288
DELAY_AMOUNT
i2c.c, 177
delivery_bd
pic_usb.c, 520
delivery_buffer
pic_usb.c, 520
delivery_buffer_size
pic_usb.c, 520
delivery_bytes_max_send
pic_usb.c, 520
delivery_bytes_sent
pic_usb.c, 521
delivery_bytes_to_send
pic_usb.c, 521
delivery_ptr
pic_usb.c, 521
descriptor_subtype
CDC_ACM_functional_descriptor, 6
CDC_call_mgt_functional_descriptor, 7
CDC_header_functional_descriptor, 8
CDC_union_functional_descriptor, 8
descriptor_type
CDC_ACM_functional_descriptor, 6
CDC_call_mgt_functional_descriptor, 7
CDC_header_functional_descriptor, 8
CDC_union_functional_descriptor, 8
configuration_descriptor, 10
device_descriptor, 11
endpoint_descriptor, 13
hid_descriptor, 14
interface_descriptor, 15
dest_addr
rf_packet_det, 30
dest_address_type
wpan_address, 36
dest_device_handle
queued_item, 25
dest_ea
wpan_address, 36
dest_its_device_id
queued_item, 25
dest_pan_id
wpan_address, 36
dest_sa
wpan_address, 36
DEV_ID_MFID_0
ar1000.h, 49
DEV_ID_MFID_1
ar1000.h, 49
DEV_ID_MFID_10
ar1000.h, 49
DEV_ID_MFID_11
ar1000.h, 49
DEV_ID_MFID_2
ar1000.h, 49
DEV_ID_MFID_3
ar1000.h, 49
DEV_ID_MFID_4
ar1000.h, 50
DEV_ID_MFID_5
ar1000.h, 50
DEV_ID_MFID_6
ar1000.h, 50
DEV_ID_MFID_7
ar1000.h, 50
DEV_ID_MFID_8
ar1000.h, 50
DEV_ID_MFID_9
654
ar1000.h, 50
DEV_ID_VERSION_0
ar1000.h, 50
DEV_ID_VERSION_1
ar1000.h, 50
DEV_ID_VERSION_2
ar1000.h, 50
DEV_ID_VERSION_3
ar1000.h, 50
device_class
device_descriptor, 11
device_descriptor, 10
descriptor_type, 11
device_class, 11
device_protocol, 11
device_release, 11
device_subclass, 11
length, 11
manufacturer_string_id, 11
max_packet_size_ep0, 12
num_configurations, 12
product_id, 12
product_string_id, 12
serial_string_id, 12
usb_version, 12
vendor_id, 12
device_protocol
device_descriptor, 11
device_release
device_descriptor, 11
device_subclass
device_descriptor, 11
draw.c, 74
draw_bitmap, 76
draw_circle, 76
draw_circle_lines, 77
draw_circle_points, 77
draw_circle_points2, 78
draw_circle2, 77
draw_clear_screen, 78
draw_filled_circle, 78
draw_get_pixel, 78
draw_init, 78
draw_length_str, 79
draw_line, 79
draw_print_buffer, 79
draw_print_str, 80
draw_rect, 80
draw_set_pixel, 80
draw_setup_io, 81
FONT_FIRST_CHAR, 76
FONT_HEIGHT, 76
FONT_LAST_CHAR, 76
PicPack5x7_bitmap_0, 82
PicPack5x7_bitmap_1, 82
PicPack5x7_index, 82
draw.h, 82
BOTTOM_LEFT, 84
draw_bitmap, 85
draw_circle, 85
draw_circle2, 85
draw_clear_screen, 86
draw_get_pixel, 86
draw_init, 86
draw_length_str, 86
draw_line, 86
draw_paint, 84
DRAW_PIXELS_PER_BYTE, 84
draw_print_buffer, 87
draw_print_str, 87
draw_rect, 88
draw_set_display_brightness, 84
draw_set_pixel, 88
draw_setup_io, 89
drv_init, 89
drv_paint, 90
drv_print_buffer, 90
drv_refresh, 91
drv_set_display_brightness, 91
drv_setup, 84
drv_setup_io, 91
HORIZONTAL, 84
TOP_LEFT, 85
VERTICAL, 85
draw_bitmap
draw.c, 76
draw.h, 85
DRAW_BOTTOM_PIXEL_Y
draw_tests.h, 100
draw_buffer0
draw_screen_buffer.c, 95
draw_screen_buffer.h, 96
DRAW_BUFFERS
draw_screen_buffer.h, 96
draw_circle
draw.c, 76
draw.h, 85
draw_circle_lines
draw.c, 77
draw_circle_points
draw.c, 77
draw_circle_points2
draw.c, 78
draw_circle2
draw.c, 77
draw.h, 85
draw_clear_screen
draw.c, 78
draw.h, 86
draw_filled_circle
draw.c, 78
draw_font_picpack_5x7.c, 92
655
FONT_FIRST_CHAR, 93
FONT_LAST_CHAR, 93
PicPack5x7_bitmap_0, 93
PicPack5x7_bitmap_1, 93
PicPack5x7_index, 93
draw_get_pixel
draw.c, 78
draw.h, 86
draw_init
draw.c, 78
draw.h, 86
draw_length_str
draw.c, 79
draw.h, 86
draw_line
draw.c, 79
draw.h, 86
draw_paint
draw.h, 84
DRAW_PIXELS_PER_BYTE
draw.h, 84
draw_print_buffer
draw.c, 79
draw.h, 87
draw_print_str
draw.c, 80
draw.h, 87
draw_rect
draw.c, 80
draw.h, 88
draw_screen_buffer.c, 93
draw_buffer0, 95
get_draw_buffer, 94
set_draw_buffer, 94
draw_screen_buffer.h, 95
draw_buffer0, 96
DRAW_BUFFERS, 96
DRAW_TOTAL_BUFFER_SIZE, 96
get_draw_buffer, 96
set_draw_buffer, 96
draw_set_display_brightness
draw.h, 84
draw_set_pixel
draw.c, 80
draw.h, 88
draw_setup_io
draw.c, 81
draw.h, 89
draw_tests.c, 97
draw_tests_run, 98
TEST_RADIUS, 98
draw_tests.h, 99
DRAW_BOTTOM_PIXEL_Y, 100
draw_tests_run, 100
DRAW_TOP_PIXEL_Y, 100
TEST_RESULT_NO_MORE_TESTS, 100
TEST_RESULT_NOT_APPLICABLE, 100
TEST_RESULT_RAN, 100
draw_tests_run
draw_tests.c, 98
draw_tests.h, 100
DRAW_TOP_PIXEL_Y
draw_tests.h, 100
DRAW_TOTAL_BUFFER_SIZE
draw_screen_buffer.h, 96
drv_clear_screen
drv_ea_ldp6432.c, 106
drv_sure_2416.c, 114
drv_sure_3208.c, 116
drv_ea_ldp6416.c, 101
bright_count, 104
bright_level, 104
buffer_position, 104
buffer0, 104
current_buffer, 105
current_row, 105
drv_get_pixel, 103
drv_init, 103
drv_paint, 103
drv_print_buffer, 103
drv_refresh, 104
drv_set_display_brightness, 104
drv_setup_io, 104
set_pins_r1_g1, 103
drv_ea_ldp6432.c, 105
bright_count, 108
bright_level, 108
buffer_position0, 108
buffer0, 108
buffer1, 108
current_row, 108
drv_clear_screen, 106
drv_get_pixel, 106
drv_init, 107
drv_paint, 107
drv_print_buffer, 107
drv_refresh, 107
drv_set_display_brightness, 107
drv_setup_io, 107
MAX_BRIGHTNESS, 106
set_pins_r1_g1_r2_g2, 106
drv_ea_ldp8008.c, 108
bright_count, 111
bright_level, 111
buffer_position0, 112
buffer0, 111
current_row, 112
drv_get_pixel, 110
drv_init, 110
drv_paint, 110
drv_print_buffer, 110
drv_refresh, 111
656
drv_set_display_brightness, 111
drv_setup_io, 111
MAX_BRIGHTNESS, 110
set_pins_r_g, 110
drv_get_pixel
drv_ea_ldp6416.c, 103
drv_ea_ldp6432.c, 106
drv_ea_ldp8008.c, 110
drv_sure_2416.c, 114
drv_sure_3208.c, 116
drv_init
draw.h, 89
drv_ea_ldp6416.c, 103
drv_ea_ldp6432.c, 107
drv_ea_ldp8008.c, 110
drv_pcd8544.c, 113
drv_sure_2416.c, 115
drv_sure_3208.c, 116
drv_paint
draw.h, 90
drv_ea_ldp6416.c, 103
drv_ea_ldp6432.c, 107
drv_ea_ldp8008.c, 110
drv_pcd8544.c, 113
drv_sure_2416.c, 115
drv_sure_3208.c, 117
drv_pcd8544.c, 112
drv_init, 113
drv_paint, 113
drv_setup_io, 113
drv_print_buffer
draw.h, 90
drv_ea_ldp6416.c, 103
drv_ea_ldp6432.c, 107
drv_ea_ldp8008.c, 110
drv_refresh
draw.h, 91
drv_ea_ldp6416.c, 104
drv_ea_ldp6432.c, 107
drv_ea_ldp8008.c, 111
drv_set_display_brightness
draw.h, 91
drv_ea_ldp6416.c, 104
drv_ea_ldp6432.c, 107
drv_ea_ldp8008.c, 111
drv_setup
draw.h, 84
drv_setup_io
draw.h, 91
drv_ea_ldp6416.c, 104
drv_ea_ldp6432.c, 107
drv_ea_ldp8008.c, 111
drv_pcd8544.c, 113
drv_sure_2416.c, 115
drv_sure_3208.c, 117
drv_sure_2416.c, 114
drv_clear_screen, 114
drv_get_pixel, 114
drv_init, 115
drv_paint, 115
drv_setup_io, 115
drv_sure_3208.c, 115
drv_clear_screen, 116
drv_get_pixel, 116
drv_init, 116
drv_paint, 117
drv_setup_io, 117
ds1307.c, 117
bcd_to_dec, 118
dec_to_bcd, 119
rtc_get_config, 120
rtc_get_date, 120
rtc_get_day, 121
rtc_get_hours, 121
rtc_get_minutes, 121
rtc_get_month, 121
rtc_get_seconds, 121
rtc_get_year, 122
rtc_set_config, 122
rtc_set_date, 122
rtc_set_day, 122
rtc_set_hours, 123
rtc_set_minutes, 123
rtc_set_month, 123
rtc_set_seconds, 123
rtc_set_year, 123
rtc_setup_io, 124
rtc_start_clock, 124
rtc_stop_clock, 124
ds1307.h, 124
__ds1307_h, 126
ds1307_control_register, 126
ds1307_date_register, 126
ds1307_day_register, 126
ds1307_device, 126
ds1307_hours_register, 127
ds1307_minutes_register, 127
ds1307_month_register, 127
ds1307_seconds_register, 127
ds1307_year_register, 127
rtc_get_config, 127
rtc_get_date, 128
rtc_get_day, 128
rtc_get_hours, 128
rtc_get_minutes, 128
rtc_get_month, 129
rtc_get_seconds, 129
rtc_get_year, 129
rtc_set_config, 129
rtc_set_date, 129
rtc_set_day, 129
rtc_set_hours, 129
657
rtc_set_minutes, 129
rtc_set_month, 130
rtc_set_seconds, 130
rtc_set_year, 130
rtc_setup, 127
rtc_setup_io, 130
rtc_start_clock, 131
rtc_stop_clock, 131
ds1307_control_register
ds1307.h, 126
ds1307_date_register
ds1307.h, 126
ds1307_day_register
ds1307.h, 126
ds1307_device
ds1307.h, 126
ds1307_hours_register
ds1307.h, 127
ds1307_minutes_register
ds1307.h, 127
ds1307_month_register
ds1307.h, 127
ds1307_seconds_register
ds1307.h, 127
ds1307_year_register
ds1307.h, 127
ds1631.c, 131
ds1631_convert_temp, 132
ds1631_get_config, 132
ds1631_get_temp, 132
ds1631_set_config, 133
ds1631_setup, 133
ds1631.h, 133
ds1631_access_config, 135
ds1631_access_th, 135
ds1631_access_tl, 135
ds1631_convert_temp, 135
ds1631_get_config, 136
ds1631_get_temp, 136
ds1631_read_temp, 135
ds1631_set_config, 137
ds1631_setup, 135
ds1631_setup_io, 137
ds1631_software_por, 135
ds1631_start_convert, 135
ds1631_stop_convert, 135
ds1631_access_config
ds1631.h, 135
ds1631_access_th
ds1631.h, 135
ds1631_access_tl
ds1631.h, 135
ds1631_convert_temp
ds1631.c, 132
ds1631.h, 135
ds1631_get_config
ds1631.c, 132
ds1631.h, 136
ds1631_get_temp
ds1631.c, 132
ds1631.h, 136
ds1631_read_temp
ds1631.h, 135
ds1631_set_config
ds1631.c, 133
ds1631.h, 137
ds1631_setup
ds1631.c, 133
ds1631.h, 135
ds1631_setup_io
ds1631.h, 137
ds1631_software_por
ds1631.h, 135
ds1631_start_convert
ds1631.h, 135
ds1631_stop_convert
ds1631.h, 135
dt_CONFIGURATION
pic_usb.h, 526
dt_CS_INTERFACE
pic_usb.h, 526
dt_DEBUG
pic_usb.h, 526
dt_DEVICE
pic_usb.h, 526
dt_DEVICE_QUALIFIER
pic_usb.h, 526
dt_ENDPOINT
pic_usb.h, 526
dt_HID
pic_usb.h, 526
dt_HID_REPORT
pic_usb.h, 527
dt_INTERFACE
pic_usb.h, 527
dt_INTERFACE_ASSOC
pic_usb.h, 527
dt_INTERFACE_POWER
pic_usb.h, 527
dt_OTG
pic_usb.h, 527
dt_OTHER_SPEED_CONFIG
pic_usb.h, 527
dt_STRING
pic_usb.h, 527
dte_rate
line_coding, 22
usb_cdc_class.c, 625
DTS
pic_usb.h, 527
DTSEN
pic_usb.h, 527
658
e_big_bitmap
ea_bitmaps.c, 138
ea_bitmaps.h, 140
e_bitmap
ea_bitmaps.c, 138
ea_bitmaps.h, 140
ea_bitmaps.c, 137
a_big_bitmap, 138
a_bitmap, 138
adventures_bitmap, 138
e_big_bitmap, 138
e_bitmap, 138
embedded_bitmap, 139
ea_bitmaps.h, 139
a_big_bitmap, 140
a_bitmap, 140
adventures_bitmap, 140
e_big_bitmap, 140
e_bitmap, 140
embedded_bitmap, 140
ea_ldp6416.c, 140
ea_ldp6416_init, 141
ea_ldp6416_setup_io, 141
ea_ldp6416.h, 142
ea_ldp6416_init, 143
ea_ldp6416_setup, 143
ea_ldp6416_setup_io, 143
ea_ldp6416_init
ea_ldp6416.c, 141
ea_ldp6416.h, 143
ea_ldp6416_setup
ea_ldp6416.h, 143
ea_ldp6416_setup_io
ea_ldp6416.c, 141
ea_ldp6416.h, 143
ea_ldp6432.c, 143
ea_ldp6432_init, 144
ea_ldp6432_setup_io, 144
ea_ldp6432.h, 145
ea_ldp6432_init, 146
ea_ldp6432_setup, 145
ea_ldp6432_setup_io, 146
ea_ldp6432_init
ea_ldp6432.c, 144
ea_ldp6432.h, 146
ea_ldp6432_setup
ea_ldp6432.h, 145
ea_ldp6432_setup_io
ea_ldp6432.c, 144
ea_ldp6432.h, 146
ea_ldp8008.c, 146
ea_ldp8008_init, 147
ea_ldp8008_setup_io, 147
ea_ldp8008.h, 147
ea_ldp8008_init, 148
ea_ldp8008_setup, 148
ea_ldp8008_setup_io, 148
ea_ldp8008_init
ea_ldp8008.c, 147
ea_ldp8008.h, 148
ea_ldp8008_setup
ea_ldp8008.h, 148
ea_ldp8008_setup_io
ea_ldp8008.c, 147
ea_ldp8008.h, 148
EA_LED_PANEL_DRIVER
platform.h, 557
EA_PLT_1001
platform.h, 557
EA_PLT_1002
platform.h, 557
EA_PLT_1003
platform.h, 557
EA_PLT1001
platform.h, 557
EA_PLT1002
platform.h, 557
EA_PLT1003
platform.h, 557
EA_USB2SERIAL
platform.h, 558
EA_WEATHER_STATION
platform.h, 558
EA_WIRELESS_TEMP_SENSOR
platform.h, 558
EADR0
mrf24j40_defines.h, 360
EADR1
mrf24j40_defines.h, 360
EADR2
mrf24j40_defines.h, 360
EADR3
mrf24j40_defines.h, 360
EADR4
mrf24j40_defines.h, 361
EADR5
mrf24j40_defines.h, 361
EADR6
mrf24j40_defines.h, 361
EADR7
mrf24j40_defines.h, 361
EE_MY_ADDR_H
protocol.h, 566
EE_MY_ADDR_L
protocol.h, 566
EE_MY_INFO1
protocol.h, 566
EE_MY_INPUTS
protocol.h, 566
EE_MY_LAST_PKT_ID_H
protocol.h, 566
EE_MY_LAST_PKT_ID_L
659
protocol.h, 566
EE_MY_OUTPUTS
protocol.h, 566
EE_MY_SENSORS
protocol.h, 566
embedded_bitmap
ea_bitmaps.c, 139
ea_bitmaps.h, 140
end_crit_sec
pic_utils.h, 552
endpoint_address
endpoint_descriptor, 13
endpoint_descriptor, 12
attributes, 13
descriptor_type, 13
endpoint_address, 13
interval, 13
length, 13
max_packet_size, 13
ep_in_bd_location
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 549
ep_in_buffer_location
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 549
ep_in_buffer_size
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 549
ep_out_bd_location
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 550
ep_out_buffer_location
pic_usb_buffer_mgt.c, 544
pic_usb_buffer_mgt.h, 550
ep_out_buffer_size
pic_usb_buffer_mgt.c, 545
pic_usb_buffer_mgt.h, 550
ESLOTG1
mrf24j40_defines.h, 361
ESLOTG23
mrf24j40_defines.h, 361
ESLOTG45
mrf24j40_defines.h, 361
ESLOTG67
mrf24j40_defines.h, 361
extended_address
mrf24j40.c, 329
FIFO_STATUS_RX_EMPTY
pic_rf_24l01.h, 454
FIFO_STATUS_RX_FULL
pic_rf_24l01.h, 455
FIFO_STATUS_TX_EMPTY
pic_rf_24l01.h, 455
FIFO_STATUS_TX_FULL
pic_rf_24l01.h, 455
FIFO_STATUS_TX_REUSE
pic_rf_24l01.h, 455
flag
queued_item, 25
sending_item, 34
flash_erase
pic_flash.h, 417
flash_write
pic_flash.h, 417
FONT_FIRST_CHAR
draw.c, 76
draw_font_picpack_5x7.c, 93
FONT_HEIGHT
draw.c, 76
FONT_LAST_CHAR
draw.c, 76
draw_font_picpack_5x7.c, 93
FRAME_TYPE_ACK
wpan.h, 640
FRAME_TYPE_BEACON
wpan.h, 640
FRAME_TYPE_DATA
wpan.h, 640
FRAME_TYPE_MAC_COMMAND
wpan.h, 640
FRMOFFSET
mrf24j40_defines.h, 361
FRMOFFSET_OFFSET0
mrf24j40_defines.h, 361
FRMOFFSET_OFFSET1
mrf24j40_defines.h, 362
FRMOFFSET_OFFSET2
mrf24j40_defines.h, 362
FRMOFFSET_OFFSET3
mrf24j40_defines.h, 362
FRMOFFSET_OFFSET4
mrf24j40_defines.h, 362
FRMOFFSET_OFFSET5
mrf24j40_defines.h, 362
FRMOFFSET_OFFSET6
mrf24j40_defines.h, 362
FRMOFFSET_OFFSET7
mrf24j40_defines.h, 362
GATECLK
mrf24j40_defines.h, 362
GATECLK_GTSON
mrf24j40_defines.h, 362
get_draw_buffer
draw_screen_buffer.c, 94
draw_screen_buffer.h, 96
GPIO
mrf24j40_defines.h, 362
GPIO_GPIO0
mrf24j40_defines.h, 362
GPIO_GPIO1
mrf24j40_defines.h, 363
GPIO_GPIO2
660
mrf24j40_defines.h, 363
GPIO_GPIO3
mrf24j40_defines.h, 363
GPIO_GPIO4
mrf24j40_defines.h, 363
GPIO_GPIO5
mrf24j40_defines.h, 363
handle_tick
pic_tick.c, 498
pic_tick.h, 500
handle_tick_inline
pic_tick.h, 500
hc4led.c, 149
hc4led_convert, 149
hc4led_setup, 150
hc4led_write_str, 150
hc4led.h, 150
__hc4led_h, 151
hc4led_setup, 152
hc4led_write_str, 152
hc4led_convert
hc4led.c, 149
hc4led_setup
hc4led.c, 150
hc4led.h, 152
hc4led_write_str
hc4led.c, 150
hc4led.h, 152
hid_descriptor, 13
class_descriptor_length, 14
class_descriptor_type, 14
country_code, 14
descriptor_type, 14
hid_spec, 14
length, 14
num_class_descriptors, 14
hid_spec
hid_descriptor, 14
hmc6352.c, 152
hmc6352_enter_cal, 153
hmc6352_exit_cal, 153
hmc6352_get_data, 154
hmc6352_read_eeprom, 154
hmc6352_read_ram, 155
hmc6352_save_op_mode, 155
hmc6352_set_mode, 156
hmc6352_setup_io, 156
hmc6352_sleep, 156
hmc6352_update_bridge_offsets, 157
hmc6352_wake, 157
hmc6352_write_eeprom, 158
hmc6352_write_ram, 158
hmc6352.h, 158
hmc6352_device_addr, 160
hmc6352_ee_slave_addr, 160
hmc6352_ee_time_delay, 160
hmc6352_ee_x_offset_lsb, 160
hmc6352_ee_x_offset_msb, 160
hmc6352_ee_y_offset_lsb, 161
hmc6352_ee_y_offset_msb, 161
hmc6352_enter_cal, 163
hmc6352_enter_cal_cmd, 161
hmc6352_exit_cal, 164
hmc6352_exit_cal_cmd, 161
hmc6352_get_data, 164
hmc6352_get_data_cmd, 161
hmc6352_mode_continuous, 161
hmc6352_mode_query, 161
hmc6352_mode_standby, 161
hmc6352_num_summed, 161
hmc6352_op_mode, 162
hmc6352_ram_op_mode_control, 162
hmc6352_ram_output_data_control, 162
hmc6352_read, 162
hmc6352_read_eeprom, 164
hmc6352_read_from_eeprom, 162
hmc6352_read_from_ram, 162
hmc6352_read_ram, 165
hmc6352_save_op_mode, 165
hmc6352_save_op_mode_cmd, 162
hmc6352_set_mode, 166
hmc6352_setup_io, 166
hmc6352_sleep, 166
hmc6352_sleep_cmd, 162
hmc6352_software_ver, 162
hmc6352_update_bridge_cmd, 162
hmc6352_update_bridge_offsets, 167
hmc6352_wake, 167
hmc6352_wake_cmd, 163
hmc6352_write, 163
hmc6352_write_eeprom, 168
hmc6352_write_ram, 168
hmc6352_write_to_eeprom, 163
hmc6352_write_to_ram, 163
hmc6352_device_addr
hmc6352.h, 160
hmc6352_ee_slave_addr
hmc6352.h, 160
hmc6352_ee_time_delay
hmc6352.h, 160
hmc6352_ee_x_offset_lsb
hmc6352.h, 160
hmc6352_ee_x_offset_msb
hmc6352.h, 160
hmc6352_ee_y_offset_lsb
hmc6352.h, 161
hmc6352_ee_y_offset_msb
hmc6352.h, 161
hmc6352_enter_cal
hmc6352.c, 153
hmc6352.h, 163
hmc6352_enter_cal_cmd
661
hmc6352.h, 161
hmc6352_exit_cal
hmc6352.c, 153
hmc6352.h, 164
hmc6352_exit_cal_cmd
hmc6352.h, 161
hmc6352_get_data
hmc6352.c, 154
hmc6352.h, 164
hmc6352_get_data_cmd
hmc6352.h, 161
hmc6352_mode_continuous
hmc6352.h, 161
hmc6352_mode_query
hmc6352.h, 161
hmc6352_mode_standby
hmc6352.h, 161
hmc6352_num_summed
hmc6352.h, 161
hmc6352_op_mode
hmc6352.h, 162
hmc6352_ram_op_mode_control
hmc6352.h, 162
hmc6352_ram_output_data_control
hmc6352.h, 162
hmc6352_read
hmc6352.h, 162
hmc6352_read_eeprom
hmc6352.c, 154
hmc6352.h, 164
hmc6352_read_from_eeprom
hmc6352.h, 162
hmc6352_read_from_ram
hmc6352.h, 162
hmc6352_read_ram
hmc6352.c, 155
hmc6352.h, 165
hmc6352_save_op_mode
hmc6352.c, 155
hmc6352.h, 165
hmc6352_save_op_mode_cmd
hmc6352.h, 162
hmc6352_set_mode
hmc6352.c, 156
hmc6352.h, 166
hmc6352_setup_io
hmc6352.c, 156
hmc6352.h, 166
hmc6352_sleep
hmc6352.c, 156
hmc6352.h, 166
hmc6352_sleep_cmd
hmc6352.h, 162
hmc6352_software_ver
hmc6352.h, 162
hmc6352_update_bridge_cmd
hmc6352.h, 162
hmc6352_update_bridge_offsets
hmc6352.c, 157
hmc6352.h, 167
hmc6352_wake
hmc6352.c, 157
hmc6352.h, 167
hmc6352_wake_cmd
hmc6352.h, 163
hmc6352_write
hmc6352.h, 163
hmc6352_write_eeprom
hmc6352.c, 158
hmc6352.h, 168
hmc6352_write_ram
hmc6352.c, 158
hmc6352.h, 168
hmc6352_write_to_eeprom
hmc6352.h, 163
hmc6352_write_to_ram
hmc6352.h, 163
hop_count
its2_packet, 17
HORIZONTAL
draw.h, 84
HSYMTMRH
mrf24j40_defines.h, 363
HSYMTMRH_HSYMTMR08
mrf24j40_defines.h, 363
HSYMTMRH_HSYMTMR09
mrf24j40_defines.h, 363
HSYMTMRH_HSYMTMR10
mrf24j40_defines.h, 363
HSYMTMRH_HSYMTMR11
mrf24j40_defines.h, 363
HSYMTMRH_HSYMTMR12
mrf24j40_defines.h, 363
HSYMTMRH_HSYMTMR13
mrf24j40_defines.h, 364
HSYMTMRH_HSYMTMR14
mrf24j40_defines.h, 364
HSYMTMRH_HSYMTMR15
mrf24j40_defines.h, 364
HSYMTMRL
mrf24j40_defines.h, 364
HSYMTMRL_HSYMTMR0
mrf24j40_defines.h, 364
HSYMTMRL_HSYMTMR1
mrf24j40_defines.h, 364
HSYMTMRL_HSYMTMR2
mrf24j40_defines.h, 364
HSYMTMRL_HSYMTMR3
mrf24j40_defines.h, 364
HSYMTMRL_HSYMTMR4
mrf24j40_defines.h, 364
HSYMTMRL_HSYMTMR5
662
mrf24j40_defines.h, 364
HSYMTMRL_HSYMTMR6
mrf24j40_defines.h, 364
HSYMTMRL_HSYMTMR7
mrf24j40_defines.h, 365
ht1632.c, 168
ht1632_fill, 169
ht1632_fill2, 169
ht1632_init, 170
ht1632_send_command, 170
ht1632_set_brightness, 170
ht1632_set_pixel, 171
ht1632_setup_io, 171
ht1632_write, 171
ht1632.h, 171
ht1632_clear, 174
HT1632_CMD_BLINK_OFF, 173
HT1632_CMD_BLINK_ON, 173
HT1632_CMD_CLK_MASTER_MODE, 173
HT1632_CMD_CLK_SLAVE_MODE, 173
HT1632_CMD_CLK_SOURCE_EXT, 173
HT1632_CMD_CLK_SOURCE_INT_RC, 173
HT1632_CMD_LEDS_OFF, 173
HT1632_CMD_LEDS_ON, 173
HT1632_CMD_NMOS_16_COMMON, 173
HT1632_CMD_NMOS_8_COMMON, 173
HT1632_CMD_PMOS_16_COMMON, 174
HT1632_CMD_PMOS_8_COMMON, 174
HT1632_CMD_SYS_DISABLE, 174
HT1632_CMD_SYS_ENABLE, 174
ht1632_fill, 174
ht1632_fill2, 174
ht1632_get_pixel, 175
ht1632_horizontal_line, 175
ht1632_init, 175
ht1632_send_command, 175
ht1632_set_brightness, 175
ht1632_set_pixel, 176
ht1632_setup_io, 176
ht1632_vertical_line, 176
ht1632_write, 176
ht1632_clear
ht1632.h, 174
HT1632_CMD_BLINK_OFF
ht1632.h, 173
HT1632_CMD_BLINK_ON
ht1632.h, 173
HT1632_CMD_CLK_MASTER_MODE
ht1632.h, 173
HT1632_CMD_CLK_SLAVE_MODE
ht1632.h, 173
HT1632_CMD_CLK_SOURCE_EXT
ht1632.h, 173
HT1632_CMD_CLK_SOURCE_INT_RC
ht1632.h, 173
HT1632_CMD_LEDS_OFF
ht1632.h, 173
HT1632_CMD_LEDS_ON
ht1632.h, 173
HT1632_CMD_NMOS_16_COMMON
ht1632.h, 173
HT1632_CMD_NMOS_8_COMMON
ht1632.h, 173
HT1632_CMD_PMOS_16_COMMON
ht1632.h, 174
HT1632_CMD_PMOS_8_COMMON
ht1632.h, 174
HT1632_CMD_SYS_DISABLE
ht1632.h, 174
HT1632_CMD_SYS_ENABLE
ht1632.h, 174
ht1632_fill
ht1632.c, 169
ht1632.h, 174
ht1632_fill2
ht1632.c, 169
ht1632.h, 174
ht1632_get_pixel
ht1632.h, 175
ht1632_horizontal_line
ht1632.h, 175
ht1632_init
ht1632.c, 170
ht1632.h, 175
ht1632_send_command
ht1632.c, 170
ht1632.h, 175
ht1632_set_brightness
ht1632.c, 170
ht1632.h, 175
ht1632_set_pixel
ht1632.c, 171
ht1632.h, 176
ht1632_setup_io
ht1632.c, 171
ht1632.h, 176
ht1632_vertical_line
ht1632.h, 176
ht1632_write
ht1632.c, 171
ht1632.h, 176
i2c.c, 176
DELAY_AMOUNT, 177
i2c_ack_polling, 177
i2c_read_eeprom, 178
i2c_read_eeprom_16bit, 180
i2c_receive_byte, 180
i2c_send_ack, 183
i2c_send_byte, 183
i2c_setup_io, 185
i2c_start, 185
i2c_stop, 187
663
i2c_write_eeprom, 189
i2c_write_eeprom_16bit, 190
i2c.h, 191
__i2c_h, 193
i2c_read_eeprom, 193
i2c_read_eeprom_16bit, 196
i2c_read_sda, 193
i2c_receive_byte, 196
i2c_send_ack, 199
i2c_send_byte, 199
i2c_setup, 193
i2c_setup_io, 201
i2c_start, 201
i2c_stop, 203
i2c_write_eeprom, 205
i2c_write_eeprom_16bit, 206
i2c_write_sda, 193
i2c_ack_polling
i2c.c, 177
i2c_hw.c, 207
spi_hw_init, 208
spi_hw_receive, 208
spi_hw_setup_io, 209
spi_hw_transmit, 209
i2c_hw.h, 210
i2c_pulse_0, 211
i2c_pulse_1, 211
i2c_setup_io, 211
i2c_write, 211
i2c_write_lsb, 211
i2c_pulse_0
i2c_hw.h, 211
i2c_pulse_1
i2c_hw.h, 211
i2c_read_eeprom
i2c.c, 178
i2c.h, 193
i2c_read_eeprom_16bit
i2c.c, 180
i2c.h, 196
i2c_read_sda
i2c.h, 193
i2c_receive_byte
i2c.c, 180
i2c.h, 196
i2c_send_ack
i2c.c, 183
i2c.h, 199
i2c_send_byte
i2c.c, 183
i2c.h, 199
i2c_setup
i2c.h, 193
i2c_setup_io
i2c.c, 185
i2c.h, 201
i2c_hw.h, 211
i2c_start
i2c.c, 185
i2c.h, 201
i2c_stop
i2c.c, 187
i2c.h, 203
i2c_write
i2c_hw.h, 211
i2c_write_eeprom
i2c.c, 189
i2c.h, 205
i2c_write_eeprom_16bit
i2c.c, 190
i2c.h, 206
i2c_write_lsb
i2c_hw.h, 211
i2c_write_sda
i2c.h, 193
INCDIS
pic_usb.h, 528
int16
pic_utils.h, 552
int32
pic_utils.h, 553
int8
pic_utils.h, 553
interface_class
interface_descriptor, 15
interface_descriptor, 15
alternate_setting, 15
descriptor_type, 15
interface_class, 15
interface_number, 15
interface_protocol, 16
interface_string_id, 16
interface_subclass, 16
length, 16
num_endpoints, 16
interface_number
interface_descriptor, 15
interface_protocol
interface_descriptor, 16
interface_string_id
interface_descriptor, 16
interface_subclass
interface_descriptor, 16
interval
endpoint_descriptor, 13
INTSTAT
mrf24j40_defines.h, 365
INTSTAT_HSYMTMRIF
mrf24j40_defines.h, 365
INTSTAT_RXIF
mrf24j40_defines.h, 365
INTSTAT_SECIF
664
mrf24j40_defines.h, 365
INTSTAT_SLPIF
mrf24j40_defines.h, 365
INTSTAT_TXG1IF
mrf24j40_defines.h, 365
INTSTAT_TXG2IF
mrf24j40_defines.h, 365
INTSTAT_TXNIF
mrf24j40_defines.h, 365
INTSTAT_WAKEIF
mrf24j40_defines.h, 365
ITEM_QUEUED
its_mode2.h, 260
ITS_ACK
its_common.h, 221
its_add_local_device
its_common.c, 213
its_common.h, 223
its_add_net_device
its_common.c, 213
its_common.h, 223
its_address, 18
local, 19
remote, 19
ITS_APP_DATA
its_common.h, 221
ITS_ASSOC_REQ
its_common.h, 221
ITS_ASSOC_RES
its_common.h, 221
its_common.c, 212
its_add_local_device, 213
its_add_net_device, 213
its_device_id, 219
its_devices, 219
its_get_device_handle, 213
its_get_device_id, 214
its_get_device_info, 214
its_get_network_id, 214
its_get_next_sequence, 214
its_init, 215
its_network_id, 219
its_print_devices, 215
its_sequence, 219
its_set_device_id, 216
its_set_network_id, 216
its_transmit_to_ea, 217
its_transmit_to_handle, 217
its_transmit_to_sa, 218
its_common.h, 219
ITS_ACK, 221
its_add_local_device, 223
its_add_net_device, 223
ITS_APP_DATA, 221
ITS_ASSOC_REQ, 221
ITS_ASSOC_RES, 221
its_device_handle, 223
ITS_DEVICE_NONE, 221
ITS_ENDPOINT_DATA, 222
ITS_ENDPOINT_REQ, 222
ITS_ENDPOINT_RES, 222
ITS_GENERIC_DATA, 222
its_get_device_handle, 223
its_get_device_id, 224
its_get_device_info, 224
its_get_network_id, 224
its_get_next_sequence, 225
its_init, 225
ITS_LOCAL_DISCOVER_REQ, 222
ITS_LOCAL_DISCOVER_RES, 222
ITS_NET_DISCOVER_REQ, 222
ITS_NET_DISCOVER_RES, 222
ITS_PENDING_DATA_REQ, 222
its_print_devices, 226
ITS_ROUTE_FAILURE, 222
its_set_device_id, 226
its_set_network_id, 227
its_transmit_to_ea, 227
its_transmit_to_handle, 227
its_transmit_to_sa, 228
its_dest_id
its2_packet, 17
its_device_handle
its_common.h, 223
its_device_id
its_common.c, 219
its_device_info, 21
its_device_info, 19
addr, 20
its_device_id, 21
ITS_DEVICE_NONE
its_common.h, 221
its_devices
its_common.c, 219
ITS_ENDPOINT_DATA
its_common.h, 222
ITS_ENDPOINT_REQ
its_common.h, 222
ITS_ENDPOINT_RES
its_common.h, 222
ITS_GENERIC_DATA
its_common.h, 222
its_get_device_handle
its_common.c, 213
its_common.h, 223
its_get_device_id
its_common.c, 214
its_common.h, 224
its_get_device_info
its_common.c, 214
its_common.h, 224
its_get_network_id
665
its_common.c, 214
its_common.h, 224
its_get_next_sequence
its_common.c, 214
its_common.h, 225
its_init
its_common.c, 215
its_common.h, 225
ITS_LOCAL_DISCOVER_REQ
its_common.h, 222
ITS_LOCAL_DISCOVER_RES
its_common.h, 222
its_mode1.c, 229
channel, 234
controller_handle, 234
its1_controller_handle_association, 230
its1_controller_init, 230
its1_controller_process, 231
its1_controller_receive_callback, 231
its1_controller_transmit, 231
its1_device_init, 231
its1_device_process, 232
its1_device_transmit, 232
its1_find_controller, 233
its1_setup_io, 233
state, 234
tick_marker, 234
wpan_data_received_callback, 233
its_mode1.h, 234
_its1_result, 236
_its1_state, 236
its1_controller_handle_association, 236
its1_controller_init, 237
its1_controller_process, 237
its1_controller_receive_callback, 237
its1_controller_transmit, 237
its1_device_init, 238
its1_device_process, 238
its1_device_receive_callback, 239
its1_device_transmit, 239
its1_find_controller, 239
its1_result, 236
its1_setup_io, 239
its1_state, 236
RESULT_FAILED, 236
RESULT_SUCCESSFUL, 236
state, 240
STATE_ASSOCIATED, 236
STATE_RUNNING, 236
STATE_SEARCHING, 236
STATE_STARTUP, 236
STATE_UNASSOCIATED, 236
its_mode2.c, 240
channel, 252
controller_handle, 253
debug_module, 253
its2_delete_item_from_queue, 241
its2_device_init, 242
its2_device_process, 242
its2_device_transmit, 242
its2_find_controller, 243
its2_find_free_queue_slot, 243
its2_forward_routed_packet, 243
its2_print_packet, 244
its2_print_queue, 244
its2_process_tx_queue, 244
its2_rebroadcast_net_addr_req, 245
its2_rebroadcast_net_discover_req, 245
its2_request_local_addr, 246
its2_request_net_addr, 246
its2_respond_local_addr, 247
its2_respond_net_addr, 247
its2_router_handle_association, 248
its2_router_init, 248
its2_router_process, 249
its2_router_queue_packet, 249
its2_seen_index, 253
its2_seen_list, 253
its2_setup_io, 250
its2_transmit, 250
its2_transmitting, 253
its2_tx_queue, 253
queue_processing, 253
state, 253
state_timeout, 253
tick_marker, 253
turn_off_mrf_interrupts, 251
turn_on_mrf_interrupts, 251
wpan_data_received_callback, 252
wpan_data_transmitted_callback, 252
its_mode2.h, 254
_its2_result, 260
_its2_state, 260
debug_module, 270
ITEM_QUEUED, 260
its2_delete_item_from_queue, 261
its2_device_init, 261
its2_device_process, 261
its2_device_receive_callback, 262
its2_device_transmit, 262
its2_find_coordinator, 262
ITS2_FLAG_ACK, 256
ITS2_FLAG_DELETED, 256
ITS2_FLAG_NO_ACK, 256
its2_forward_routed_packet, 262
ITS2_NO_AVAILABLE_SLOTS, 256
its2_print_packet, 262
its2_print_queue, 263
its2_process_tx_queue, 263
its2_rebroadcast_net_discover_req, 264
its2_request_local_addr, 264
its2_request_net_addr, 265
666
its2_respond_local_addr, 265
its2_respond_net_addr, 266
its2_result, 260
its2_router_handle_association, 266
its2_router_init, 267
its2_router_process, 267
its2_router_queue_packet, 268
its2_router_receive_callback, 269
its2_setup_io, 269
its2_state, 260
ITS2_STATUS_QUEUED, 256
ITS2_STATUS_TX_QUEUE_FULL, 257
its2_transmit, 269
its2_transmit_status_callback, 270
ITS2_TX_STATUS_NEXT_HOP_UNKNOWN,
257
ITS2_TX_STATUS_NO_ACK, 257
ITS2_TX_STATUS_NO_ROUTE, 257
ITS2_TX_STATUS_REMOTE_NO_ACK, 257
ITS2_TX_STATUS_SUCCESS, 257
ITS2_UPDATE_ROUTE_FAIL, 257
ITS2_UPDATE_ROUTE_SUCCESS, 257
NEXT_HOP_NOT_LOCAL, 260
POS_DEST_H, 257
POS_DEST_L, 257
POS_HOP_COUNT, 258
POS_KEY1, 258
POS_KEY2, 258
POS_LENGTH_HEADER, 258
POS_MAX_HOP_COUNT, 258
POS_NETWORK_H, 258
POS_NETWORK_L, 258
POS_NUM_ROUTES, 258
POS_PKT_TYPE, 258
POS_ROUTE_START, 258
POS_SEQUENCE, 258
POS_SOURCE_H, 259
POS_SOURCE_L, 259
QS_ACK_RECEIVED, 259
QS_READY_TO_SEND, 259
QS_ROUTING_FAILED, 259
QS_SENT, 259
QS_WAITING_ON_ACK, 259
QS_WAITING_ON_LOCAL_ADDR, 259
QS_WAITING_ON_NETWORK_ADDR, 259
QUEUE_FULL, 260
REMOTE_DEVICE, 260
RESULT_FAILED, 260
RESULT_SUCCESSFUL, 260
ROUTING_TOO_MANY_HOPS, 260
state, 270
STATE_ASSOCIATED, 260
STATE_RUNNING, 260
STATE_SEARCHING, 260
STATE_STARTUP, 260
STATE_UNASSOCIATED, 260
ITS_NET_DISCOVER_REQ
its_common.h, 222
ITS_NET_DISCOVER_RES
its_common.h, 222
its_network_id
its_common.c, 219
its2_packet, 17
ITS_PENDING_DATA_REQ
its_common.h, 222
its_print_devices
its_common.c, 215
its_common.h, 226
ITS_ROUTE_FAILURE
its_common.h, 222
its_sequence
its_common.c, 219
its_set_device_id
its_common.c, 216
its_common.h, 226
its_set_network_id
its_common.c, 216
its_common.h, 227
its_source_id
its2_packet, 17
seen_packet, 32
its_transmit_to_ea
its_common.c, 217
its_common.h, 227
its_transmit_to_handle
its_common.c, 217
its_common.h, 227
its_transmit_to_sa
its_common.c, 218
its_common.h, 228
its1_controller_handle_association
its_mode1.c, 230
its_mode1.h, 236
its1_controller_init
its_mode1.c, 230
its_mode1.h, 237
its1_controller_process
its_mode1.c, 231
its_mode1.h, 237
its1_controller_receive_callback
its_mode1.c, 231
its_mode1.h, 237
its1_controller_transmit
its_mode1.c, 231
its_mode1.h, 237
its1_device_init
its_mode1.c, 231
its_mode1.h, 238
its1_device_process
its_mode1.c, 232
its_mode1.h, 238
its1_device_receive_callback
667
its_mode1.h, 239
its1_device_transmit
its_mode1.c, 232
its_mode1.h, 239
its1_find_controller
its_mode1.c, 233
its_mode1.h, 239
its1_result
its_mode1.h, 236
its1_setup_io
its_mode1.c, 233
its_mode1.h, 239
its1_state
its_mode1.h, 236
its2_delete_item_from_queue
its_mode2.c, 241
its_mode2.h, 261
its2_device_init
its_mode2.c, 242
its_mode2.h, 261
its2_device_process
its_mode2.c, 242
its_mode2.h, 261
its2_device_receive_callback
its_mode2.h, 262
its2_device_transmit
its_mode2.c, 242
its_mode2.h, 262
its2_find_controller
its_mode2.c, 243
its2_find_coordinator
its_mode2.h, 262
its2_find_free_queue_slot
its_mode2.c, 243
ITS2_FLAG_ACK
its_mode2.h, 256
ITS2_FLAG_DELETED
its_mode2.h, 256
ITS2_FLAG_NO_ACK
its_mode2.h, 256
its2_forward_routed_packet
its_mode2.c, 243
its_mode2.h, 262
ITS2_NO_AVAILABLE_SLOTS
its_mode2.h, 256
its2_packet, 16
hop_count, 17
its_dest_id, 17
its_network_id, 17
its_source_id, 17
max_hop_count, 17
num_routes, 17
packet_type, 17
routers, 18
sequence, 18
its2_print_packet
its_mode2.c, 244
its_mode2.h, 262
its2_print_queue
its_mode2.c, 244
its_mode2.h, 263
its2_process_tx_queue
its_mode2.c, 244
its_mode2.h, 263
its2_rebroadcast_net_addr_req
its_mode2.c, 245
its2_rebroadcast_net_discover_req
its_mode2.c, 245
its_mode2.h, 264
its2_request_local_addr
its_mode2.c, 246
its_mode2.h, 264
its2_request_net_addr
its_mode2.c, 246
its_mode2.h, 265
its2_respond_local_addr
its_mode2.c, 247
its_mode2.h, 265
its2_respond_net_addr
its_mode2.c, 247
its_mode2.h, 266
its2_result
its_mode2.h, 260
its2_router_handle_association
its_mode2.c, 248
its_mode2.h, 266
its2_router_init
its_mode2.c, 248
its_mode2.h, 267
its2_router_process
its_mode2.c, 249
its_mode2.h, 267
its2_router_queue_packet
its_mode2.c, 249
its_mode2.h, 268
its2_router_receive_callback
its_mode2.h, 269
its2_seen_index
its_mode2.c, 253
its2_seen_list
its_mode2.c, 253
its2_setup_io
its_mode2.c, 250
its_mode2.h, 269
its2_state
its_mode2.h, 260
ITS2_STATUS_QUEUED
its_mode2.h, 256
ITS2_STATUS_TX_QUEUE_FULL
its_mode2.h, 257
its2_transmit
its_mode2.c, 250
668
its_mode2.h, 269
its2_transmit_status_callback
its_mode2.h, 270
its2_transmitting
its_mode2.c, 253
its2_tx_queue
its_mode2.c, 253
ITS2_TX_STATUS_NEXT_HOP_UNKNOWN
its_mode2.h, 257
ITS2_TX_STATUS_NO_ACK
its_mode2.h, 257
ITS2_TX_STATUS_NO_ROUTE
its_mode2.h, 257
ITS2_TX_STATUS_REMOTE_NO_ACK
its_mode2.h, 257
ITS2_TX_STATUS_SUCCESS
its_mode2.h, 257
ITS2_UPDATE_ROUTE_FAIL
its_mode2.h, 257
ITS2_UPDATE_ROUTE_SUCCESS
its_mode2.h, 257
KEN
pic_usb.h, 528
kill_interrupts
pic_utils.h, 553
lcd.c, 270
lcd_cursor_home, 271
lcd_init, 272
lcd_set_cgram_pos, 272
lcd_set_ddram_pos, 272
lcd_setup, 272
lcd_toggle_e, 273
lcd_wait_busy, 273
lcd_write_byte, 273
lcd_write_command, 274
lcd_write_data, 275
lcd_write_data_int, 275
lcd_write_data_str, 275
lcd_write_nibble, 276
lcd.h, 276
__lcd_h, 278
LCD_CLEAR_DISP, 278
lcd_clear_display, 278
lcd_init, 279
LCD_LINE1, 278
LCD_LINE2, 278
LCD_LINE3, 278
LCD_LINE4, 278
lcd_return_home, 278
LCD_RETURN_HOME, 278
LCD_SET_DRAM_ADDR, 279
lcd_setup, 279
lcd_wait_busy, 279
lcd_write_command, 280
lcd_write_data, 280
lcd_write_data_int, 281
lcd_write_data_str, 281
LCD_CLEAR_DISP
lcd.h, 278
lcd_clear_display
lcd.h, 278
lcd_cursor_home
lcd.c, 271
lcd_init
lcd.c, 272
lcd.h, 279
LCD_LINE1
lcd.h, 278
LCD_LINE2
lcd.h, 278
LCD_LINE3
lcd.h, 278
LCD_LINE4
lcd.h, 278
lcd_return_home
lcd.h, 278
LCD_RETURN_HOME
lcd.h, 278
lcd_set_cgram_pos
lcd.c, 272
lcd_set_ddram_pos
lcd.c, 272
LCD_SET_DRAM_ADDR
lcd.h, 279
lcd_setup
lcd.c, 272
lcd.h, 279
lcd_toggle_e
lcd.c, 273
lcd_wait_busy
lcd.c, 273
lcd.h, 279
lcd_write_byte
lcd.c, 273
lcd_write_command
lcd.c, 274
lcd.h, 280
lcd_write_data
lcd.c, 275
lcd.h, 280
lcd_write_data_int
lcd.c, 275
lcd.h, 281
lcd_write_data_str
lcd.c, 275
lcd.h, 281
lcd_write_nibble
lcd.c, 276
length
CDC_ACM_functional_descriptor, 6
CDC_call_mgt_functional_descriptor, 7
CDC_header_functional_descriptor, 8
669
CDC_union_functional_descriptor, 9
configuration_descriptor, 10
device_descriptor, 11
endpoint_descriptor, 13
hid_descriptor, 14
interface_descriptor, 16
line_coding, 21
data_bits, 22
dte_rate, 22
parity, 22
stop_bits, 22
lm75.c, 282
lm75_get_config, 282
lm75_get_temp, 283
lm75_set_config, 283
lm75_setup, 284
lm75.h, 284
lm75_get_config, 285
lm75_get_temp, 285
LM75_NORMAL, 285
lm75_set_config, 286
lm75_setup, 286
LM75_SHUTDOWN, 285
lm75_get_config
lm75.c, 282
lm75.h, 285
lm75_get_temp
lm75.c, 283
lm75.h, 285
LM75_NORMAL
lm75.h, 285
lm75_set_config
lm75.c, 283
lm75.h, 286
lm75_setup
lm75.c, 284
lm75.h, 286
LM75_SHUTDOWN
lm75.h, 285
LOC_CANADA
mrf24j40.h, 331
LOC_EUROPE
mrf24j40.h, 331
LOC_UNDEFINED
mrf24j40.h, 332
LOC_UNITED_STATES
mrf24j40.h, 332
local
its_address, 19
local_address, 22
pan_id, 23
short_address, 23
long_union, 23
as_byte_array, 23
as_long, 23
m41t81s.c, 286
bcd_to_dec, 288
dec_to_bcd, 288
rtc_get_date, 288
rtc_get_dow, 288
rtc_get_hours, 289
rtc_get_minutes, 289
rtc_get_month, 290
rtc_get_register, 290
rtc_get_seconds, 291
rtc_get_year, 291
rtc_set_date, 292
rtc_set_day, 292
rtc_set_hours, 293
rtc_set_minutes, 293
rtc_set_month, 294
rtc_set_register, 294
rtc_set_seconds, 294
rtc_set_sqw_freq, 295
rtc_set_year, 295
rtc_setup_io, 296
rtc_start_clock, 296
rtc_start_sqw_output, 296
rtc_stop_clock, 297
rtc_stop_sqw_output, 297
m41t81s.h, 298
__m41t81s_h, 300
m41t81s_alarm_date_reg, 300
m41t81s_alarm_hour_reg, 300
m41t81s_alarm_min_reg, 300
m41t81s_alarm_month_reg, 300
m41t81s_alarm_seconds_reg, 301
m41t81s_calibration_reg, 301
m41t81s_date_reg, 301
m41t81s_device_addr, 301
m41t81s_dow_reg, 301
m41t81s_flags_reg, 301
m41t81s_hours_reg, 301
m41t81s_minutes_reg, 301
m41t81s_month_reg, 301
m41t81s_part_seconds_reg, 302
m41t81s_reserved1_reg, 302
m41t81s_reserved2_reg, 302
m41t81s_reserved3_reg, 302
m41t81s_seconds_reg, 302
m41t81s_sqw_reg, 302
m41t81s_watchdog_reg, 302
m41t81s_year_reg, 302
rtc_get_date, 304
rtc_get_dow, 304
rtc_get_hours, 305
rtc_get_minutes, 305
rtc_get_month, 306
rtc_get_register, 306
rtc_get_seconds, 307
rtc_get_year, 307
rtc_set_config, 308
670
rtc_set_date, 309
rtc_set_day, 309
rtc_set_hours, 310
rtc_set_minutes, 310
rtc_set_month, 310
rtc_set_register, 311
rtc_set_seconds, 311
rtc_set_sqw_freq, 312
rtc_set_year, 312
rtc_setup, 302
rtc_setup_io, 313
rtc_sqw_freq_1024Hz, 303
rtc_sqw_freq_128Hz, 303
rtc_sqw_freq_16Hz, 303
rtc_sqw_freq_1Hz, 303
rtc_sqw_freq_2048Hz, 303
rtc_sqw_freq_256Hz, 303
rtc_sqw_freq_2Hz, 303
rtc_sqw_freq_32768Hz, 303
rtc_sqw_freq_32Hz, 303
rtc_sqw_freq_4096Hz, 303
rtc_sqw_freq_4Hz, 303
rtc_sqw_freq_512Hz, 304
rtc_sqw_freq_64Hz, 304
rtc_sqw_freq_8192Hz, 304
rtc_sqw_freq_8Hz, 304
rtc_start_clock, 313
rtc_start_sqw_output, 314
rtc_stop_clock, 314
rtc_stop_sqw_output, 314
m41t81s_alarm_date_reg
m41t81s.h, 300
m41t81s_alarm_hour_reg
m41t81s.h, 300
m41t81s_alarm_min_reg
m41t81s.h, 300
m41t81s_alarm_month_reg
m41t81s.h, 300
m41t81s_alarm_seconds_reg
m41t81s.h, 301
m41t81s_calibration_reg
m41t81s.h, 301
m41t81s_date_reg
m41t81s.h, 301
m41t81s_device_addr
m41t81s.h, 301
m41t81s_dow_reg
m41t81s.h, 301
m41t81s_flags_reg
m41t81s.h, 301
m41t81s_hours_reg
m41t81s.h, 301
m41t81s_minutes_reg
m41t81s.h, 301
m41t81s_month_reg
m41t81s.h, 301
m41t81s_part_seconds_reg
m41t81s.h, 302
m41t81s_reserved1_reg
m41t81s.h, 302
m41t81s_reserved2_reg
m41t81s.h, 302
m41t81s_reserved3_reg
m41t81s.h, 302
m41t81s_seconds_reg
m41t81s.h, 302
m41t81s_sqw_reg
m41t81s.h, 302
m41t81s_watchdog_reg
m41t81s.h, 302
m41t81s_year_reg
m41t81s.h, 302
MAC_CMD_ASSOC_REQ
wpan.h, 640
MAC_CMD_ASSOC_RES
wpan.h, 640
MAC_CMD_BEACON_REQ
wpan.h, 640
MAC_CMD_COORD_REALIGN
wpan.h, 641
MAC_CMD_DATA_REQ
wpan.h, 641
MAC_CMD_DISASSOC
wpan.h, 641
MAC_CMD_GTS_REQ
wpan.h, 641
MAC_CMD_ORPHAN
wpan.h, 641
MAC_CMD_PAN_ID_CONFLICT
wpan.h, 641
MAGIC_BOOSTBLOADER_REQUEST
pic_utils.h, 553
MAINCNT0
mrf24j40_defines.h, 366
MAINCNT0_MAINCNT0
mrf24j40_defines.h, 366
MAINCNT0_MAINCNT1
mrf24j40_defines.h, 366
MAINCNT0_MAINCNT2
mrf24j40_defines.h, 366
MAINCNT0_MAINCNT3
mrf24j40_defines.h, 366
MAINCNT0_MAINCNT4
mrf24j40_defines.h, 366
MAINCNT0_MAINCNT5
mrf24j40_defines.h, 366
MAINCNT0_MAINCNT6
mrf24j40_defines.h, 366
MAINCNT0_MAINCNT7
mrf24j40_defines.h, 366
MAINCNT1
mrf24j40_defines.h, 366
671
MAINCNT1_MAINCNT10
mrf24j40_defines.h, 366
MAINCNT1_MAINCNT11
mrf24j40_defines.h, 367
MAINCNT1_MAINCNT12
mrf24j40_defines.h, 367
MAINCNT1_MAINCNT13
mrf24j40_defines.h, 367
MAINCNT1_MAINCNT14
mrf24j40_defines.h, 367
MAINCNT1_MAINCNT15
mrf24j40_defines.h, 367
MAINCNT1_MAINCNT8
mrf24j40_defines.h, 367
MAINCNT1_MAINCNT9
mrf24j40_defines.h, 367
MAINCNT2
mrf24j40_defines.h, 367
MAINCNT2_MAINCNT16
mrf24j40_defines.h, 367
MAINCNT2_MAINCNT17
mrf24j40_defines.h, 367
MAINCNT2_MAINCNT18
mrf24j40_defines.h, 367
MAINCNT2_MAINCNT19
mrf24j40_defines.h, 368
MAINCNT2_MAINCNT20
mrf24j40_defines.h, 368
MAINCNT2_MAINCNT21
mrf24j40_defines.h, 368
MAINCNT2_MAINCNT22
mrf24j40_defines.h, 368
MAINCNT2_MAINCNT23
mrf24j40_defines.h, 368
MAINCNT3
mrf24j40_defines.h, 368
MAINCNT3_MAINCNT24
mrf24j40_defines.h, 368
MAINCNT3_MAINCNT25
mrf24j40_defines.h, 368
MAINCNT3_STARTCNT
mrf24j40_defines.h, 368
make_input
pic_utils.h, 553
make_output
pic_utils.h, 553
manufacturer_string_id
device_descriptor, 11
master_interface
CDC_union_functional_descriptor, 9
MAX_BRIGHTNESS
drv_ea_ldp6432.c, 106
drv_ea_ldp8008.c, 110
max_hop_count
its2_packet, 17
max_packet_size
endpoint_descriptor, 13
max_packet_size_ep0
device_descriptor, 12
max_power
configuration_descriptor, 10
MRF_ACK
mrf24j40.h, 332
MRF_FIRST_CHANNEL
mrf24j40.h, 332
MRF_INTCON
mrf24j40_defines.h, 368
MRF_INTCON_HSYMTMRIE
mrf24j40_defines.h, 368
MRF_INTCON_RXIE
mrf24j40_defines.h, 369
MRF_INTCON_SECIE
mrf24j40_defines.h, 369
MRF_INTCON_SLPIE
mrf24j40_defines.h, 369
MRF_INTCON_TXG1IE
mrf24j40_defines.h, 369
MRF_INTCON_TXG2IE
mrf24j40_defines.h, 369
MRF_INTCON_TXNIE
mrf24j40_defines.h, 369
MRF_INTCON_WAKEIE
mrf24j40_defines.h, 369
MRF_LAST_CHANNEL
mrf24j40.h, 332
MRF_NO_ACK
mrf24j40.h, 332
mrf24h40_pan_association_requested
mrf24j40.c, 316
mrf24j40.c, 315
current_channel, 329
data_sequence_number, 329
extended_address, 329
mrf24h40_pan_association_requested, 316
mrf24j40_active_channel_scan, 316
mrf24j40_associate_to_pan, 317
mrf24j40_flush_receive_buffer, 317
mrf24j40_handle_isr, 317
mrf24j40_init, 318
mrf24j40_init_coordinator, 319
mrf24j40_long_addr_read, 319
mrf24j40_long_addr_write, 320
mrf24j40_orphan_channel_scan, 321
mrf24j40_realign_pan, 321
mrf24j40_receive, 321
mrf24j40_scan_for_lowest_channel_ed, 321
mrf24j40_set_channel, 322
mrf24j40_set_extended_address, 323
mrf24j40_set_pan_id, 324
mrf24j40_set_short_address, 324
mrf24j40_setup_io, 325
mrf24j40_short_addr_read, 325
672
mrf24j40_short_addr_write, 326
mrf24j40_start_pan, 327
mrf24j40_transmit, 327
mrf24j40_transmit_to_extended_address, 328
mrf24j40_transmit_to_short_address, 328
pan_id, 329
short_address, 330
mrf24j40.h, 330
LOC_CANADA, 331
LOC_EUROPE, 331
LOC_UNDEFINED, 332
LOC_UNITED_STATES, 332
MRF_ACK, 332
MRF_FIRST_CHANNEL, 332
MRF_LAST_CHANNEL, 332
MRF_NO_ACK, 332
mrf24j40_flush_receive_buffer, 332
mrf24j40_handle_isr, 333
mrf24j40_init, 333
mrf24j40_long_addr_read, 334
mrf24j40_long_addr_write, 335
mrf24j40_receive, 336
mrf24j40_receive_callback, 336
mrf24j40_scan_for_lowest_channel_ed, 337
mrf24j40_set_channel, 337
mrf24j40_set_extended_address, 338
mrf24j40_set_pan_id, 339
mrf24j40_set_short_address, 340
mrf24j40_setup_io, 340
mrf24j40_short_addr_read, 341
mrf24j40_short_addr_write, 341
mrf24j40_transmit, 342
mrf24j40_transmit_callback, 343
mrf24j40_transmit_to_extended_address, 343
mrf24j40_transmit_to_short_address, 344
mrf24j40_active_channel_scan
mrf24j40.c, 316
mrf24j40_associate_to_pan
mrf24j40.c, 317
mrf24j40_defines.h, 345
ACKTMOUT, 355
ACKTMOUT_DRPACK, 355
ACKTMOUT_MAWD0, 355
ACKTMOUT_MAWD1, 355
ACKTMOUT_MAWD2, 355
ACKTMOUT_MAWD3, 355
ACKTMOUT_MAWD4, 355
ACKTMOUT_MAWD5, 355
ACKTMOUT_MAWD6, 355
ASSOEADR0, 356
ASSOEADR1, 356
ASSOEADR2, 356
ASSOEADR3, 356
ASSOEADR4, 356
ASSOEADR5, 356
ASSOEADR6, 356
ASSOEADR7, 356
ASSOSADR0, 356
ASSOSADR1, 356
BBREG0, 356
BBREG0_TURBO, 357
BBREG1, 357
BBREG1_RXDECINV, 357
BBREG2, 357
BBREG2_CCACSTH0, 357
BBREG2_CCACSTH1, 357
BBREG2_CCACSTH2, 357
BBREG2_CCACSTH3, 357
BBREG2_CCAMODE0, 357
BBREG2_CCAMODE1, 357
BBREG3, 358
BBREG3_PREDETTH0, 358
BBREG3_PREDETTH1, 358
BBREG3_PREDETTH2, 358
BBREG3_PREVALIDTH0, 358
BBREG3_PREVALIDTH1, 358
BBREG3_PREVALIDTH2, 358
BBREG3_PREVALIDTH3, 358
BBREG4, 358
BBREG4_CSTH0, 358
BBREG4_CSTH1, 358
BBREG4_CSTH2, 359
BBREG4_PRECNT0, 359
BBREG4_PRECNT1, 359
BBREG4_PRECNT2, 359
BBREG6, 359
BBREG6_RSSIMODE1, 359
BBREG6_RSSIMODE2, 359
BBREG6_RSSIRDY, 359
CCAEDTH, 359
CCAEDTH_CCAEDTH0, 359
CCAEDTH_CCAEDTH1, 360
CCAEDTH_CCAEDTH2, 360
CCAEDTH_CCAEDTH3, 360
CCAEDTH_CCAEDTH4, 360
CCAEDTH_CCAEDTH5, 360
CCAEDTH_CCAEDTH6, 360
CCAEDTH_CCAEDTH7, 360
EADR0, 360
EADR1, 360
EADR2, 360
EADR3, 360
EADR4, 361
EADR5, 361
EADR6, 361
EADR7, 361
ESLOTG1, 361
ESLOTG23, 361
ESLOTG45, 361
ESLOTG67, 361
FRMOFFSET, 361
FRMOFFSET_OFFSET0, 361
673
FRMOFFSET_OFFSET1, 362
FRMOFFSET_OFFSET2, 362
FRMOFFSET_OFFSET3, 362
FRMOFFSET_OFFSET4, 362
FRMOFFSET_OFFSET5, 362
FRMOFFSET_OFFSET6, 362
FRMOFFSET_OFFSET7, 362
GATECLK, 362
GATECLK_GTSON, 362
GPIO, 362
GPIO_GPIO0, 362
GPIO_GPIO1, 363
GPIO_GPIO2, 363
GPIO_GPIO3, 363
GPIO_GPIO4, 363
GPIO_GPIO5, 363
HSYMTMRH, 363
HSYMTMRH_HSYMTMR08, 363
HSYMTMRH_HSYMTMR09, 363
HSYMTMRH_HSYMTMR10, 363
HSYMTMRH_HSYMTMR11, 363
HSYMTMRH_HSYMTMR12, 363
HSYMTMRH_HSYMTMR13, 364
HSYMTMRH_HSYMTMR14, 364
HSYMTMRH_HSYMTMR15, 364
HSYMTMRL, 364
HSYMTMRL_HSYMTMR0, 364
HSYMTMRL_HSYMTMR1, 364
HSYMTMRL_HSYMTMR2, 364
HSYMTMRL_HSYMTMR3, 364
HSYMTMRL_HSYMTMR4, 364
HSYMTMRL_HSYMTMR5, 364
HSYMTMRL_HSYMTMR6, 364
HSYMTMRL_HSYMTMR7, 365
INTSTAT, 365
INTSTAT_HSYMTMRIF, 365
INTSTAT_RXIF, 365
INTSTAT_SECIF, 365
INTSTAT_SLPIF, 365
INTSTAT_TXG1IF, 365
INTSTAT_TXG2IF, 365
INTSTAT_TXNIF, 365
INTSTAT_WAKEIF, 365
MAINCNT0, 366
MAINCNT0_MAINCNT0, 366
MAINCNT0_MAINCNT1, 366
MAINCNT0_MAINCNT2, 366
MAINCNT0_MAINCNT3, 366
MAINCNT0_MAINCNT4, 366
MAINCNT0_MAINCNT5, 366
MAINCNT0_MAINCNT6, 366
MAINCNT0_MAINCNT7, 366
MAINCNT1, 366
MAINCNT1_MAINCNT10, 366
MAINCNT1_MAINCNT11, 367
MAINCNT1_MAINCNT12, 367
MAINCNT1_MAINCNT13, 367
MAINCNT1_MAINCNT14, 367
MAINCNT1_MAINCNT15, 367
MAINCNT1_MAINCNT8, 367
MAINCNT1_MAINCNT9, 367
MAINCNT2, 367
MAINCNT2_MAINCNT16, 367
MAINCNT2_MAINCNT17, 367
MAINCNT2_MAINCNT18, 367
MAINCNT2_MAINCNT19, 368
MAINCNT2_MAINCNT20, 368
MAINCNT2_MAINCNT21, 368
MAINCNT2_MAINCNT22, 368
MAINCNT2_MAINCNT23, 368
MAINCNT3, 368
MAINCNT3_MAINCNT24, 368
MAINCNT3_MAINCNT25, 368
MAINCNT3_STARTCNT, 368
MRF_INTCON, 368
MRF_INTCON_HSYMTMRIE, 368
MRF_INTCON_RXIE, 369
MRF_INTCON_SECIE, 369
MRF_INTCON_SLPIE, 369
MRF_INTCON_TXG1IE, 369
MRF_INTCON_TXG2IE, 369
MRF_INTCON_TXNIE, 369
MRF_INTCON_WAKEIE, 369
ORDER, 369
ORDER_BO0, 369
ORDER_BO1, 369
ORDER_BO2, 369
ORDER_BO3, 370
ORDER_SO0, 370
ORDER_SO1, 370
ORDER_SO2, 370
ORDER_SO3, 370
PACON0, 370
PACON0_PAONT0, 370
PACON0_PAONT1, 370
PACON0_PAONT2, 370
PACON0_PAONT3, 370
PACON0_PAONT4, 370
PACON0_PAONT5, 371
PACON0_PAONT6, 371
PACON0_PAONT7, 371
PACON1, 371
PACON1_PAONT8, 371
PACON1_PAONTS0, 371
PACON1_PAONTS1, 371
PACON1_PAONTS2, 371
PACON1_PAONTS3, 371
PACON2, 371
PACON2_FIFOEN, 372
PACON2_TXONT7, 372
PACON2_TXONT8, 372
PACON2_TXONTS0, 372
674
PACON2_TXONTS1, 372
PACON2_TXONTS2, 372
PACON2_TXONTS3, 372
PANIDH, 372
PANIDL, 372
REMCNTH, 372
REMCNTH_REMCNT10, 372
REMCNTH_REMCNT11, 373
REMCNTH_REMCNT12, 373
REMCNTH_REMCNT13, 373
REMCNTH_REMCNT14, 373
REMCNTH_REMCNT15, 373
REMCNTH_REMCNT8, 373
REMCNTH_REMCNT9, 373
REMCNTL, 373
REMCNTL_REMCNT0, 373
REMCNTL_REMCNT1, 373
REMCNTL_REMCNT2, 373
REMCNTL_REMCNT3, 374
REMCNTL_REMCNT4, 374
REMCNTL_REMCNT5, 374
REMCNTL_REMCNT6, 374
REMCNTL_REMCNT7, 374
RFCON0, 374
RFCON0_CHANNEL0, 374
RFCON0_CHANNEL1, 374
RFCON0_CHANNEL2, 374
RFCON0_CHANNEL3, 374
RFCON0_RFOPT0, 375
RFCON0_RFOPT1, 375
RFCON0_RFOPT2, 375
RFCON0_RFOPT3, 375
RFCON1, 375
RFCON1_VCOOPT0, 375
RFCON1_VCOOPT1, 375
RFCON1_VCOOPT2, 375
RFCON1_VCOOPT3, 375
RFCON1_VCOOPT4, 375
RFCON1_VCOOPT5, 375
RFCON1_VCOOPT6, 376
RFCON1_VCOOPT7, 376
RFCON2, 376
RFCON2_PLLEN, 376
RFCON3, 376
RFCON3_TXPWRL0, 376
RFCON3_TXPWRL1, 376
RFCON3_TXPWRS0, 376
RFCON3_TXPWRS1, 376
RFCON3_TXPWRS2, 376
RFCON5, 376
RFCON5_BATTH0, 377
RFCON5_BATTH1, 377
RFCON5_BATTH2, 377
RFCON5_BATTH3, 377
RFCON6, 377
RFCON6_20MRECVR, 377
RFCON6_BATEN, 377
RFCON6_TXFIL, 377
RFCON7, 377
RFCON7_CLKOUTMODE0, 377
RFCON7_CLKOUTMODE1, 378
RFCON7_SLPCLKSEL0, 378
RFCON7_SLPCLKSEL1, 378
RFCON8, 378
RFCON8_RFVCO, 378
RFCTL, 378
RFCTL_RFRST, 378
RFCTL_WAKECNT7, 378
RFCTL_WAKECNT8, 378
RFSTATE, 378
RFSTATE_RFSTATE0, 379
RFSTATE_RFSTATE1, 379
RFSTATE_RFSTATE2, 379
RSSI, 379
RSSI_RSSI0, 379
RSSI_RSSI1, 379
RSSI_RSSI2, 379
RSSI_RSSI3, 379
RSSI_RSSI4, 379
RSSI_RSSI5, 379
RSSI_RSSI6, 379
RSSI_RSSI7, 380
RXFLUSH, 380
RXFLUSH_BCNONLY, 380
RXFLUSH_CMDONLY, 380
RXFLUSH_DATAONLY, 380
RXFLUSH_RXFLUSH, 380
RXFLUSH_WAKEPAD, 380
RXFLUSH_WAKEPOL, 380
RXMCR, 380
RXMCR_COORD, 380
RXMCR_ERRPKT, 381
RXMCR_NOACKRSP, 381
RXMCR_PANCOORD, 381
RXMCR_PROMI, 381
RXSR, 381
RXSR_BATIND, 381
RXSR_UPSECERR, 381
SADRH, 381
SADRL, 381
SECCON0, 381
SECCON0_RXCIPHER0, 382
SECCON0_RXCIPHER1, 382
SECCON0_RXCIPHER2, 382
SECCON0_SECIGNORE, 382
SECCON0_SECSTART, 382
SECCON0_TXNCIPHER0, 382
SECCON0_TXNCIPHER1, 382
SECCON0_TXNCIPHER2, 382
SECCON1, 382
SECCON1_DISDEC, 382
SECCON1_DISENC, 382
675
SECCON1_TXBCIPHER0, 383
SECCON1_TXBCIPHER1, 383
SECCON1_TXBCIPHER2, 383
SECCR2, 383
SECCR2_TXG1CIPHER0, 383
SECCR2_TXG1CIPHER1, 383
SECCR2_TXG1CIPHER2, 383
SECCR2_TXG2CIPHER0, 383
SECCR2_TXG2CIPHER1, 383
SECCR2_TXG2CIPHER2, 383
SECCR2_UPDEC, 383
SECCR2_UPENC, 384
SLPACK, 384
SLPACK_SLPACK, 384
SLPACK_WAKECNT0, 384
SLPACK_WAKECNT1, 384
SLPACK_WAKECNT2, 384
SLPACK_WAKECNT3, 384
SLPACK_WAKECNT4, 384
SLPACK_WAKECNT5, 384
SLPACK_WAKECNT6, 384
SLPCAL0, 384
SLPCAL0_SLPCAL0, 385
SLPCAL0_SLPCAL1, 385
SLPCAL0_SLPCAL2, 385
SLPCAL0_SLPCAL3, 385
SLPCAL0_SLPCAL4, 385
SLPCAL0_SLPCAL5, 385
SLPCAL0_SLPCAL6, 385
SLPCAL0_SLPCAL7, 385
SLPCAL1, 385
SLPCAL1_SLPCAL10, 385
SLPCAL1_SLPCAL11, 385
SLPCAL1_SLPCAL12, 386
SLPCAL1_SLPCAL13, 386
SLPCAL1_SLPCAL14, 386
SLPCAL1_SLPCAL15, 386
SLPCAL1_SLPCAL8, 386
SLPCAL1_SLPCAL9, 386
SLPCAL2, 386
SLPCAL2_SLPCAL16, 386
SLPCAL2_SLPCAL17, 386
SLPCAL2_SLPCAL18, 386
SLPCAL2_SLPCAL19, 386
SLPCAL2_SLPCALEN, 387
SLPCAL2_SLPCALRDY, 387
SLPCON0, 387
SLPCON0_INTEDGE, 387
SLPCON0_SLPCLKEN, 387
SLPCON1, 387
SLPCON1_CLKOUTEN, 387
SLPCON1_SLPCLKDIV0, 387
SLPCON1_SLPCLKDIV1, 387
SLPCON1_SLPCLKDIV2, 387
SLPCON1_SLPCLKDIV3, 387
SLPCON1_SLPCLKDIV4, 388
SOFTRST, 388
SOFTRST_RSTBB, 388
SOFTRST_RSTMAC, 388
SOFTRST_RSTPWR, 388
SYMTICKH, 388
SYMTICKH_TICKP8, 388
SYMTICKH_TXONT0, 388
SYMTICKH_TXONT1, 388
SYMTICKH_TXONT2, 388
SYMTICKH_TXONT3, 388
SYMTICKH_TXONT4, 389
SYMTICKH_TXONT5, 389
SYMTICKH_TXONT6, 389
SYMTICKL, 389
SYMTICKL_TICKP0, 389
SYMTICKL_TICKP1, 389
SYMTICKL_TICKP2, 389
SYMTICKL_TICKP3, 389
SYMTICKL_TICKP4, 389
SYMTICKL_TICKP5, 389
SYMTICKL_TICKP6, 389
SYMTICKL_TICKP7, 390
TESTMODE, 390
TESTMODE_RSSIWAIT0, 390
TESTMODE_RSSIWAIT1, 390
TESTMODE_TESTMODE0, 390
TESTMODE_TESTMODE1, 390
TESTMODE_TESTMODE2, 390
TRISGPIO, 390
TRISGPIO_TRISGP0, 390
TRISGPIO_TRISGP1, 390
TRISGPIO_TRISGP2, 390
TRISGPIO_TRISGP3, 391
TRISGPIO_TRISGP4, 391
TRISGPIO_TRISGP5, 391
TXBCON0, 391
TXBCON0_TXBSECEN, 391
TXBCON0_TXBTRIG, 391
TXBCON1, 391
TXG1CON, 391
TXG1CON_TXG1ACKREQ, 391
TXG1CON_TXG1RETRY0, 391
TXG1CON_TXG1RETRY1, 391
TXG1CON_TXG1SECEN, 392
TXG1CON_TXG1SLOT0, 392
TXG1CON_TXG1SLOT1, 392
TXG1CON_TXG1SLOT2, 392
TXG1CON_TXG1TRIG, 392
TXG2CON, 392
TXG2CON_TXG2ACKREQ, 392
TXG2CON_TXG2RETRY0, 392
TXG2CON_TXG2RETRY1, 392
TXG2CON_TXG2SECEN, 392
TXG2CON_TXG2SLOT0, 392
TXG2CON_TXG2SLOT1, 393
TXG2CON_TXG2SLOT2, 393
676
TXG2CON_TXG2TRIG, 393
TXMCR, 393
TXMCR_BATLIFEXT, 393
TXMCR_CSMABF0, 393
TXMCR_CSMABF1, 393
TXMCR_CSMABF2, 393
TXMCR_MACMINBE0, 393
TXMCR_MACMINBE1, 393
TXMCR_NOCSMA, 394
TXMCR_SLOTTED, 394
TXNCON, 394
TXNCON_FPSTAT, 394
TXNCON_INDIRECT, 394
TXNCON_TXNACKREQ, 394
TXNCON_TXNSECEN, 394
TXNCON_TXNTRIG, 394
TXPEND, 394
TXPEND_FPACK, 394
TXPEND_GTSSWITCH, 395
TXPEND_MLIFS0, 395
TXPEND_MLIFS1, 395
TXPEND_MLIFS2, 395
TXPEND_MLIFS3, 395
TXPEND_MLIFS4, 395
TXPEND_MLIFS5, 395
TXSTAT, 395
TXSTAT_CCAFAIL, 395
TXSTAT_TXG1FNT, 395
TXSTAT_TXG1STAT, 396
TXSTAT_TXG2FNT, 396
TXSTAT_TXG2STAT, 396
TXSTAT_TXNRETRY0, 396
TXSTAT_TXNRETRY1, 396
TXSTAT_TXNSTAT, 396
TXSTBL, 396
TXSTBL_MSIFS0, 396
TXSTBL_MSIFS1, 396
TXSTBL_MSIFS2, 396
TXSTBL_MSIFS3, 396
TXSTBL_RFSTBL0, 397
TXSTBL_RFSTBL1, 397
TXSTBL_RFSTBL2, 397
TXSTBL_RFSTBL3, 397
TXTIME, 397
TXTIME_TURNTIME0, 397
TXTIME_TURNTIME1, 397
TXTIME_TURNTIME2, 397
TXTIME_TURNTIME3, 397
UPNONCE0, 397
UPNONCE1, 397
UPNONCE10, 398
UPNONCE11, 398
UPNONCE12, 398
UPNONCE2, 398
UPNONCE3, 398
UPNONCE4, 398
UPNONCE5, 398
UPNONCE6, 398
UPNONCE7, 398
UPNONCE8, 398
UPNONCE9, 398
WAKECON, 399
WAKECON_IMMWAKE, 399
WAKECON_REGWAKE, 399
WAKETIMEH, 399
WAKETIMEH_WAKETIME10, 399
WAKETIMEH_WAKETIME8, 399
WAKETIMEH_WAKETIME9, 399
WAKETIMEL, 399
WAKETIMEL_WAKETIME0, 399
WAKETIMEL_WAKETIME1, 399
WAKETIMEL_WAKETIME2, 399
WAKETIMEL_WAKETIME3, 400
WAKETIMEL_WAKETIME4, 400
WAKETIMEL_WAKETIME5, 400
WAKETIMEL_WAKETIME6, 400
WAKETIMEL_WAKETIME7, 400
mrf24j40_flush_receive_buffer
mrf24j40.c, 317
mrf24j40.h, 332
mrf24j40_handle_isr
mrf24j40.c, 317
mrf24j40.h, 333
mrf24j40_init
mrf24j40.c, 318
mrf24j40.h, 333
mrf24j40_init_coordinator
mrf24j40.c, 319
mrf24j40_long_addr_read
mrf24j40.c, 319
mrf24j40.h, 334
mrf24j40_long_addr_write
mrf24j40.c, 320
mrf24j40.h, 335
mrf24j40_orphan_channel_scan
mrf24j40.c, 321
mrf24j40_realign_pan
mrf24j40.c, 321
mrf24j40_receive
mrf24j40.c, 321
mrf24j40.h, 336
mrf24j40_receive_callback
mrf24j40.h, 336
wpan.c, 633
mrf24j40_scan_for_lowest_channel_ed
mrf24j40.c, 321
mrf24j40.h, 337
mrf24j40_set_channel
mrf24j40.c, 322
mrf24j40.h, 337
mrf24j40_set_extended_address
mrf24j40.c, 323
677
mrf24j40.h, 338
mrf24j40_set_pan_id
mrf24j40.c, 324
mrf24j40.h, 339
mrf24j40_set_short_address
mrf24j40.c, 324
mrf24j40.h, 340
mrf24j40_setup_io
mrf24j40.c, 325
mrf24j40.h, 340
mrf24j40_short_addr_read
mrf24j40.c, 325
mrf24j40.h, 341
mrf24j40_short_addr_write
mrf24j40.c, 326
mrf24j40.h, 341
mrf24j40_start_pan
mrf24j40.c, 327
mrf24j40_transmit
mrf24j40.c, 327
mrf24j40.h, 342
mrf24j40_transmit_callback
mrf24j40.h, 343
wpan.c, 634
mrf24j40_transmit_to_extended_address
mrf24j40.c, 328
mrf24j40.h, 343
mrf24j40_transmit_to_short_address
mrf24j40.c, 328
mrf24j40.h, 344
ms5540.c, 400
c1, 406
c2, 406
c3, 406
c4, 406
c5, 406
c6, 406
ms5540_calc_temp_and_pressure, 402
MS5540_DELAY_AMOUNT, 402
ms5540_get_config, 402
ms5540_get_raw_pressure, 403
ms5540_get_raw_temp, 403
ms5540_init, 403
ms5540_pulse_sclk, 404
ms5540_reset, 404
ms5540_send_start, 405
ms5540_send_stop, 405
ms5540_setup_io, 406
ms5540.h, 407
ms5540_calc_temp_and_pressure, 408
ms5540_get_config, 408
ms5540_get_raw_pressure, 409
ms5540_get_raw_temp, 409
ms5540_init, 409
ms5540_reset, 410
ms5540_setup, 408
ms5540_setup_io, 410
ms5540_calc_temp_and_pressure
ms5540.c, 402
ms5540.h, 408
MS5540_DELAY_AMOUNT
ms5540.c, 402
ms5540_get_config
ms5540.c, 402
ms5540.h, 408
ms5540_get_raw_pressure
ms5540.c, 403
ms5540.h, 409
ms5540_get_raw_temp
ms5540.c, 403
ms5540.h, 409
ms5540_init
ms5540.c, 403
ms5540.h, 409
ms5540_pulse_sclk
ms5540.c, 404
ms5540_reset
ms5540.c, 404
ms5540.h, 410
ms5540_send_start
ms5540.c, 405
ms5540_send_stop
ms5540.c, 405
ms5540_setup
ms5540.h, 408
ms5540_setup_io
ms5540.c, 406
ms5540.h, 410
NEXT_HOP_NOT_LOCAL
its_mode2.h, 260
not_SERIAL_STATE
usb_cdc_class.c, 616
num_class_descriptors
hid_descriptor, 14
num_configurations
device_descriptor, 12
num_endpoints
interface_descriptor, 16
num_interfaces
configuration_descriptor, 10
num_routes
its2_packet, 17
NUMBER_PORTS
pic_utils.h, 553
OLIMEX_BOARD
platform.h, 558
OLIMEX_PIC_LCD3310
platform.h, 558
OP_ENABLE_1_MBPS
pic_rf_2401a.h, 441
pic_rf_24l01.h, 455
OP_ENABLE_CH2
678
pic_rf_2401a.h, 441
pic_rf_24l01.h, 455
OP_ENABLE_CRC
pic_rf_2401a.h, 441
pic_rf_24l01.h, 455
OP_ENABLE_RECEIVE
pic_rf_2401a.h, 441
pic_rf_24l01.h, 455
OP_ENABLE_SHOCKBURST
pic_rf_2401a.h, 441
pic_rf_24l01.h, 455
OP_LONG_CRC
pic_rf_2401a.h, 441
pic_rf_24l01.h, 455
options
rf_config, 28
ORDER
mrf24j40_defines.h, 369
ORDER_BO0
mrf24j40_defines.h, 369
ORDER_BO1
mrf24j40_defines.h, 369
ORDER_BO2
mrf24j40_defines.h, 369
ORDER_BO3
mrf24j40_defines.h, 370
ORDER_SO0
mrf24j40_defines.h, 370
ORDER_SO1
mrf24j40_defines.h, 370
ORDER_SO2
mrf24j40_defines.h, 370
ORDER_SO3
mrf24j40_defines.h, 370
output_power
rf_config, 28
packet
queued_item, 25
sending_item, 34
packet_type
its2_packet, 17
PACON0
mrf24j40_defines.h, 370
PACON0_PAONT0
mrf24j40_defines.h, 370
PACON0_PAONT1
mrf24j40_defines.h, 370
PACON0_PAONT2
mrf24j40_defines.h, 370
PACON0_PAONT3
mrf24j40_defines.h, 370
PACON0_PAONT4
mrf24j40_defines.h, 370
PACON0_PAONT5
mrf24j40_defines.h, 371
PACON0_PAONT6
mrf24j40_defines.h, 371
PACON0_PAONT7
mrf24j40_defines.h, 371
PACON1
mrf24j40_defines.h, 371
PACON1_PAONT8
mrf24j40_defines.h, 371
PACON1_PAONTS0
mrf24j40_defines.h, 371
PACON1_PAONTS1
mrf24j40_defines.h, 371
PACON1_PAONTS2
mrf24j40_defines.h, 371
PACON1_PAONTS3
mrf24j40_defines.h, 371
PACON2
mrf24j40_defines.h, 371
PACON2_FIFOEN
mrf24j40_defines.h, 372
PACON2_TXONT7
mrf24j40_defines.h, 372
PACON2_TXONT8
mrf24j40_defines.h, 372
PACON2_TXONTS0
mrf24j40_defines.h, 372
PACON2_TXONTS1
mrf24j40_defines.h, 372
PACON2_TXONTS2
mrf24j40_defines.h, 372
PACON2_TXONTS3
mrf24j40_defines.h, 372
pan_id
local_address, 23
mrf24j40.c, 329
PANIDH
mrf24j40_defines.h, 372
PANIDL
mrf24j40_defines.h, 372
parity
line_coding, 22
payload
rf_packet_det, 30
payload_width_ch1
rf_config, 28
payload_width_ch2
rf_config, 28
pcd8544.c, 411
pcd8544_init, 411
pcd8544_send_byte, 412
pcd8544_send_command, 412
pcd8544_send_data, 412
pcd8544_setup_io, 413
pcd8544.h, 413
pcd8544_clear, 414
pcd8544_init, 414
pcd8544_send_byte, 414
679
pcd8544_send_command, 415
pcd8544_send_data, 415
pcd8544_set_pixel, 415
pcd8544_setup, 414
pcd8544_setup_io, 415
pcd8544_write, 416
pcd8544_clear
pcd8544.h, 414
pcd8544_init
pcd8544.c, 411
pcd8544.h, 414
pcd8544_send_byte
pcd8544.c, 412
pcd8544.h, 414
pcd8544_send_command
pcd8544.c, 412
pcd8544.h, 415
pcd8544_send_data
pcd8544.c, 412
pcd8544.h, 415
pcd8544_set_pixel
pcd8544.h, 415
pcd8544_setup
pcd8544.h, 414
pcd8544_setup_io
pcd8544.c, 413
pcd8544.h, 415
pcd8544_write
pcd8544.h, 416
pic_flash.c, 416
pic_flash.h, 416
flash_erase, 417
flash_write, 417
pic_packet.c, 417
pkt_calc_check_byte, 419
pkt_check_check_byte, 419
PKT_FLAG_DELETED, 419
pkt_init, 419
pkt_my_addr, 424
pkt_my_next_pkt_id, 424
pkt_print_packet, 420
pkt_process_rf_data, 420
pkt_process_tx_queue, 421
pkt_queue_packet, 422
pkt_seen, 422
pkt_seen_list, 424
pkt_seen_list_last, 424
pkt_send_packet, 423
pkt_send_payload, 423
pkt_tx_queue, 424
pic_packet.h, 425
PKT_BROADCAST_ADDR, 426
PKT_CONFIG_ADDR, 426
PKT_DIRECT_SEND_ADDR, 426
PKT_FLAG_BROADCAST, 427
PKT_FLAG_NO_RESEND, 427
PKT_FLAG_RESEND, 427
pkt_init, 429
PKT_PACKET_SIZE, 427
pkt_payload_rx_callback, 429
pkt_process_rf_data, 429
pkt_process_tx_queue, 430
pkt_send_callback, 431
pkt_send_failed_callback, 431
pkt_send_payload, 431
pkt_send_succeeded_callback, 432
PKT_STATUS_CHECK_FAIL, 427
PKT_STATUS_DIRECT_SEND, 427
PKT_STATUS_I_AM_SENDER, 427
PKT_STATUS_NEED_TO_REBROADCAST,
427
PKT_STATUS_PKT_FOR_ME_BUT_SEEN, 428
PKT_STATUS_PKT_IS_ACK_FOR_ME, 428
PKT_STATUS_PKT_IS_FACK_FOR_ME, 428
PKT_STATUS_PKT_IS_FOR_ME, 428
PKT_STATUS_PREVIOUS_ROUTED_VIA_ME
, 428
PKT_STATUS_QUEUED, 428
PKT_STATUS_ROUTING_FULL, 428
PKT_STATUS_SEEN_BEFORE, 428
PKT_STATUS_TX_QUEUE_FULL, 428
RF_RX_BUFFER_SIZE, 429
pic_pwm.c, 432
pwm_count, 434
pwm_get_level, 433
pwm_handle, 433
pwm_level, 434
pwm_set_level, 433
pwm_set_transition, 434
pwm_setup_io, 434
pic_pwm.h, 434
pwm_count, 436
pwm_get_level, 435
pwm_handle, 435
pwm_level, 436
pwm_set_level, 435
pwm_set_transition, 436
pwm_setup_io, 436
pic_rf_2401a.c, 436
pic_rf_init, 437
pic_rf_quick_init, 437
pic_rf_receive, 437
pic_rf_send_byte, 437
pic_rf_send_bytes, 438
pic_rf_set_channel, 438
pic_rf_set_mode, 439
pic_rf_setup, 439
pic_rf_transmit, 439
pic_rf_2401a.h, 439
OP_ENABLE_1_MBPS, 441
OP_ENABLE_CH2, 441
OP_ENABLE_CRC, 441
680
OP_ENABLE_RECEIVE, 441
OP_ENABLE_SHOCKBURST, 441
OP_LONG_CRC, 441
pic_rf_chip_enable, 442
pic_rf_chip_select, 442
pic_rf_init, 442
pic_rf_init_inline, 442
pic_rf_quick_init, 443
pic_rf_receive, 443
pic_rf_receive_mode, 442
pic_rf_send_byte, 443
pic_rf_send_bytes, 443
pic_rf_send_bytes_inline, 443
pic_rf_set_channel, 444
pic_rf_set_mode, 444
pic_rf_setup, 444
pic_rf_transmit, 444
pic_rf_transmit_mode, 442
RECEIVE_MODE, 442
rf_current_channel, 445
rf_current_mode_receive, 445
TRANSMIT_MODE, 442
pic_rf_24l01.c, 445
pic_rf_init, 446
pic_rf_quick_init, 447
pic_rf_read_register, 447
pic_rf_read_register_int, 447
pic_rf_receive, 447
pic_rf_receive_inline, 448
pic_rf_receive2, 448
pic_rf_send_byte, 448
pic_rf_send_byte_int, 449
pic_rf_send_command, 449
pic_rf_send_command_single, 450
pic_rf_set_channel, 450
pic_rf_set_mode, 450
pic_rf_setup, 451
pic_rf_transmit, 451
pic_rf_24l01.h, 452
CONFIG_CRCO, 454
CONFIG_EN_CRC, 454
CONFIG_MASK_MAX_RT, 454
CONFIG_MASK_RX_DR, 454
CONFIG_MASK_TX_DS, 454
CONFIG_PRIM_RX, 454
CONFIG_PWR_UP, 454
FIFO_STATUS_RX_EMPTY, 454
FIFO_STATUS_RX_FULL, 455
FIFO_STATUS_TX_EMPTY, 455
FIFO_STATUS_TX_FULL, 455
FIFO_STATUS_TX_REUSE, 455
OP_ENABLE_1_MBPS, 455
OP_ENABLE_CH2, 455
OP_ENABLE_CRC, 455
OP_ENABLE_RECEIVE, 455
OP_ENABLE_SHOCKBURST, 455
OP_LONG_CRC, 455
pic_rf_get_status, 455
pic_rf_init, 459
pic_rf_quick_init, 459
pic_rf_read_register, 460
pic_rf_read_register_inline, 460
pic_rf_receive, 461
pic_rf_receive_inline, 461
pic_rf_receive_mode, 456
pic_rf_send_byte, 462
pic_rf_send_byte_int, 462
pic_rf_send_command, 463
pic_rf_send_command_inline, 463
pic_rf_send_command_single, 464
pic_rf_set_channel, 464
pic_rf_set_mode, 465
pic_rf_set_status, 456
pic_rf_setup, 465
pic_rf_transmit, 465
pic_rf_transmit_mode, 456
RECEIVE_MODE, 456
rf_current_channel, 466
rf_current_mode_receive, 466
RF_FLUSH_RX, 456
RF_FLUSH_TX, 456
RF_NOP, 456
RF_R_RX_PAYLOAD, 456
RF_RD_REG_CD, 456
RF_RD_REG_CONFIG_REG, 456
RF_RD_REG_FIFO_STATUS, 457
RF_RD_REG_RX_PW_P0, 457
RF_RD_REG_STATUS, 457
RF_W_TX_PAYLOAD, 457
RF_WR_REG_CONFIG_REG, 457
RF_WR_REG_EN_AA, 457
RF_WR_REG_RF_CH, 457
RF_WR_REG_RF_SETUP, 457
RF_WR_REG_RX_ADDR_P0, 457
RF_WR_REG_RX_PW_P0, 458
RF_WR_REG_SETUP_AW, 458
RF_WR_REG_SETUP_RETR, 458
RF_WR_REG_STATUS, 458
RF_WR_REG_TX_ADDR, 458
STATUS_MAX_RT, 458
STATUS_RX_DR, 458
STATUS_TX_DS, 458
STATUS_TX_FULL, 458
TRANSMIT_MODE, 459
pic_rf_chip_enable
pic_rf_2401a.h, 442
pic_rf_chip_select
pic_rf_2401a.h, 442
pic_rf_get_status
pic_rf_24l01.h, 455
pic_rf_init
pic_rf_2401a.c, 437
681
pic_rf_2401a.h, 442
pic_rf_24l01.c, 446
pic_rf_24l01.h, 459
pic_rf_init_inline
pic_rf_2401a.h, 442
pic_rf_quick_init
pic_rf_2401a.c, 437
pic_rf_2401a.h, 443
pic_rf_24l01.c, 447
pic_rf_24l01.h, 459
pic_rf_read_register
pic_rf_24l01.c, 447
pic_rf_24l01.h, 460
pic_rf_read_register_inline
pic_rf_24l01.h, 460
pic_rf_read_register_int
pic_rf_24l01.c, 447
pic_rf_receive
pic_rf_2401a.c, 437
pic_rf_2401a.h, 443
pic_rf_24l01.c, 447
pic_rf_24l01.h, 461
pic_rf_receive_inline
pic_rf_24l01.c, 448
pic_rf_24l01.h, 461
pic_rf_receive_mode
pic_rf_2401a.h, 442
pic_rf_24l01.h, 456
pic_rf_receive2
pic_rf_24l01.c, 448
pic_rf_send_byte
pic_rf_2401a.c, 437
pic_rf_2401a.h, 443
pic_rf_24l01.c, 448
pic_rf_24l01.h, 462
pic_rf_send_byte_int
pic_rf_24l01.c, 449
pic_rf_24l01.h, 462
pic_rf_send_bytes
pic_rf_2401a.c, 438
pic_rf_2401a.h, 443
pic_rf_send_bytes_inline
pic_rf_2401a.h, 443
pic_rf_send_command
pic_rf_24l01.c, 449
pic_rf_24l01.h, 463
pic_rf_send_command_inline
pic_rf_24l01.h, 463
pic_rf_send_command_single
pic_rf_24l01.c, 450
pic_rf_24l01.h, 464
pic_rf_set_channel
pic_rf_2401a.c, 438
pic_rf_2401a.h, 444
pic_rf_24l01.c, 450
pic_rf_24l01.h, 464
pic_rf_set_mode
pic_rf_2401a.c, 439
pic_rf_2401a.h, 444
pic_rf_24l01.c, 450
pic_rf_24l01.h, 465
pic_rf_set_status
pic_rf_24l01.h, 456
pic_rf_setup
pic_rf_2401a.c, 439
pic_rf_2401a.h, 444
pic_rf_24l01.c, 451
pic_rf_24l01.h, 465
pic_rf_transmit
pic_rf_2401a.c, 439
pic_rf_2401a.h, 444
pic_rf_24l01.c, 451
pic_rf_24l01.h, 465
pic_rf_transmit_mode
pic_rf_2401a.h, 442
pic_rf_24l01.h, 456
pic_serial.c, 466
bin2Hex, 467
rx_buffer, 479
rx_end, 479
rx_start, 479
serial_getc, 468
serial_print_int, 468
serial_print_int_hex, 470
serial_print_int_hex_16bit, 470
serial_print_nl, 471
serial_print_spc, 472
serial_print_str, 473
serial_print_var, 476
serial_putc, 476
serial_rx_avail, 478
serial_rx_isr, 478
serial_setup, 478
serial_tx_empty, 478
serial_tx_isr, 479
tx_buffer, 479
tx_end, 479
tx_start, 480
pic_serial.h, 480
BRGH_HIGH_SPEED, 481
BRGH_LOW_SPEED, 481
serial_getc, 482
serial_handle_rx_isr, 481
serial_handle_tx_isr, 482
serial_print_debug, 482
serial_print_int, 482
serial_print_int_hex, 483
serial_print_int_hex_16bit, 484
serial_print_nl, 485
serial_print_spc, 486
serial_print_str, 487
serial_print_var, 490
682
serial_putc, 490
serial_rx_avail, 492
serial_rx_isr, 492
serial_setup, 492
serial_tx_empty, 492
serial_tx_full, 493
serial_tx_isr, 493
pic_term.c, 493
buffer_len, 494
term_buffer, 494
term_init, 494
term_process, 494
pic_term.h, 495
term_entry_callback, 496
term_init, 496
term_process, 496
pic_tick.c, 497
handle_tick, 498
tick_calc_diff, 498
tick_get_count, 498
timer_0_callback, 499
pic_tick.h, 499
handle_tick, 500
handle_tick_inline, 500
tick, 502
tick_calc_diff, 501
tick_get_count, 501
pic_timer.c, 502
pic_timer.h, 503
timer_0_callback, 505
TIMER_16BIT_MODE, 504
TIMER_8BIT_MODE, 504
TIMER_PRESCALER_1_TO_128, 504
TIMER_PRESCALER_1_TO_16, 504
TIMER_PRESCALER_1_TO_2, 504
TIMER_PRESCALER_1_TO_256, 505
TIMER_PRESCALER_1_TO_32, 505
TIMER_PRESCALER_1_TO_4, 505
TIMER_PRESCALER_1_TO_64, 505
TIMER_PRESCALER_1_TO_8, 505
TIMER_PRESCALER_OFF, 505
timer_setup_0, 505
timer_start_0, 506
timer_stop_0, 506
pic_timer1.c, 506
timer_1_start_value, 507
timer_setup_1, 506
timer_start_1, 507
timer_stop_1, 507
pic_timer1.h, 507
timer_1_callback, 508
timer_1_start_value, 509
timer_handle_1_isr, 509
timer_setup_1, 509
timer_start_1, 509
timer_stop_1, 509
TIMER1_PRESCALER_1_TO_2, 508
TIMER1_PRESCALER_1_TO_4, 508
TIMER1_PRESCALER_1_TO_8, 508
TIMER1_PRESCALER_OFF, 508
pic_usb.c, 509
buffer_byte, 520
control_mode, 520
delivery_bd, 520
delivery_buffer, 520
delivery_buffer_size, 520
delivery_bytes_max_send, 520
delivery_bytes_sent, 521
delivery_bytes_to_send, 521
delivery_ptr, 521
turn_usb_ints_on, 511
usb_address, 521
usb_configure_endpoints, 511
usb_enable_module, 511
usb_get_state, 512
usb_handle_isr, 512
usb_handle_reset, 513
usb_handle_stall, 514
usb_handle_standard_request, 514
usb_handle_transaction, 515
usb_prime_ep0_out_e, 516
usb_prime_ep0_out_o, 517
usb_sdp, 521
usb_send_data, 517
usb_send_data_chunk, 518
usb_send_empty_data_pkt, 518
usb_send_one_byte, 519
usb_setup, 519
usb_stall_ep0, 519
usb_stall_on_in, 520
usb_state, 521
usb_status, 521
pic_usb.h, 522
BC8, 525
BC9, 526
BSTALL, 526
cm_CTRL_READ_AWAITING_STATUS, 531
cm_CTRL_READ_DATA_STAGE, 531
cm_CTRL_READ_DATA_STAGE_CLASS, 531
cm_CTRL_WRITE_DATA_STAGE, 531
cm_CTRL_WRITE_DATA_STAGE_CLASS, 531
cm_CTRL_WRITE_SENDING_STATUS, 531
cm_IDLE, 531
control_mode, 540
control_mode_type, 531
DATA_STAGE_DIR, 526
dt_CONFIGURATION, 526
dt_CS_INTERFACE, 526
dt_DEBUG, 526
dt_DEVICE, 526
dt_DEVICE_QUALIFIER, 526
dt_ENDPOINT, 526
683
dt_HID, 526
dt_HID_REPORT, 527
dt_INTERFACE, 527
dt_INTERFACE_ASSOC, 527
dt_INTERFACE_POWER, 527
dt_OTG, 527
dt_OTHER_SPEED_CONFIG, 527
dt_STRING, 527
DTS, 527
DTSEN, 527
INCDIS, 528
KEN, 528
pid_ACK, 528
pid_DATA0, 528
pid_DATA1, 528
pid_DATA2, 528
pid_IN, 529
pid_MDATA, 529
pid_NAK, 529
pid_NYET, 529
pid_OUT, 529
pid_SETUP, 529
pid_SOF, 529
pid_STALL, 529
PID0, 528
PID1, 528
PID2, 528
PID3, 528
req_Clear_Feature, 529
req_Get_Configuration, 529
req_Get_Descriptor, 530
req_Get_Interface, 530
req_Get_Status, 530
req_Set_Address, 530
req_Set_Configuration, 530
req_Set_Descriptor, 530
req_Set_Feature, 530
req_Set_Interface, 530
req_Synch_Frame, 530
REQUEST_TYPE0, 530
REQUEST_TYPE1, 531
st_ADDRESS, 532
st_CONFIGURED, 532
st_DEFAULT, 532
st_POWERED, 531
turn_usb_ints_on, 532
UOWN, 531
us_IDLE, 532
us_SET_ADDRESS, 532
usb_address, 541
usb_device_configured_callback, 532
usb_enable_module, 532
usb_ep_data_in_callback, 533
usb_ep_data_out_callback, 533
usb_get_descriptor_callback, 534
usb_get_state, 534
usb_handle_class_ctrl_read_callback, 535
usb_handle_class_ctrl_write_callback, 535
usb_handle_class_request_callback, 536
usb_handle_isr, 537
usb_sdp, 541
usb_send_data, 538
usb_send_empty_data_pkt, 539
usb_send_status_ack, 531
usb_setup, 539
usb_SOF_callback, 539
usb_stall_ep0, 540
usb_state, 541
usb_state_type, 531
usb_status_type, 532
pic_usb_buffer_mgt.c, 541
bd0in, 542
bd0out_e, 542
bd0out_o, 542
bd1in, 542
bd1out, 543
bd2in, 543
bd2out, 543
bd3in, 543
bd3out, 543
bd4in, 543
bd4out, 543
bd5in, 543
bd5out, 544
bd6in, 544
bd6out, 544
bd7in, 544
bd7out, 544
ep_in_bd_location, 544
ep_in_buffer_location, 544
ep_in_buffer_size, 544
ep_out_bd_location, 544
ep_out_buffer_location, 544
ep_out_buffer_size, 545
USB_EP0_IN_ADDR, 545
USB_EP0_OUT_E_ADDR, 545
USB_EP0_OUT_O_ADDR, 545
pic_usb_buffer_mgt.h, 545
__pic_ubs_buffer_mgt_h, 547
bd0in, 547
bd0out_e, 547
bd0out_o, 547
bd1in, 547
bd1out, 548
bd2in, 548
bd2out, 548
bd3in, 548
bd3out, 548
bd4in, 548
bd4out, 548
bd5in, 548
bd5out, 548
684
bd6in, 549
bd6out, 549
bd7in, 549
bd7out, 549
buffer_0_in, 549
buffer_0_out_e, 549
buffer_0_out_o, 549
ep_in_bd_location, 549
ep_in_buffer_location, 549
ep_in_buffer_size, 549
ep_out_bd_location, 550
ep_out_buffer_location, 550
ep_out_buffer_size, 550
pic_utils.c, 550
pic_utils.h, 550
change_pin, 551
change_pin_var, 552
clear_pin, 552
clear_pin_var, 552
end_crit_sec, 552
int16, 552
int32, 553
int8, 553
kill_interrupts, 553
MAGIC_BOOSTBLOADER_REQUEST, 553
make_input, 553
make_output, 553
NUMBER_PORTS, 553
set_pin, 553
set_pin_var, 554
start_crit_sec, 554
test_output_pin, 554
test_pin, 554
test_pin_var, 554
toggle_pin, 554
toggle_pin_var, 554
turn_global_ints_off, 555
turn_global_ints_on, 555
turn_peripheral_ints_off, 555
turn_peripheral_ints_on, 555
uns16, 555
uns32, 555
uns8, 555
PicPack5x7_bitmap_0
draw.c, 82
draw_font_picpack_5x7.c, 93
PicPack5x7_bitmap_1
draw.c, 82
draw_font_picpack_5x7.c, 93
PicPack5x7_index
draw.c, 82
draw_font_picpack_5x7.c, 93
pid_ACK
pic_usb.h, 528
pid_DATA0
pic_usb.h, 528
pid_DATA1
pic_usb.h, 528
pid_DATA2
pic_usb.h, 528
pid_IN
pic_usb.h, 529
pid_MDATA
pic_usb.h, 529
pid_NAK
pic_usb.h, 529
pid_NYET
pic_usb.h, 529
pid_OUT
pic_usb.h, 529
pid_SETUP
pic_usb.h, 529
pid_SOF
pic_usb.h, 529
pid_STALL
pic_usb.h, 529
PID0
pic_usb.h, 528
PID1
pic_usb.h, 528
PID2
pic_usb.h, 528
PID3
pic_usb.h, 528
PKT_BROADCAST_ADDR
pic_packet.h, 426
pkt_calc_check_byte
pic_packet.c, 419
pkt_check_check_byte
pic_packet.c, 419
PKT_CONFIG_ADDR
pic_packet.h, 426
PKT_DIRECT_SEND_ADDR
pic_packet.h, 426
PKT_FLAG_BROADCAST
pic_packet.h, 427
PKT_FLAG_DELETED
pic_packet.c, 419
PKT_FLAG_NO_RESEND
pic_packet.h, 427
PKT_FLAG_RESEND
pic_packet.h, 427
pkt_id
rf_packet_det, 31
seen_packet, 32
pkt_init
pic_packet.c, 419
pic_packet.h, 429
pkt_my_addr
pic_packet.c, 424
pkt_my_next_pkt_id
pic_packet.c, 424
685
PKT_PACKET_SIZE
pic_packet.h, 427
pkt_payload_rx_callback
pic_packet.h, 429
pkt_print_packet
pic_packet.c, 420
pkt_process_rf_data
pic_packet.c, 420
pic_packet.h, 429
pkt_process_tx_queue
pic_packet.c, 421
pic_packet.h, 430
pkt_queue_packet
pic_packet.c, 422
pkt_received
wpan.c, 637
wpan.h, 645
pkt_seen
pic_packet.c, 422
pkt_seen_list
pic_packet.c, 424
pkt_seen_list_last
pic_packet.c, 424
pkt_send_callback
pic_packet.h, 431
pkt_send_failed_callback
pic_packet.h, 431
pkt_send_packet
pic_packet.c, 423
pkt_send_payload
pic_packet.c, 423
pic_packet.h, 431
pkt_send_succeeded_callback
pic_packet.h, 432
PKT_STATUS_CHECK_FAIL
pic_packet.h, 427
PKT_STATUS_DIRECT_SEND
pic_packet.h, 427
PKT_STATUS_I_AM_SENDER
pic_packet.h, 427
PKT_STATUS_NEED_TO_REBROADCAST
pic_packet.h, 427
PKT_STATUS_PKT_FOR_ME_BUT_SEEN
pic_packet.h, 428
PKT_STATUS_PKT_IS_ACK_FOR_ME
pic_packet.h, 428
PKT_STATUS_PKT_IS_FACK_FOR_ME
pic_packet.h, 428
PKT_STATUS_PKT_IS_FOR_ME
pic_packet.h, 428
PKT_STATUS_PREVIOUS_ROUTED_VIA_ME
pic_packet.h, 428
PKT_STATUS_QUEUED
pic_packet.h, 428
PKT_STATUS_ROUTING_FULL
pic_packet.h, 428
PKT_STATUS_SEEN_BEFORE
pic_packet.h, 428
PKT_STATUS_TX_QUEUE_FULL
pic_packet.h, 428
pkt_tx_queue
pic_packet.c, 424
PL_ADDR_RESPONSE
protocol.h, 567
PL_CAPS_RESPONSE
protocol.h, 567
PL_CHANGE_RESPONSE
protocol.h, 567
PL_OTHER_RESPONSE
protocol.h, 567
PL_REQ_ADDR
protocol.h, 567
PL_REQ_CAPS
protocol.h, 567
PL_REQ_INFO1
protocol.h, 567
PL_REQ_INFORM_ON_CHANGE
protocol.h, 567
PL_REQ_SENSOR
protocol.h, 567
PL_SENSOR_RESPONSE
protocol.h, 567
PL_SET_ADDR
protocol.h, 567
PL_SET_OUTPUT
protocol.h, 568
platform.h, 556
EA_LED_PANEL_DRIVER, 557
EA_PLT_1001, 557
EA_PLT_1002, 557
EA_PLT_1003, 557
EA_PLT1001, 557
EA_PLT1002, 557
EA_PLT1003, 557
EA_USB2SERIAL, 558
EA_WEATHER_STATION, 558
EA_WIRELESS_TEMP_SENSOR, 558
OLIMEX_BOARD, 558
OLIMEX_PIC_LCD3310, 558
SCHMARTBOARD, 558
SFE_TDN_V1, 558
SURE_PICDEM_2, 558
TECH_TOYS_PIC18F4550, 558
platform_leds.c, 558
platform_leds_flash, 559
PLATFORM_LEDS_FLASH_TICKS, 559
platform_leds_flashing, 560
platform_leds_process, 560
platform_leds_setup_io, 560
platform_leds.h, 560
__platform_heds_h, 561
platform_leds_flash, 562
686
platform_leds_flashing, 562
platform_leds_process, 562
platform_leds_setup_io, 562
platform_leds_flash
platform_leds.c, 559
platform_leds.h, 562
PLATFORM_LEDS_FLASH_TICKS
platform_leds.c, 559
platform_leds_flashing
platform_leds.c, 560
platform_leds.h, 562
platform_leds_process
platform_leds.c, 560
platform_leds.h, 562
platform_leds_setup_io
platform_leds.c, 560
platform_leds.h, 562
POS_DEST_H
its_mode2.h, 257
POS_DEST_L
its_mode2.h, 257
POS_HOP_COUNT
its_mode2.h, 258
POS_KEY1
its_mode2.h, 258
POS_KEY2
its_mode2.h, 258
POS_LENGTH_HEADER
its_mode2.h, 258
POS_MAX_HOP_COUNT
its_mode2.h, 258
POS_NETWORK_H
its_mode2.h, 258
POS_NETWORK_L
its_mode2.h, 258
POS_NUM_ROUTES
its_mode2.h, 258
POS_PKT_TYPE
its_mode2.h, 258
POS_ROUTE_START
its_mode2.h, 258
POS_SEQUENCE
its_mode2.h, 258
POS_SOURCE_H
its_mode2.h, 259
POS_SOURCE_L
its_mode2.h, 259
prior_device_id
remote_address, 26
product_id
device_descriptor, 12
product_string_id
device_descriptor, 12
protocol.h, 563
CAPS_INFO1_DATE, 564
CAPS_INFO1_TIME, 564
CAPS_INPUTS_SWITCH1, 564
CAPS_INPUTS_SWITCH2, 564
CAPS_INPUTS_SWITCH3, 564
CAPS_INPUTS_SWITCH4, 564
CAPS_INPUTS_SWITCH5, 564
CAPS_INPUTS_SWITCH6, 564
CAPS_INPUTS_SWITCH7, 564
CAPS_INPUTS_SWITCH8, 565
CAPS_OUTPUTS_DIMMER1, 565
CAPS_OUTPUTS_DIMMER2, 565
CAPS_OUTPUTS_DIMMER3, 565
CAPS_OUTPUTS_DIMMER4, 565
CAPS_OUTPUTS_RELAY1, 565
CAPS_OUTPUTS_RELAY2, 565
CAPS_OUTPUTS_RELAY3, 565
CAPS_OUTPUTS_RELAY4, 565
CAPS_SENSOR_AIR_PRESSURE, 565
CAPS_SENSOR_HUMIDITY, 565
CAPS_SENSOR_LIGHT, 566
CAPS_SENSOR_PRESENCE, 566
CAPS_SENSOR_TEMP, 566
EE_MY_ADDR_H, 566
EE_MY_ADDR_L, 566
EE_MY_INFO1, 566
EE_MY_INPUTS, 566
EE_MY_LAST_PKT_ID_H, 566
EE_MY_LAST_PKT_ID_L, 566
EE_MY_OUTPUTS, 566
EE_MY_SENSORS, 566
PL_ADDR_RESPONSE, 567
PL_CAPS_RESPONSE, 567
PL_CHANGE_RESPONSE, 567
PL_OTHER_RESPONSE, 567
PL_REQ_ADDR, 567
PL_REQ_CAPS, 567
PL_REQ_INFO1, 567
PL_REQ_INFORM_ON_CHANGE, 567
PL_REQ_SENSOR, 567
PL_SENSOR_RESPONSE, 567
PL_SET_ADDR, 567
PL_SET_OUTPUT, 568
pwm_count
pic_pwm.c, 434
pic_pwm.h, 436
pwm_get_level
pic_pwm.c, 433
pic_pwm.h, 435
pwm_handle
pic_pwm.c, 433
pic_pwm.h, 435
pwm_level
pic_pwm.c, 434
pic_pwm.h, 436
pwm_set_level
pic_pwm.c, 433
pic_pwm.h, 435
687
pwm_set_transition
pic_pwm.c, 434
pic_pwm.h, 436
pwm_setup_io
pic_pwm.c, 434
pic_pwm.h, 436
QS_ACK_RECEIVED
its_mode2.h, 259
QS_READY_TO_SEND
its_mode2.h, 259
QS_ROUTING_FAILED
its_mode2.h, 259
QS_SENT
its_mode2.h, 259
QS_WAITING_ON_ACK
its_mode2.h, 259
QS_WAITING_ON_LOCAL_ADDR
its_mode2.h, 259
QS_WAITING_ON_NETWORK_ADDR
its_mode2.h, 259
QUEUE_FULL
its_mode2.h, 260
queue_processing
its_mode2.c, 253
queued_item, 24
data, 25
data_length, 25
dest_device_handle, 25
dest_its_device_id, 25
flag, 25
packet, 25
sent_count, 26
status, 26
tick_sent, 26
R0_ENABLE
ar1000.h, 51
R0_INT_OSC_EN
ar1000.h, 51
r1_addr
rf_packet_det, 31
R1_DEEMP_SETTING
ar1000.h, 53
R1_FORCE_MONO
ar1000.h, 53
R1_HARD_MUTE_ENABLE
ar1000.h, 53
R1_RDS_ENABLE
ar1000.h, 53
R1_RDS_INT_ENABLE
ar1000.h, 53
R1_SOFT_MUTE_ENABLE
ar1000.h, 53
R1_STC_INT_ENABLE
ar1000.h, 53
R10_SEEK_WRAP_ENABLE
ar1000.h, 51
R11_AFC_HIGH_SIDE_b1
ar1000.h, 51
R11_AFC_HIGH_SIDE_b2
ar1000.h, 51
R11_AFC_INJECTION_CONTROL
ar1000.h, 51
R11_HILO_SIDE
ar1000.h, 51
R13_GPIO1_0
ar1000.h, 51
R13_GPIO1_1
ar1000.h, 51
R13_GPIO2_0
ar1000.h, 51
R13_GPIO2_1
ar1000.h, 51
R13_GPIO3_0
ar1000.h, 52
R13_GPIO3_1
ar1000.h, 52
R14_VOL2_0
ar1000.h, 52
R14_VOL2_1
ar1000.h, 52
R14_VOL2_2
ar1000.h, 52
R14_VOL2_3
ar1000.h, 52
R15_RDS_CTRL
ar1000.h, 52
R15_RDS_MECC_0
ar1000.h, 52
R15_RDS_MECC_1
ar1000.h, 52
R15_RDS_STA_EN
ar1000.h, 52
r2_addr
rf_packet_det, 31
R2_CHAN_0
ar1000.h, 53
R2_CHAN_1
ar1000.h, 53
R2_CHAN_2
ar1000.h, 53
R2_CHAN_3
ar1000.h, 53
R2_CHAN_4
ar1000.h, 54
R2_CHAN_5
ar1000.h, 54
R2_CHAN_6
ar1000.h, 54
R2_CHAN_7
ar1000.h, 54
R2_CHAN_8
ar1000.h, 54
688
R2_TUNE_ENABLE
ar1000.h, 54
r3_addr
rf_packet_det, 31
R3_BAND_0
ar1000.h, 54
R3_BAND_1
ar1000.h, 54
R3_SEEK_CHANNEL_SPACING
ar1000.h, 54
R3_SEEK_ENABLE
ar1000.h, 54
R3_SEEK_UP
ar1000.h, 55
R3_SEEKTH_0
ar1000.h, 55
R3_SEEKTH_1
ar1000.h, 55
R3_SEEKTH_2
ar1000.h, 55
R3_SEEKTH_3
ar1000.h, 55
R3_SEEKTH_4
ar1000.h, 55
R3_SEEKTH_5
ar1000.h, 55
R3_SEEKTH_6
ar1000.h, 55
R3_VOL_0
ar1000.h, 55
R3_VOL_1
ar1000.h, 55
R3_VOL_2
ar1000.h, 56
R3_VOL_3
ar1000.h, 56
receive_lost
wpan.c, 637
RECEIVE_MODE
pic_rf_2401a.h, 442
pic_rf_24l01.h, 456
regs
ar1000.c, 43
REMCNTH
mrf24j40_defines.h, 372
REMCNTH_REMCNT10
mrf24j40_defines.h, 372
REMCNTH_REMCNT11
mrf24j40_defines.h, 373
REMCNTH_REMCNT12
mrf24j40_defines.h, 373
REMCNTH_REMCNT13
mrf24j40_defines.h, 373
REMCNTH_REMCNT14
mrf24j40_defines.h, 373
REMCNTH_REMCNT15
mrf24j40_defines.h, 373
REMCNTH_REMCNT8
mrf24j40_defines.h, 373
REMCNTH_REMCNT9
mrf24j40_defines.h, 373
REMCNTL
mrf24j40_defines.h, 373
REMCNTL_REMCNT0
mrf24j40_defines.h, 373
REMCNTL_REMCNT1
mrf24j40_defines.h, 373
REMCNTL_REMCNT2
mrf24j40_defines.h, 373
REMCNTL_REMCNT3
mrf24j40_defines.h, 374
REMCNTL_REMCNT4
mrf24j40_defines.h, 374
REMCNTL_REMCNT5
mrf24j40_defines.h, 374
REMCNTL_REMCNT6
mrf24j40_defines.h, 374
REMCNTL_REMCNT7
mrf24j40_defines.h, 374
remote
its_address, 19
remote_address, 26
prior_device_id, 26
remote_indicator, 27
REMOTE_DEVICE
its_mode2.h, 260
remote_indicator
remote_address, 27
req_CLEAR_COMM_FEATURE
usb_cdc_class.c, 616
req_Clear_Feature
pic_usb.h, 529
req_GET_COMM_FEATURE
usb_cdc_class.c, 616
req_Get_Configuration
pic_usb.h, 529
req_Get_Descriptor
pic_usb.h, 530
req_GET_ENCAPSULATED_RESPONSE
usb_cdc_class.c, 616
req_GET_IDLE
usb_hid_class.h, 631
req_Get_Interface
pic_usb.h, 530
req_GET_LINE_CODING
usb_cdc_class.c, 616
req_GET_PROTOCOL
usb_hid_class.h, 631
req_GET_REPORT
usb_hid_class.h, 631
req_Get_Status
pic_usb.h, 530
689
req_SEND_BREAK
usb_cdc_class.c, 616
req_SEND_ENCAPSULATED_COMMAND
usb_cdc_class.c, 616
req_Set_Address
pic_usb.h, 530
req_SET_COMM_FEATURE
usb_cdc_class.c, 616
req_Set_Configuration
pic_usb.h, 530
req_SET_CONTROL_LINE_STATE
usb_cdc_class.c, 616
req_Set_Descriptor
pic_usb.h, 530
req_Set_Feature
pic_usb.h, 530
req_SET_IDLE
usb_hid_class.h, 631
req_Set_Interface
pic_usb.h, 530
req_SET_LINE_CODING
usb_cdc_class.c, 617
req_SET_PROTOCOL
usb_hid_class.h, 631
req_SET_REPORT
usb_hid_class.h, 631
req_Synch_Frame
pic_usb.h, 530
REQUEST_TYPE0
pic_usb.h, 530
REQUEST_TYPE1
pic_usb.h, 531
RESULT_FAILED
its_mode1.h, 236
its_mode2.h, 260
RESULT_SUCCESSFUL
its_mode1.h, 236
its_mode2.h, 260
rf_config, 27
address_ch1, 27
address_ch2, 27
address_width, 28
channel, 28
crystal, 28
options, 28
output_power, 28
payload_width_ch1, 28
payload_width_ch2, 28
rf_current_channel
pic_rf_2401a.h, 445
pic_rf_24l01.h, 466
rf_current_mode_receive
pic_rf_2401a.h, 445
pic_rf_24l01.h, 466
RF_FLUSH_RX
pic_rf_24l01.h, 456
RF_FLUSH_TX
pic_rf_24l01.h, 456
RF_NOP
pic_rf_24l01.h, 456
rf_packet, 29
a, 29
d, 29
rf_packet_det, 30
check_byte, 30
dest_addr, 30
payload, 30
pkt_id, 31
r1_addr, 31
r2_addr, 31
r3_addr, 31
source_addr, 31
RF_R_RX_PAYLOAD
pic_rf_24l01.h, 456
RF_RD_REG_CD
pic_rf_24l01.h, 456
RF_RD_REG_CONFIG_REG
pic_rf_24l01.h, 456
RF_RD_REG_FIFO_STATUS
pic_rf_24l01.h, 457
RF_RD_REG_RX_PW_P0
pic_rf_24l01.h, 457
RF_RD_REG_STATUS
pic_rf_24l01.h, 457
RF_RX_BUFFER_SIZE
pic_packet.h, 429
RF_W_TX_PAYLOAD
pic_rf_24l01.h, 457
RF_WR_REG_CONFIG_REG
pic_rf_24l01.h, 457
RF_WR_REG_EN_AA
pic_rf_24l01.h, 457
RF_WR_REG_RF_CH
pic_rf_24l01.h, 457
RF_WR_REG_RF_SETUP
pic_rf_24l01.h, 457
RF_WR_REG_RX_ADDR_P0
pic_rf_24l01.h, 457
RF_WR_REG_RX_PW_P0
pic_rf_24l01.h, 458
RF_WR_REG_SETUP_AW
pic_rf_24l01.h, 458
RF_WR_REG_SETUP_RETR
pic_rf_24l01.h, 458
RF_WR_REG_STATUS
pic_rf_24l01.h, 458
RF_WR_REG_TX_ADDR
pic_rf_24l01.h, 458
RFCON0
mrf24j40_defines.h, 374
RFCON0_CHANNEL0
mrf24j40_defines.h, 374
690
RFCON0_CHANNEL1
mrf24j40_defines.h, 374
RFCON0_CHANNEL2
mrf24j40_defines.h, 374
RFCON0_CHANNEL3
mrf24j40_defines.h, 374
RFCON0_RFOPT0
mrf24j40_defines.h, 375
RFCON0_RFOPT1
mrf24j40_defines.h, 375
RFCON0_RFOPT2
mrf24j40_defines.h, 375
RFCON0_RFOPT3
mrf24j40_defines.h, 375
RFCON1
mrf24j40_defines.h, 375
RFCON1_VCOOPT0
mrf24j40_defines.h, 375
RFCON1_VCOOPT1
mrf24j40_defines.h, 375
RFCON1_VCOOPT2
mrf24j40_defines.h, 375
RFCON1_VCOOPT3
mrf24j40_defines.h, 375
RFCON1_VCOOPT4
mrf24j40_defines.h, 375
RFCON1_VCOOPT5
mrf24j40_defines.h, 375
RFCON1_VCOOPT6
mrf24j40_defines.h, 376
RFCON1_VCOOPT7
mrf24j40_defines.h, 376
RFCON2
mrf24j40_defines.h, 376
RFCON2_PLLEN
mrf24j40_defines.h, 376
RFCON3
mrf24j40_defines.h, 376
RFCON3_TXPWRL0
mrf24j40_defines.h, 376
RFCON3_TXPWRL1
mrf24j40_defines.h, 376
RFCON3_TXPWRS0
mrf24j40_defines.h, 376
RFCON3_TXPWRS1
mrf24j40_defines.h, 376
RFCON3_TXPWRS2
mrf24j40_defines.h, 376
RFCON5
mrf24j40_defines.h, 376
RFCON5_BATTH0
mrf24j40_defines.h, 377
RFCON5_BATTH1
mrf24j40_defines.h, 377
RFCON5_BATTH2
mrf24j40_defines.h, 377
RFCON5_BATTH3
mrf24j40_defines.h, 377
RFCON6
mrf24j40_defines.h, 377
RFCON6_20MRECVR
mrf24j40_defines.h, 377
RFCON6_BATEN
mrf24j40_defines.h, 377
RFCON6_TXFIL
mrf24j40_defines.h, 377
RFCON7
mrf24j40_defines.h, 377
RFCON7_CLKOUTMODE0
mrf24j40_defines.h, 377
RFCON7_CLKOUTMODE1
mrf24j40_defines.h, 378
RFCON7_SLPCLKSEL0
mrf24j40_defines.h, 378
RFCON7_SLPCLKSEL1
mrf24j40_defines.h, 378
RFCON8
mrf24j40_defines.h, 378
RFCON8_RFVCO
mrf24j40_defines.h, 378
RFCTL
mrf24j40_defines.h, 378
RFCTL_RFRST
mrf24j40_defines.h, 378
RFCTL_WAKECNT7
mrf24j40_defines.h, 378
RFCTL_WAKECNT8
mrf24j40_defines.h, 378
RFSTATE
mrf24j40_defines.h, 378
RFSTATE_RFSTATE0
mrf24j40_defines.h, 379
RFSTATE_RFSTATE1
mrf24j40_defines.h, 379
RFSTATE_RFSTATE2
mrf24j40_defines.h, 379
routers
its2_packet, 18
ROUTING_TOO_MANY_HOPS
its_mode2.h, 260
RSSI
mrf24j40_defines.h, 379
RSSI_RSSI0
mrf24j40_defines.h, 379
RSSI_RSSI1
mrf24j40_defines.h, 379
RSSI_RSSI2
mrf24j40_defines.h, 379
RSSI_RSSI3
mrf24j40_defines.h, 379
RSSI_RSSI4
mrf24j40_defines.h, 379
691
RSSI_RSSI5
mrf24j40_defines.h, 379
RSSI_RSSI6
mrf24j40_defines.h, 379
RSSI_RSSI7
mrf24j40_defines.h, 380
rtc_get_config
ds1307.c, 120
ds1307.h, 127
rtc_get_date
ds1307.c, 120
ds1307.h, 128
m41t81s.c, 288
m41t81s.h, 304
rtc_get_day
ds1307.c, 121
ds1307.h, 128
rtc_get_dow
m41t81s.c, 288
m41t81s.h, 304
rtc_get_hours
ds1307.c, 121
ds1307.h, 128
m41t81s.c, 289
m41t81s.h, 305
rtc_get_minutes
ds1307.c, 121
ds1307.h, 128
m41t81s.c, 289
m41t81s.h, 305
rtc_get_month
ds1307.c, 121
ds1307.h, 129
m41t81s.c, 290
m41t81s.h, 306
rtc_get_register
m41t81s.c, 290
m41t81s.h, 306
rtc_get_seconds
ds1307.c, 121
ds1307.h, 129
m41t81s.c, 291
m41t81s.h, 307
rtc_get_year
ds1307.c, 122
ds1307.h, 129
m41t81s.c, 291
m41t81s.h, 307
rtc_set_config
ds1307.c, 122
ds1307.h, 129
m41t81s.h, 308
rtc_set_date
ds1307.c, 122
ds1307.h, 129
m41t81s.c, 292
m41t81s.h, 309
rtc_set_day
ds1307.c, 122
ds1307.h, 129
m41t81s.c, 292
m41t81s.h, 309
rtc_set_hours
ds1307.c, 123
ds1307.h, 129
m41t81s.c, 293
m41t81s.h, 310
rtc_set_minutes
ds1307.c, 123
ds1307.h, 129
m41t81s.c, 293
m41t81s.h, 310
rtc_set_month
ds1307.c, 123
ds1307.h, 130
m41t81s.c, 294
m41t81s.h, 310
rtc_set_register
m41t81s.c, 294
m41t81s.h, 311
rtc_set_seconds
ds1307.c, 123
ds1307.h, 130
m41t81s.c, 294
m41t81s.h, 311
rtc_set_sqw_freq
m41t81s.c, 295
m41t81s.h, 312
rtc_set_year
ds1307.c, 123
ds1307.h, 130
m41t81s.c, 295
m41t81s.h, 312
rtc_setup
ds1307.h, 127
m41t81s.h, 302
rtc_setup_io
ds1307.c, 124
ds1307.h, 130
m41t81s.c, 296
m41t81s.h, 313
rtc_sqw_freq_1024Hz
m41t81s.h, 303
rtc_sqw_freq_128Hz
m41t81s.h, 303
rtc_sqw_freq_16Hz
m41t81s.h, 303
rtc_sqw_freq_1Hz
m41t81s.h, 303
rtc_sqw_freq_2048Hz
m41t81s.h, 303
rtc_sqw_freq_256Hz
692
m41t81s.h, 303
rtc_sqw_freq_2Hz
m41t81s.h, 303
rtc_sqw_freq_32768Hz
m41t81s.h, 303
rtc_sqw_freq_32Hz
m41t81s.h, 303
rtc_sqw_freq_4096Hz
m41t81s.h, 303
rtc_sqw_freq_4Hz
m41t81s.h, 303
rtc_sqw_freq_512Hz
m41t81s.h, 304
rtc_sqw_freq_64Hz
m41t81s.h, 304
rtc_sqw_freq_8192Hz
m41t81s.h, 304
rtc_sqw_freq_8Hz
m41t81s.h, 304
rtc_start_clock
ds1307.c, 124
ds1307.h, 131
m41t81s.c, 296
m41t81s.h, 313
rtc_start_sqw_output
m41t81s.c, 296
m41t81s.h, 314
rtc_stop_clock
ds1307.c, 124
ds1307.h, 131
m41t81s.c, 297
m41t81s.h, 314
rtc_stop_sqw_output
m41t81s.c, 297
m41t81s.h, 314
rx_buffer
pic_serial.c, 479
rx_end
pic_serial.c, 479
rx_start
pic_serial.c, 479
RXFLUSH
mrf24j40_defines.h, 380
RXFLUSH_BCNONLY
mrf24j40_defines.h, 380
RXFLUSH_CMDONLY
mrf24j40_defines.h, 380
RXFLUSH_DATAONLY
mrf24j40_defines.h, 380
RXFLUSH_RXFLUSH
mrf24j40_defines.h, 380
RXFLUSH_WAKEPAD
mrf24j40_defines.h, 380
RXFLUSH_WAKEPOL
mrf24j40_defines.h, 380
RXMCR
mrf24j40_defines.h, 380
RXMCR_COORD
mrf24j40_defines.h, 380
RXMCR_ERRPKT
mrf24j40_defines.h, 381
RXMCR_NOACKRSP
mrf24j40_defines.h, 381
RXMCR_PANCOORD
mrf24j40_defines.h, 381
RXMCR_PROMI
mrf24j40_defines.h, 381
RXSR
mrf24j40_defines.h, 381
RXSR_BATIND
mrf24j40_defines.h, 381
RXSR_UPSECERR
mrf24j40_defines.h, 381
SADRH
mrf24j40_defines.h, 381
SADRL
mrf24j40_defines.h, 381
SCHMARTBOARD
platform.h, 558
SECCON0
mrf24j40_defines.h, 381
SECCON0_RXCIPHER0
mrf24j40_defines.h, 382
SECCON0_RXCIPHER1
mrf24j40_defines.h, 382
SECCON0_RXCIPHER2
mrf24j40_defines.h, 382
SECCON0_SECIGNORE
mrf24j40_defines.h, 382
SECCON0_SECSTART
mrf24j40_defines.h, 382
SECCON0_TXNCIPHER0
mrf24j40_defines.h, 382
SECCON0_TXNCIPHER1
mrf24j40_defines.h, 382
SECCON0_TXNCIPHER2
mrf24j40_defines.h, 382
SECCON1
mrf24j40_defines.h, 382
SECCON1_DISDEC
mrf24j40_defines.h, 382
SECCON1_DISENC
mrf24j40_defines.h, 382
SECCON1_TXBCIPHER0
mrf24j40_defines.h, 383
SECCON1_TXBCIPHER1
mrf24j40_defines.h, 383
SECCON1_TXBCIPHER2
mrf24j40_defines.h, 383
SECCR2
mrf24j40_defines.h, 383
SECCR2_TXG1CIPHER0
693
mrf24j40_defines.h, 383
SECCR2_TXG1CIPHER1
mrf24j40_defines.h, 383
SECCR2_TXG1CIPHER2
mrf24j40_defines.h, 383
SECCR2_TXG2CIPHER0
mrf24j40_defines.h, 383
SECCR2_TXG2CIPHER1
mrf24j40_defines.h, 383
SECCR2_TXG2CIPHER2
mrf24j40_defines.h, 383
SECCR2_UPDEC
mrf24j40_defines.h, 383
SECCR2_UPENC
mrf24j40_defines.h, 384
seen_packet, 31
its_source_id, 32
pkt_id, 32
sequence, 32
source_addr, 32
sending_item, 32
flag, 34
packet, 34
sent_count, 34
tick_sent, 34
sent_count
queued_item, 26
sending_item, 34
sequence
its2_packet, 18
seen_packet, 32
serial_getc
pic_serial.c, 468
pic_serial.h, 482
serial_handle_rx_isr
pic_serial.h, 481
serial_handle_tx_isr
pic_serial.h, 482
serial_print_debug
pic_serial.h, 482
serial_print_int
pic_serial.c, 468
pic_serial.h, 482
serial_print_int_hex
pic_serial.c, 470
pic_serial.h, 483
serial_print_int_hex_16bit
pic_serial.c, 470
pic_serial.h, 484
serial_print_nl
pic_serial.c, 471
pic_serial.h, 485
serial_print_spc
pic_serial.c, 472
pic_serial.h, 486
serial_print_str
pic_serial.c, 473
pic_serial.h, 487
serial_print_var
pic_serial.c, 476
pic_serial.h, 490
serial_putc
pic_serial.c, 476
pic_serial.h, 490
serial_rx_avail
pic_serial.c, 478
pic_serial.h, 492
serial_rx_isr
pic_serial.c, 478
pic_serial.h, 492
serial_setup
pic_serial.c, 478
pic_serial.h, 492
serial_string_id
device_descriptor, 12
serial_tx_empty
pic_serial.c, 478
pic_serial.h, 492
serial_tx_full
pic_serial.h, 493
serial_tx_isr
pic_serial.c, 479
pic_serial.h, 493
set_draw_buffer
draw_screen_buffer.c, 94
draw_screen_buffer.h, 96
set_pin
pic_utils.h, 553
set_pin_var
pic_utils.h, 554
set_pins_r_g
drv_ea_ldp8008.c, 110
set_pins_r1_g1
drv_ea_ldp6416.c, 103
set_pins_r1_g1_r2_g2
drv_ea_ldp6432.c, 106
setup_data_packet, 34
bmRequestType, 35
bRequest, 35
wIndex, 35
wLength, 35
wValue, 35
SFE_TDN_V1
platform.h, 558
sfe_tdn_v1.h, 568
__sfe_tdn_v1_h, 568
stat1, 568
stat2, 568
stat3, 568
short_address
local_address, 23
mrf24j40.c, 330
694
sht15.c, 568
CHECK_HUMD, 569
CHECK_STAT, 569
CHECK_TEMP, 570
sht15_fix_humidity, 570
sht15_fix_humidity_l, 570
sht15_fix_humidity_r, 571
sht15_fix_temperature_h, 571
sht15_read, 571
sht15_read_byte16, 572
sht15_read_humidity, 572
sht15_read_sda, 570
sht15_read_temperature, 572
sht15_send_byte, 573
sht15_setup_io, 573
sht15_start, 574
sht15_write_sda, 570
WRITE_STAT, 570
sht15.h, 574
__sht15_h, 575
sht15_fix_humidity, 575
sht15_fix_humidity_l, 576
sht15_fix_humidity_r, 576
sht15_fix_temperature_h, 576
sht15_read, 576
sht15_read_byte16, 577
sht15_read_humidity, 577
sht15_read_temperature, 578
sht15_send_byte, 578
sht15_setup_io, 579
sht15_start, 579
sht15_fix_humidity
sht15.c, 570
sht15.h, 575
sht15_fix_humidity_l
sht15.c, 570
sht15.h, 576
sht15_fix_humidity_r
sht15.c, 571
sht15.h, 576
sht15_fix_temperature_h
sht15.c, 571
sht15.h, 576
sht15_read
sht15.c, 571
sht15.h, 576
sht15_read_byte16
sht15.c, 572
sht15.h, 577
sht15_read_humidity
sht15.c, 572
sht15.h, 577
sht15_read_sda
sht15.c, 570
sht15_read_temperature
sht15.c, 572
sht15.h, 578
sht15_send_byte
sht15.c, 573
sht15.h, 578
sht15_setup_io
sht15.c, 573
sht15.h, 579
sht15_start
sht15.c, 574
sht15.h, 579
sht15_write_sda
sht15.c, 570
slave_interface
CDC_union_functional_descriptor, 9
SLPACK
mrf24j40_defines.h, 384
SLPACK_SLPACK
mrf24j40_defines.h, 384
SLPACK_WAKECNT0
mrf24j40_defines.h, 384
SLPACK_WAKECNT1
mrf24j40_defines.h, 384
SLPACK_WAKECNT2
mrf24j40_defines.h, 384
SLPACK_WAKECNT3
mrf24j40_defines.h, 384
SLPACK_WAKECNT4
mrf24j40_defines.h, 384
SLPACK_WAKECNT5
mrf24j40_defines.h, 384
SLPACK_WAKECNT6
mrf24j40_defines.h, 384
SLPCAL0
mrf24j40_defines.h, 384
SLPCAL0_SLPCAL0
mrf24j40_defines.h, 385
SLPCAL0_SLPCAL1
mrf24j40_defines.h, 385
SLPCAL0_SLPCAL2
mrf24j40_defines.h, 385
SLPCAL0_SLPCAL3
mrf24j40_defines.h, 385
SLPCAL0_SLPCAL4
mrf24j40_defines.h, 385
SLPCAL0_SLPCAL5
mrf24j40_defines.h, 385
SLPCAL0_SLPCAL6
mrf24j40_defines.h, 385
SLPCAL0_SLPCAL7
mrf24j40_defines.h, 385
SLPCAL1
mrf24j40_defines.h, 385
SLPCAL1_SLPCAL10
mrf24j40_defines.h, 385
SLPCAL1_SLPCAL11
mrf24j40_defines.h, 385
695
SLPCAL1_SLPCAL12
mrf24j40_defines.h, 386
SLPCAL1_SLPCAL13
mrf24j40_defines.h, 386
SLPCAL1_SLPCAL14
mrf24j40_defines.h, 386
SLPCAL1_SLPCAL15
mrf24j40_defines.h, 386
SLPCAL1_SLPCAL8
mrf24j40_defines.h, 386
SLPCAL1_SLPCAL9
mrf24j40_defines.h, 386
SLPCAL2
mrf24j40_defines.h, 386
SLPCAL2_SLPCAL16
mrf24j40_defines.h, 386
SLPCAL2_SLPCAL17
mrf24j40_defines.h, 386
SLPCAL2_SLPCAL18
mrf24j40_defines.h, 386
SLPCAL2_SLPCAL19
mrf24j40_defines.h, 386
SLPCAL2_SLPCALEN
mrf24j40_defines.h, 387
SLPCAL2_SLPCALRDY
mrf24j40_defines.h, 387
SLPCON0
mrf24j40_defines.h, 387
SLPCON0_INTEDGE
mrf24j40_defines.h, 387
SLPCON0_SLPCLKEN
mrf24j40_defines.h, 387
SLPCON1
mrf24j40_defines.h, 387
SLPCON1_CLKOUTEN
mrf24j40_defines.h, 387
SLPCON1_SLPCLKDIV0
mrf24j40_defines.h, 387
SLPCON1_SLPCLKDIV1
mrf24j40_defines.h, 387
SLPCON1_SLPCLKDIV2
mrf24j40_defines.h, 387
SLPCON1_SLPCLKDIV3
mrf24j40_defines.h, 387
SLPCON1_SLPCLKDIV4
mrf24j40_defines.h, 388
SOFTRST
mrf24j40_defines.h, 388
SOFTRST_RSTBB
mrf24j40_defines.h, 388
SOFTRST_RSTMAC
mrf24j40_defines.h, 388
SOFTRST_RSTPWR
mrf24j40_defines.h, 388
somo_14d.c, 579
somo_14d_is_busy, 580
somo_14d_play_pause, 580
somo_14d_reset, 581
somo_14d_send_data, 581
somo_14d_set_file_id, 581
somo_14d_set_volume, 582
somo_14d_setup_io, 582
somo_14d_standby, 582
somo_14d_stop, 582
somo_14d_wake, 582
somo_14d.h, 583
somo_14d_is_busy, 584
somo_14d_play_pause, 585
SOMO_14D_PLAY_PAUSE_CMD, 584
somo_14d_reset, 585
somo_14d_set_file_id, 585
somo_14d_set_volume, 585
somo_14d_setup_io, 585
somo_14d_standby, 586
somo_14d_stop, 586
SOMO_14D_STOP_CMD, 584
SOMO_14D_VOLUME_CMD, 584
somo_14d_wake, 586
somo_14d_is_busy
somo_14d.c, 580
somo_14d.h, 584
somo_14d_play_pause
somo_14d.c, 580
somo_14d.h, 585
SOMO_14D_PLAY_PAUSE_CMD
somo_14d.h, 584
somo_14d_reset
somo_14d.c, 581
somo_14d.h, 585
somo_14d_send_data
somo_14d.c, 581
somo_14d_set_file_id
somo_14d.c, 581
somo_14d.h, 585
somo_14d_set_volume
somo_14d.c, 582
somo_14d.h, 585
somo_14d_setup_io
somo_14d.c, 582
somo_14d.h, 585
somo_14d_standby
somo_14d.c, 582
somo_14d.h, 586
somo_14d_stop
somo_14d.c, 582
somo_14d.h, 586
SOMO_14D_STOP_CMD
somo_14d.h, 584
SOMO_14D_VOLUME_CMD
somo_14d.h, 584
somo_14d_wake
somo_14d.c, 582
696
somo_14d.h, 586
source_addr
rf_packet_det, 31
seen_packet, 32
source_address_type
wpan_address, 36
source_ea
wpan_address, 36
source_pan_id
wpan_address, 37
source_sa
wpan_address, 37
spi.c, 586
spi_pulse_0, 587
spi_pulse_1, 587
spi_setup, 587
spi_write, 587
spi_write_lsb, 588
spi_write_sure, 588
spi.h, 588
spi_pulse_0, 589
spi_pulse_1, 589
spi_setup, 589
spi_write, 590
spi_write_lsb, 590
spi_write_sure, 590
spi_hw.c, 590
spi_hw_init, 591
spi_hw_receive, 591
spi_hw_setup_io, 591
spi_hw_transmit, 591
spi_hw.h, 592
spi_hw_init, 593
spi_hw_receive, 593
spi_hw_setup_io, 594
spi_hw_transmit, 594
spi_hw_init
i2c_hw.c, 208
spi_hw.c, 591
spi_hw.h, 593
spi_hw_receive
i2c_hw.c, 208
spi_hw.c, 591
spi_hw.h, 593
spi_hw_setup_io
i2c_hw.c, 209
spi_hw.c, 591
spi_hw.h, 594
spi_hw_transmit
i2c_hw.c, 209
spi_hw.c, 591
spi_hw.h, 594
spi_pulse_0
spi.c, 587
spi.h, 589
spi_pulse_1
spi.c, 587
spi.h, 589
spi_setup
spi.c, 587
spi.h, 589
spi_write
spi.c, 587
spi.h, 590
spi_write_lsb
spi.c, 588
spi.h, 590
spi_write_sure
spi.c, 588
spi.h, 590
st_ADDRESS
pic_usb.h, 532
st_CONFIGURED
pic_usb.h, 532
st_DEFAULT
pic_usb.h, 532
st_POWERED
pic_usb.h, 531
start_crit_sec
pic_utils.h, 554
stat
buffer_descriptor, 5
stat1
sfe_tdn_v1.h, 568
stat2
sfe_tdn_v1.h, 568
stat3
sfe_tdn_v1.h, 568
state
its_mode1.c, 234
its_mode1.h, 240
its_mode2.c, 253
its_mode2.h, 270
STATE_ASSOCIATED
its_mode1.h, 236
its_mode2.h, 260
STATE_RUNNING
its_mode1.h, 236
its_mode2.h, 260
STATE_SEARCHING
its_mode1.h, 236
its_mode2.h, 260
STATE_STARTUP
its_mode1.h, 236
its_mode2.h, 260
state_timeout
its_mode2.c, 253
STATE_UNASSOCIATED
its_mode1.h, 236
its_mode2.h, 260
status
queued_item, 26
697
STATUS_BIT_2
ar1000.h, 56
STATUS_CHAN_0
ar1000.h, 56
STATUS_CHAN_1
ar1000.h, 56
STATUS_CHAN_2
ar1000.h, 56
STATUS_CHAN_3
ar1000.h, 56
STATUS_CHAN_4
ar1000.h, 56
STATUS_CHAN_5
ar1000.h, 56
STATUS_CHAN_6
ar1000.h, 56
STATUS_CHAN_7
ar1000.h, 56
STATUS_CHAN_8
ar1000.h, 57
STATUS_MAX_RT
pic_rf_24l01.h, 458
STATUS_RDS_DATA_READY
ar1000.h, 57
STATUS_RX_DR
pic_rf_24l01.h, 458
STATUS_SEEK_FAIL
ar1000.h, 57
STATUS_SEEK_TUNE_COMPLETE
ar1000.h, 57
STATUS_STEREO
ar1000.h, 57
STATUS_TX_DS
pic_rf_24l01.h, 458
STATUS_TX_FULL
pic_rf_24l01.h, 458
stop_bits
line_coding, 22
sure_2416.c, 594
sure_2416_fill, 595
sure_2416_fill2, 595
sure_2416_init, 596
sure_2416_send_command, 596
sure_2416_set_brightness, 596
sure_2416_set_pixel, 597
sure_2416_setup, 597
sure_2416_write, 597
sure_2416.h, 597
sure_2416_clear, 600
SURE_2416_CMD_BLINK_OFF, 598
SURE_2416_CMD_BLINK_ON, 599
SURE_2416_CMD_CLK_MASTER_MODE, 599
SURE_2416_CMD_CLK_SLAVE_MODE, 599
SURE_2416_CMD_CLK_SOURCE_EXT, 599
SURE_2416_CMD_CLK_SOURCE_INT_RC,
599
SURE_2416_CMD_LEDS_OFF, 599
SURE_2416_CMD_LEDS_ON, 599
SURE_2416_CMD_NMOS_16_COMMON, 599
SURE_2416_CMD_NMOS_8_COMMON, 599
SURE_2416_CMD_PMOS_16_COMMON, 599
SURE_2416_CMD_PMOS_8_COMMON, 600
SURE_2416_CMD_SYS_DISABLE, 600
SURE_2416_CMD_SYS_ENABLE, 600
sure_2416_fill, 600
sure_2416_fill2, 600
sure_2416_get_pixel, 601
sure_2416_horizontal_line, 601
sure_2416_init, 601
sure_2416_send_command, 601
sure_2416_set_brightness, 601
sure_2416_set_pixel, 601
sure_2416_setup, 602
sure_2416_vertical_line, 602
sure_2416_write, 602
sure_2416_clear
sure_2416.h, 600
SURE_2416_CMD_BLINK_OFF
sure_2416.h, 598
SURE_2416_CMD_BLINK_ON
sure_2416.h, 599
SURE_2416_CMD_CLK_MASTER_MODE
sure_2416.h, 599
SURE_2416_CMD_CLK_SLAVE_MODE
sure_2416.h, 599
SURE_2416_CMD_CLK_SOURCE_EXT
sure_2416.h, 599
SURE_2416_CMD_CLK_SOURCE_INT_RC
sure_2416.h, 599
SURE_2416_CMD_LEDS_OFF
sure_2416.h, 599
SURE_2416_CMD_LEDS_ON
sure_2416.h, 599
SURE_2416_CMD_NMOS_16_COMMON
sure_2416.h, 599
SURE_2416_CMD_NMOS_8_COMMON
sure_2416.h, 599
SURE_2416_CMD_PMOS_16_COMMON
sure_2416.h, 599
SURE_2416_CMD_PMOS_8_COMMON
sure_2416.h, 600
SURE_2416_CMD_SYS_DISABLE
sure_2416.h, 600
SURE_2416_CMD_SYS_ENABLE
sure_2416.h, 600
sure_2416_fill
sure_2416.c, 595
sure_2416.h, 600
sure_2416_fill2
sure_2416.c, 595
sure_2416.h, 600
sure_2416_get_pixel
698
sure_2416.h, 601
sure_2416_horizontal_line
sure_2416.h, 601
sure_2416_init
sure_2416.c, 596
sure_2416.h, 601
sure_2416_send_command
sure_2416.c, 596
sure_2416.h, 601
sure_2416_set_brightness
sure_2416.c, 596
sure_2416.h, 601
sure_2416_set_pixel
sure_2416.c, 597
sure_2416.h, 601
sure_2416_setup
sure_2416.c, 597
sure_2416.h, 602
sure_2416_vertical_line
sure_2416.h, 602
sure_2416_write
sure_2416.c, 597
sure_2416.h, 602
sure_7seg.c, 602
sure_7seg_convert, 603
sure_7seg_setup, 603
sure_7seg_write_str, 603
sure_7seg.h, 604
sure_7seg_setup, 605
sure_7seg_write_str, 605
sure_7seg_convert
sure_7seg.c, 603
sure_7seg_setup
sure_7seg.c, 603
sure_7seg.h, 605
sure_7seg_write_str
sure_7seg.c, 603
sure_7seg.h, 605
SURE_PICDEM_2
platform.h, 558
SYMTICKH
mrf24j40_defines.h, 388
SYMTICKH_TICKP8
mrf24j40_defines.h, 388
SYMTICKH_TXONT0
mrf24j40_defines.h, 388
SYMTICKH_TXONT1
mrf24j40_defines.h, 388
SYMTICKH_TXONT2
mrf24j40_defines.h, 388
SYMTICKH_TXONT3
mrf24j40_defines.h, 388
SYMTICKH_TXONT4
mrf24j40_defines.h, 389
SYMTICKH_TXONT5
mrf24j40_defines.h, 389
SYMTICKH_TXONT6
mrf24j40_defines.h, 389
SYMTICKL
mrf24j40_defines.h, 389
SYMTICKL_TICKP0
mrf24j40_defines.h, 389
SYMTICKL_TICKP1
mrf24j40_defines.h, 389
SYMTICKL_TICKP2
mrf24j40_defines.h, 389
SYMTICKL_TICKP3
mrf24j40_defines.h, 389
SYMTICKL_TICKP4
mrf24j40_defines.h, 389
SYMTICKL_TICKP5
mrf24j40_defines.h, 389
SYMTICKL_TICKP6
mrf24j40_defines.h, 389
SYMTICKL_TICKP7
mrf24j40_defines.h, 390
TECH_TOYS_PIC18F4550
platform.h, 558
temp_to_str
convert.c, 71
convert.h, 72
term_buffer
pic_term.c, 494
term_entry_callback
pic_term.h, 496
term_init
pic_term.c, 494
pic_term.h, 496
term_process
pic_term.c, 494
pic_term.h, 496
test_output_pin
pic_utils.h, 554
test_pin
pic_utils.h, 554
test_pin_var
pic_utils.h, 554
TEST_RADIUS
draw_tests.c, 98
TEST_RESULT_NO_MORE_TESTS
draw_tests.h, 100
TEST_RESULT_NOT_APPLICABLE
draw_tests.h, 100
TEST_RESULT_RAN
draw_tests.h, 100
TESTMODE
mrf24j40_defines.h, 390
TESTMODE_RSSIWAIT0
mrf24j40_defines.h, 390
TESTMODE_RSSIWAIT1
mrf24j40_defines.h, 390
TESTMODE_TESTMODE0
699
mrf24j40_defines.h, 390
TESTMODE_TESTMODE1
mrf24j40_defines.h, 390
TESTMODE_TESTMODE2
mrf24j40_defines.h, 390
tick
pic_tick.h, 502
tick_calc_diff
pic_tick.c, 498
pic_tick.h, 501
tick_get_count
pic_tick.c, 498
pic_tick.h, 501
tick_marker
its_mode1.c, 234
its_mode2.c, 253
tick_sent
queued_item, 26
sending_item, 34
timer_0_callback
pic_tick.c, 499
pic_timer.h, 505
timer_1_callback
pic_timer1.h, 508
timer_1_start_value
pic_timer1.c, 507
pic_timer1.h, 509
TIMER_16BIT_MODE
pic_timer.h, 504
TIMER_8BIT_MODE
pic_timer.h, 504
timer_handle_1_isr
pic_timer1.h, 509
TIMER_PRESCALER_1_TO_128
pic_timer.h, 504
TIMER_PRESCALER_1_TO_16
pic_timer.h, 504
TIMER_PRESCALER_1_TO_2
pic_timer.h, 504
TIMER_PRESCALER_1_TO_256
pic_timer.h, 505
TIMER_PRESCALER_1_TO_32
pic_timer.h, 505
TIMER_PRESCALER_1_TO_4
pic_timer.h, 505
TIMER_PRESCALER_1_TO_64
pic_timer.h, 505
TIMER_PRESCALER_1_TO_8
pic_timer.h, 505
TIMER_PRESCALER_OFF
pic_timer.h, 505
timer_setup_0
pic_timer.h, 505
timer_setup_1
pic_timer1.c, 506
pic_timer1.h, 509
timer_start_0
pic_timer.h, 506
timer_start_1
pic_timer1.c, 507
pic_timer1.h, 509
timer_stop_0
pic_timer.h, 506
timer_stop_1
pic_timer1.c, 507
pic_timer1.h, 509
TIMER1_PRESCALER_1_TO_2
pic_timer1.h, 508
TIMER1_PRESCALER_1_TO_4
pic_timer1.h, 508
TIMER1_PRESCALER_1_TO_8
pic_timer1.h, 508
TIMER1_PRESCALER_OFF
pic_timer1.h, 508
tmp75.c, 605
tmp75_convert_temp, 606
tmp75_get_config, 607
tmp75_get_temp, 607
tmp75_read, 607
tmp75_read_16bit, 608
tmp75_set_config, 608
tmp75_setup, 609
tmp75_write, 609
tmp75.h, 609
TMP75_CONF_F0, 611
TMP75_CONF_F1, 611
TMP75_CONF_OS, 611
TMP75_CONF_POL, 611
TMP75_CONF_R0, 611
TMP75_CONF_R1, 611
TMP75_CONF_SD, 611
TMP75_CONF_TM, 611
TMP75_CONFIG_REGISTER, 612
tmp75_convert_temp, 612
tmp75_get_config, 612
tmp75_get_temp, 613
tmp75_set_config, 613
tmp75_setup, 612
tmp75_setup_io, 614
TMP75_TEMP_REGISTER, 612
TMP75_THI_REGISTER, 612
TMP75_TLOW_REGISTER, 612
TMP75_CONF_F0
tmp75.h, 611
TMP75_CONF_F1
tmp75.h, 611
TMP75_CONF_OS
tmp75.h, 611
TMP75_CONF_POL
tmp75.h, 611
TMP75_CONF_R0
tmp75.h, 611
700
TMP75_CONF_R1
tmp75.h, 611
TMP75_CONF_SD
tmp75.h, 611
TMP75_CONF_TM
tmp75.h, 611
TMP75_CONFIG_REGISTER
tmp75.h, 612
tmp75_convert_temp
tmp75.c, 606
tmp75.h, 612
tmp75_get_config
tmp75.c, 607
tmp75.h, 612
tmp75_get_temp
tmp75.c, 607
tmp75.h, 613
tmp75_read
tmp75.c, 607
tmp75_read_16bit
tmp75.c, 608
tmp75_set_config
tmp75.c, 608
tmp75.h, 613
tmp75_setup
tmp75.c, 609
tmp75.h, 612
tmp75_setup_io
tmp75.h, 614
TMP75_TEMP_REGISTER
tmp75.h, 612
TMP75_THI_REGISTER
tmp75.h, 612
TMP75_TLOW_REGISTER
tmp75.h, 612
tmp75_write
tmp75.c, 609
toggle_pin
pic_utils.h, 554
toggle_pin_var
pic_utils.h, 554
TOP_LEFT
draw.h, 85
total_length
configuration_descriptor, 10
TRANSMIT_MODE
pic_rf_2401a.h, 442
pic_rf_24l01.h, 459
TRISGPIO
mrf24j40_defines.h, 390
TRISGPIO_TRISGP0
mrf24j40_defines.h, 390
TRISGPIO_TRISGP1
mrf24j40_defines.h, 390
TRISGPIO_TRISGP2
mrf24j40_defines.h, 390
TRISGPIO_TRISGP3
mrf24j40_defines.h, 391
TRISGPIO_TRISGP4
mrf24j40_defines.h, 391
TRISGPIO_TRISGP5
mrf24j40_defines.h, 391
turn_global_ints_off
pic_utils.h, 555
turn_global_ints_on
pic_utils.h, 555
turn_off_mrf_interrupts
its_mode2.c, 251
turn_on_mrf_interrupts
its_mode2.c, 251
turn_peripheral_ints_off
pic_utils.h, 555
turn_peripheral_ints_on
pic_utils.h, 555
turn_usb_ints_on
pic_usb.c, 511
pic_usb.h, 532
tx_buffer
pic_serial.c, 479
tx_end
pic_serial.c, 479
tx_start
pic_serial.c, 480
TXBCON0
mrf24j40_defines.h, 391
TXBCON0_TXBSECEN
mrf24j40_defines.h, 391
TXBCON0_TXBTRIG
mrf24j40_defines.h, 391
TXBCON1
mrf24j40_defines.h, 391
TXG1CON
mrf24j40_defines.h, 391
TXG1CON_TXG1ACKREQ
mrf24j40_defines.h, 391
TXG1CON_TXG1RETRY0
mrf24j40_defines.h, 391
TXG1CON_TXG1RETRY1
mrf24j40_defines.h, 391
TXG1CON_TXG1SECEN
mrf24j40_defines.h, 392
TXG1CON_TXG1SLOT0
mrf24j40_defines.h, 392
TXG1CON_TXG1SLOT1
mrf24j40_defines.h, 392
TXG1CON_TXG1SLOT2
mrf24j40_defines.h, 392
TXG1CON_TXG1TRIG
mrf24j40_defines.h, 392
TXG2CON
mrf24j40_defines.h, 392
TXG2CON_TXG2ACKREQ
701
mrf24j40_defines.h, 392
TXG2CON_TXG2RETRY0
mrf24j40_defines.h, 392
TXG2CON_TXG2RETRY1
mrf24j40_defines.h, 392
TXG2CON_TXG2SECEN
mrf24j40_defines.h, 392
TXG2CON_TXG2SLOT0
mrf24j40_defines.h, 392
TXG2CON_TXG2SLOT1
mrf24j40_defines.h, 393
TXG2CON_TXG2SLOT2
mrf24j40_defines.h, 393
TXG2CON_TXG2TRIG
mrf24j40_defines.h, 393
TXMCR
mrf24j40_defines.h, 393
TXMCR_BATLIFEXT
mrf24j40_defines.h, 393
TXMCR_CSMABF0
mrf24j40_defines.h, 393
TXMCR_CSMABF1
mrf24j40_defines.h, 393
TXMCR_CSMABF2
mrf24j40_defines.h, 393
TXMCR_MACMINBE0
mrf24j40_defines.h, 393
TXMCR_MACMINBE1
mrf24j40_defines.h, 393
TXMCR_NOCSMA
mrf24j40_defines.h, 394
TXMCR_SLOTTED
mrf24j40_defines.h, 394
TXNCON
mrf24j40_defines.h, 394
TXNCON_FPSTAT
mrf24j40_defines.h, 394
TXNCON_INDIRECT
mrf24j40_defines.h, 394
TXNCON_TXNACKREQ
mrf24j40_defines.h, 394
TXNCON_TXNSECEN
mrf24j40_defines.h, 394
TXNCON_TXNTRIG
mrf24j40_defines.h, 394
TXPEND
mrf24j40_defines.h, 394
TXPEND_FPACK
mrf24j40_defines.h, 394
TXPEND_GTSSWITCH
mrf24j40_defines.h, 395
TXPEND_MLIFS0
mrf24j40_defines.h, 395
TXPEND_MLIFS1
mrf24j40_defines.h, 395
TXPEND_MLIFS2
mrf24j40_defines.h, 395
TXPEND_MLIFS3
mrf24j40_defines.h, 395
TXPEND_MLIFS4
mrf24j40_defines.h, 395
TXPEND_MLIFS5
mrf24j40_defines.h, 395
TXSTAT
mrf24j40_defines.h, 395
TXSTAT_CCAFAIL
mrf24j40_defines.h, 395
TXSTAT_TXG1FNT
mrf24j40_defines.h, 395
TXSTAT_TXG1STAT
mrf24j40_defines.h, 396
TXSTAT_TXG2FNT
mrf24j40_defines.h, 396
TXSTAT_TXG2STAT
mrf24j40_defines.h, 396
TXSTAT_TXNRETRY0
mrf24j40_defines.h, 396
TXSTAT_TXNRETRY1
mrf24j40_defines.h, 396
TXSTAT_TXNSTAT
mrf24j40_defines.h, 396
TXSTBL
mrf24j40_defines.h, 396
TXSTBL_MSIFS0
mrf24j40_defines.h, 396
TXSTBL_MSIFS1
mrf24j40_defines.h, 396
TXSTBL_MSIFS2
mrf24j40_defines.h, 396
TXSTBL_MSIFS3
mrf24j40_defines.h, 396
TXSTBL_RFSTBL0
mrf24j40_defines.h, 397
TXSTBL_RFSTBL1
mrf24j40_defines.h, 397
TXSTBL_RFSTBL2
mrf24j40_defines.h, 397
TXSTBL_RFSTBL3
mrf24j40_defines.h, 397
TXTIME
mrf24j40_defines.h, 397
TXTIME_TURNTIME0
mrf24j40_defines.h, 397
TXTIME_TURNTIME1
mrf24j40_defines.h, 397
TXTIME_TURNTIME2
mrf24j40_defines.h, 397
TXTIME_TURNTIME3
mrf24j40_defines.h, 397
uns16
pic_utils.h, 555
uns32
702
pic_utils.h, 555
uns8
pic_utils.h, 555
UOWN
pic_usb.h, 531
UPNONCE0
mrf24j40_defines.h, 397
UPNONCE1
mrf24j40_defines.h, 397
UPNONCE10
mrf24j40_defines.h, 398
UPNONCE11
mrf24j40_defines.h, 398
UPNONCE12
mrf24j40_defines.h, 398
UPNONCE2
mrf24j40_defines.h, 398
UPNONCE3
mrf24j40_defines.h, 398
UPNONCE4
mrf24j40_defines.h, 398
UPNONCE5
mrf24j40_defines.h, 398
UPNONCE6
mrf24j40_defines.h, 398
UPNONCE7
mrf24j40_defines.h, 398
UPNONCE8
mrf24j40_defines.h, 398
UPNONCE9
mrf24j40_defines.h, 398
us_IDLE
pic_usb.h, 532
us_SET_ADDRESS
pic_usb.h, 532
usb_address
pic_usb.c, 521
pic_usb.h, 541
usb_cdc_class.c, 614
cdc_rx_buffer, 624
cdc_rx_end, 624
cdc_rx_start, 624
cdc_tx_buffer, 624
cdc_tx_end, 624
cdc_tx_start, 624
class_data, 624
current_bit_rate, 624
dte_rate, 625
not_SERIAL_STATE, 616
req_CLEAR_COMM_FEATURE, 616
req_GET_COMM_FEATURE, 616
req_GET_ENCAPSULATED_RESPONSE, 616
req_GET_LINE_CODING, 616
req_SEND_BREAK, 616
req_SEND_ENCAPSULATED_COMMAND, 616
req_SET_COMM_FEATURE, 616
req_SET_CONTROL_LINE_STATE, 616
req_SET_LINE_CODING, 617
usb_cdc_getc, 617
usb_cdc_handle_tx, 617
usb_cdc_print_int, 618
usb_cdc_print_str, 618
usb_cdc_putc, 618
usb_cdc_rx_avail, 618
usb_cdc_set_dcd, 619
usb_cdc_set_dsr, 619
usb_cdc_setup, 619
usb_cdc_tx_empty, 619
usb_ep_data_in_callback, 619
usb_ep_data_out_callback, 620
usb_handle_class_ctrl_read_callback, 621
usb_handle_class_ctrl_write_callback, 621
usb_handle_class_request_callback, 622
usb_SOF_callback, 623
usb_cdc_class.h, 625
usb_cdc_getc, 625
usb_cdc_handle_tx, 626
usb_cdc_print_int, 626
usb_cdc_print_str, 626
usb_cdc_putc, 627
usb_cdc_rx_avail, 627
usb_cdc_setup, 627
usb_cdc_tx_empty, 627
usb_cdc_getc
usb_cdc_class.c, 617
usb_cdc_class.h, 625
usb_cdc_handle_tx
usb_cdc_class.c, 617
usb_cdc_class.h, 626
usb_cdc_print_int
usb_cdc_class.c, 618
usb_cdc_class.h, 626
usb_cdc_print_str
usb_cdc_class.c, 618
usb_cdc_class.h, 626
usb_cdc_putc
usb_cdc_class.c, 618
usb_cdc_class.h, 627
usb_cdc_rx_avail
usb_cdc_class.c, 618
usb_cdc_class.h, 627
usb_cdc_set_dcd
usb_cdc_class.c, 619
usb_cdc_set_dsr
usb_cdc_class.c, 619
usb_cdc_setup
usb_cdc_class.c, 619
usb_cdc_class.h, 627
usb_cdc_tx_empty
usb_cdc_class.c, 619
usb_cdc_class.h, 627
usb_configure_endpoints
703
pic_usb.c, 511
usb_device_configured_callback
pic_usb.h, 532
usb_enable_module
pic_usb.c, 511
pic_usb.h, 532
usb_ep_data_in_callback
pic_usb.h, 533
usb_cdc_class.c, 619
usb_ep_data_out_callback
pic_usb.h, 533
usb_cdc_class.c, 620
USB_EP0_IN_ADDR
pic_usb_buffer_mgt.c, 545
USB_EP0_OUT_E_ADDR
pic_usb_buffer_mgt.c, 545
USB_EP0_OUT_O_ADDR
pic_usb_buffer_mgt.c, 545
usb_get_descriptor_callback
pic_usb.h, 534
usb_get_state
pic_usb.c, 512
pic_usb.h, 534
usb_handle_class_ctrl_read_callback
pic_usb.h, 535
usb_cdc_class.c, 621
usb_hid_class.c, 629
usb_handle_class_ctrl_write_callback
pic_usb.h, 535
usb_cdc_class.c, 621
usb_hid_class.c, 629
usb_handle_class_request_callback
pic_usb.h, 536
usb_cdc_class.c, 622
usb_hid_class.c, 629
usb_handle_isr
pic_usb.c, 512
pic_usb.h, 537
usb_handle_reset
pic_usb.c, 513
usb_handle_stall
pic_usb.c, 514
usb_handle_standard_request
pic_usb.c, 514
usb_handle_transaction
pic_usb.c, 515
usb_hid_class.c, 628
usb_handle_class_ctrl_read_callback, 629
usb_handle_class_ctrl_write_callback, 629
usb_handle_class_request_callback, 629
usb_hid_class.h, 630
req_GET_IDLE, 631
req_GET_PROTOCOL, 631
req_GET_REPORT, 631
req_SET_IDLE, 631
req_SET_PROTOCOL, 631
req_SET_REPORT, 631
usb_prime_ep0_out_e
pic_usb.c, 516
usb_prime_ep0_out_o
pic_usb.c, 517
usb_sdp
pic_usb.c, 521
pic_usb.h, 541
usb_send_data
pic_usb.c, 517
pic_usb.h, 538
usb_send_data_chunk
pic_usb.c, 518
usb_send_empty_data_pkt
pic_usb.c, 518
pic_usb.h, 539
usb_send_one_byte
pic_usb.c, 519
usb_send_status_ack
pic_usb.h, 531
usb_setup
pic_usb.c, 519
pic_usb.h, 539
usb_SOF_callback
pic_usb.h, 539
usb_cdc_class.c, 623
usb_stall_ep0
pic_usb.c, 519
pic_usb.h, 540
usb_stall_on_in
pic_usb.c, 520
usb_state
pic_usb.c, 521
pic_usb.h, 541
usb_state_type
pic_usb.h, 531
usb_status
pic_usb.c, 521
usb_status_type
pic_usb.h, 532
usb_version
device_descriptor, 12
vendor_id
device_descriptor, 12
VERTICAL
draw.h, 85
vol_lookup
ar1000.c, 43
WAKECON
mrf24j40_defines.h, 399
WAKECON_IMMWAKE
mrf24j40_defines.h, 399
WAKECON_REGWAKE
mrf24j40_defines.h, 399
WAKETIMEH
mrf24j40_defines.h, 399
704
WAKETIMEH_WAKETIME10
mrf24j40_defines.h, 399
WAKETIMEH_WAKETIME8
mrf24j40_defines.h, 399
WAKETIMEH_WAKETIME9
mrf24j40_defines.h, 399
WAKETIMEL
mrf24j40_defines.h, 399
WAKETIMEL_WAKETIME0
mrf24j40_defines.h, 399
WAKETIMEL_WAKETIME1
mrf24j40_defines.h, 399
WAKETIMEL_WAKETIME2
mrf24j40_defines.h, 399
WAKETIMEL_WAKETIME3
mrf24j40_defines.h, 400
WAKETIMEL_WAKETIME4
mrf24j40_defines.h, 400
WAKETIMEL_WAKETIME5
mrf24j40_defines.h, 400
WAKETIMEL_WAKETIME6
mrf24j40_defines.h, 400
WAKETIMEL_WAKETIME7
mrf24j40_defines.h, 400
wIndex
setup_data_packet, 35
wLength
setup_data_packet, 35
wpan.c, 632
debug_on, 633
mrf24j40_receive_callback, 633
mrf24j40_transmit_callback, 634
pkt_received, 637
receive_lost, 637
wpan_handle_receive, 634
wpan_init, 635
wpan_print_address, 635
wpan_print_frame_type, 636
wpan_print_mac_command, 636
wpan_process, 637
wpan_rx_buffer, 638
wpan_rx_count, 638
wpan_setup_io, 637
wpan.h, 638
FRAME_TYPE_ACK, 640
FRAME_TYPE_BEACON, 640
FRAME_TYPE_DATA, 640
FRAME_TYPE_MAC_COMMAND, 640
MAC_CMD_ASSOC_REQ, 640
MAC_CMD_ASSOC_RES, 640
MAC_CMD_BEACON_REQ, 640
MAC_CMD_COORD_REALIGN, 641
MAC_CMD_DATA_REQ, 641
MAC_CMD_DISASSOC, 641
MAC_CMD_GTS_REQ, 641
MAC_CMD_ORPHAN, 641
MAC_CMD_PAN_ID_CONFLICT, 641
pkt_received, 645
WPAN_ADDR_TYPE_EXTENDED, 641
WPAN_ADDR_TYPE_NONE, 641
WPAN_ADDR_TYPE_SHORT, 641
wpan_data_received_callback, 642
wpan_data_transmitted_callback, 642
wpan_handle_receive, 642
wpan_init, 643
wpan_print_address, 643
wpan_print_frame_type, 644
wpan_print_mac_command, 644
wpan_process, 645
wpan_setup_io, 645
WPAN_ADDR_TYPE_EXTENDED
wpan.h, 641
WPAN_ADDR_TYPE_NONE
wpan.h, 641
WPAN_ADDR_TYPE_SHORT
wpan.h, 641
wpan_address, 35
dest_address_type, 36
dest_ea, 36
dest_pan_id, 36
dest_sa, 36
source_address_type, 36
source_ea, 36
source_pan_id, 37
source_sa, 37
wpan_data_received_callback
its_mode1.c, 233
its_mode2.c, 252
wpan.h, 642
wpan_data_transmitted_callback
its_mode2.c, 252
wpan.h, 642
wpan_handle_receive
wpan.c, 634
wpan.h, 642
wpan_init
wpan.c, 635
wpan.h, 643
wpan_print_address
wpan.c, 635
wpan.h, 643
wpan_print_frame_type
wpan.c, 636
wpan.h, 644
wpan_print_mac_command
wpan.c, 636
wpan.h, 644
wpan_process
wpan.c, 637
wpan.h, 645
wpan_rx_buffer
wpan.c, 638