Commit Graph

139 Commits

Author SHA1 Message Date
Jim Paris 7fb074c060 Add structure-based GPIO register definitions 2010-09-24 16:29:43 -04:00
Jim Paris 1a014bab1b Add structure-based timer register definitions 2010-09-24 16:29:43 -04:00
Jim Paris 0a41939407 Makefile cleanup.
This is an attempt to fix and cleanup all of the rules, and get rid of
some of the recursion.  We still need to invoke make several times
when we're building for more than one board, and some things can get a
bit weird when that happens, but it should generally work.  A single
BOARD=foo build should be fully correct, now.

I attempted to keep things compatible, so existing Makefiles that
include libmc1322x/Makefile.include should still work correctly.
2010-09-24 16:29:43 -04:00
Jim Paris be25b73b8e Add missing type for TMR0_COMP2 2010-09-18 17:37:06 -04:00
Mariano Alvira 36d0b2708d get LQI of received packets 2010-08-18 14:55:50 -04:00
Mariano Alvira de64b18aca Fix the CNTR defines.
Thanks to Ruslan for finding this.
2010-08-16 10:30:15 -04:00
Mariano Alvira 7f6c99cf9b increase the reception time now that tx_packet will advance the timer
as necessary.
2010-07-14 14:45:14 -04:00
Mariano Alvira e60190eb11 Merge branch 'master' of git://git.devl.org/git/malvira/libmc1322x 2010-07-14 14:01:54 -04:00
Mariano Alvira 7d60dd7a6d in tx_packet, force an interrupt if the maca isn't doing anything so
that the transmit starts. Or if the maca is in a reception cycle,
advance the softclock timeout to now so that transmission starts as
soon as possible (immediately if a packet isn't being received or
right after reception finishes).
2010-07-14 13:59:28 -04:00
Mariano Alvira 6db3b903d2 make the debug prints in check_maca more specific 2010-07-14 13:58:47 -04:00
Mariano Alvira d75d193762 use 32 packets in the pool by default 2010-07-14 13:55:55 -04:00
Mariano Alvira 7e5ebe88f7 properly drop characters when buffer is full
fix by David Kopf
2010-07-06 09:34:23 -04:00
Mariano Alvira 4035dc44f3 enable sprintf 2010-06-01 15:12:34 -04:00
Mariano Alvira 6aab3625a2 convert to UNIX line endings. 2010-06-01 15:06:55 -04:00
Mariano Alvira de7ed4812d use PACKET_STATS for additional debugging 2010-05-23 13:00:21 -04:00
Mariano Alvira 4a9f086ceb force interrupts instead of calling maca_isr 2010-05-23 12:57:40 -04:00
Mariano Alvira 60f079c168 add additional debugging to check_maca 2010-05-23 12:51:03 -04:00
Mariano Alvira 71cd2c2ead add PACKET_STATS: extra flags to packets for debugging. 2010-05-22 15:45:52 -04:00
Mariano Alvira d73467dc59 add INTFRC 2010-05-22 15:44:38 -04:00
Mariano Alvira 64081c2fb8 small improvment to count_packets 2010-05-21 12:38:19 -04:00
Mariano Alvira 2fcfe11096 add debug messages to check_maca 2010-05-21 12:00:08 -04:00
Mariano Alvira 7a462268c8 increased the receive length --- this reduces the chance of missing a
packet which managing the radio.
2010-05-13 10:52:26 -04:00
Mariano Alvira e278ec0242 fixup the uart tx isr. 2010-05-12 16:41:24 -04:00
Mariano Alvira 1460eac9cd move safe_irq_disable and irq_restore to isr.h 2010-05-12 16:40:44 -04:00
Mariano Alvira e0da07ae95 don't need to reinit maca when the clock stops, just call resume sync
instead.
2010-05-11 17:59:51 -04:00
Mariano Alvira 081c8ce098 decreased recv and tx timeouts. 2010-05-11 15:53:14 -04:00
Mariano Alvira 6195931bd4 add attribution and license headers to source files. TODO item about
start.S and printf.c
2010-05-08 13:03:36 -04:00
Mariano Alvira 7b3a8b9f77 pulled in gpio_data_get from the quahogcon guys. 2010-05-04 12:55:29 -04:00
Mariano Alvira 14c4faf977 add check_maca and count_packets 2010-04-06 15:09:26 -04:00
Mariano Alvira 74643bbdac don't need to disable irqs in post anymore 2010-04-06 12:55:56 -04:00
Mariano Alvira e6a92481a1 initialize packet pointers properly. 2010-04-06 12:53:57 -04:00
Mariano Alvira 4f8fc7bdfd add packet bound checks as an option 2010-04-06 12:52:08 -04:00
Mariano Alvira 605898dab2 this needs to stay off. 2010-03-30 11:50:12 -04:00
Mariano Alvira c6d3073b9c make tx_head also visible 2010-03-29 19:28:01 -04:00
Mariano Alvira c6fc0e4d02 pull in set_demodulator_type and clean up maca.h a little (now you can
skim the top of the file and get a decent overview on how to use the
thing).
2010-03-29 11:51:06 -04:00
Mariano Alvira 097922e709 implement tx_callback 2010-03-26 13:33:49 -04:00
Mariano Alvira 63285015b0 remove some reg32 in gpio.h 2010-03-19 22:34:59 -04:00
Mariano Alvira b39287cc2d move MAX_PACKET_SIZE to maca.h 2010-03-19 22:32:55 -04:00
Mariano Alvira 67db72908a make rx_head visible (in case you want to test if there are packets
waiting)
2010-03-19 22:31:24 -04:00
Mariano Alvira 5b713a1f26 rename radio_on off to maca_on off 2010-03-19 22:29:27 -04:00
Mariano Alvira 654a4349af remove vreg_init from maca 2010-03-19 22:27:41 -04:00
Mariano Alvira 7272f9aec3 change types to match stdint
have printf test print the sizes of these.
2010-03-17 17:27:21 -04:00
Mariano Alvira c624e4e475 these gpio routines should be volatile 2010-03-17 16:41:48 -04:00
Mariano Alvira 407fda80e0 fix typo in tmr.h (which cause tmr_enable register to have the wrong
address)
2010-03-17 15:55:04 -04:00
Mariano Alvira a5eadcf5a9 Revert "use standard types"
Breaks tmr tests.

This reverts commit c4f438616a.
2010-03-17 15:52:04 -04:00
Mariano Alvira 35c9c66c23 use new gpio interface 2010-03-16 22:03:38 -04:00
Mariano Alvira c6012611ba remove short addr from packet 2010-03-16 22:02:36 -04:00
Mariano Alvira 716f166dd3 new interface for dealing with GPIO banks 2010-03-16 22:01:34 -04:00
Mariano Alvira c4f438616a use standard types 2010-03-16 22:00:38 -04:00
Mariano Alvira 092a182a5d protect set_channel and set_power from interrupts. 2010-03-16 10:34:11 -04:00
Mariano Alvira 2aa76aaacd init_phy was doing phy initialization and maca reset. maca_reset was
doing nothing useful. This patch factors init_phy and rewrites
maca_reset.
2010-03-16 10:31:35 -04:00
Mariano Alvira 07e6b65182 fix up long types in printfs
from Clive Stubbings.
2010-03-15 07:24:48 -04:00
Mariano Alvira fecb5e7bdb many warning cleanups.
Contributed by Clive Stubbings.
2010-03-13 07:30:47 -05:00
Mariano Alvira a61deb78f4 add a way to disable FCS checking. 2010-03-11 15:18:29 -05:00
Mariano Alvira 3cd4bf5768 clear the offset when freeing a packet 2010-03-10 17:59:04 -05:00
Mariano Alvira a5f8b58e07 debug PRINTF fixes 2010-03-10 15:35:13 -05:00
Mariano Alvira ecebd094bf fix radio_off for interrupts 2010-03-10 15:35:04 -05:00
Mariano Alvira 67aed03b1d added interrupt based uarts. 2010-03-09 18:23:40 -05:00
Mariano Alvira db145ed8a4 removed some stale comments 2010-03-08 18:45:26 -05:00
Mariano Alvira eed8544a0d rx callback 2010-03-08 18:12:59 -05:00
Mariano Alvira ea2646e5ec implement rx callback 2010-03-08 18:12:31 -05:00
Mariano Alvira 8b73c61175 change the receive timeout to be 32 large packets 2010-03-08 17:39:04 -05:00
Mariano Alvira 761d2c4cbf handle case when buffers are full and we need to transmit.
this is a problem because there won't be a buffer available for the
acknowledgment. In this case use the dummy_ack packet which is always
free for this purpose.
2010-03-08 17:37:35 -05:00
Mariano Alvira 0f9f67d002 add dir set and reset 2010-03-08 17:35:34 -05:00
Mariano Alvira 06e3e0b207 add maca_init()
changed tests to use it.
2010-03-08 14:49:31 -05:00
Mariano Alvira 571861c6ea post_receive still needs to timeout if it can't find any free
bufferes.
2010-03-08 12:29:49 -05:00
Mariano Alvira 2a07cbe665 enabled softclk timeouts
fixed post interleaving problem

fixed interrupts in ResumeMACASync.

This seems quite solid now.
2010-03-08 12:03:20 -05:00
Mariano Alvira d3f6ef07f2 sort out the length details. 2010-03-07 18:48:47 -05:00
Mariano Alvira a04a69480b add the 4 byte preamble 2010-03-07 17:07:54 -05:00
Mariano Alvira 024448e65e add an offset to packet_t to compensate for the added length byte on
reception
2010-03-07 17:04:30 -05:00
Mariano Alvira 667b238148 rftest-tx and refine post_tx for fast transmission 2010-03-07 16:49:57 -05:00
Mariano Alvira 4b17c144d0 LEDs now indicate bit position (instead of (1 << pos)) which is more
consistent with how everything else works
2010-03-07 15:39:56 -05:00
Mariano Alvira 0dac24e1eb this is pretty close to working together. 2010-03-06 19:54:55 -05:00
Mariano Alvira e8550f26ba this receive seems to work well.
It has checksum errors at 123 byte payloads, but this was tested with
the old rftest-tx --- so the transmit side could be the problem.
2010-03-06 19:14:55 -05:00
Mariano Alvira f5391e88dc commented the data indication printf 2010-03-06 18:50:47 -05:00
Mariano Alvira 2d68c30934 this receive works 2010-03-06 18:48:13 -05:00
Mariano Alvira 0f400b4341 lots of fixes.
major fix is adding a completion counter based on packet length to
restart the MACA when it freezes on transmit.
2010-03-06 17:58:49 -05:00
Mariano Alvira 5c20312744 this does 127 B packets as fast as possible (with these settings).
Transmitts are every 5.8ms and are 4.48ms long
2010-03-05 19:25:38 -05:00
Mariano Alvira 8e3c2a8622 added locking and interrupt disables.
transmit looks pretty good.
2010-03-05 17:06:08 -05:00
Mariano Alvira 0c3947ddd6 forgot to add packet.h 2010-03-05 06:59:51 -05:00
Mariano Alvira 5bda57ed39 progress on maca overhaul 2010-03-04 18:52:42 -05:00
Mariano Alvira 0037fd9527 general header updates 2010-03-04 18:51:27 -05:00
Mariano Alvira 02c0442d84 fill out MACA_CONTROL fields 2010-03-03 18:46:39 -05:00
Mariano Alvira 80c25e2602 add bitfield macros 2010-03-03 18:46:23 -05:00
Mariano Alvira 43b57ea41a fix board message 2010-03-03 14:07:00 -05:00
Mariano Alvira 3969c56a0f remove put from lib 2010-03-03 08:10:53 -05:00
Mariano Alvira 00224dd7eb pulled put out of lib
still need set __putc as a fuction pointer to the uart_putc
2010-03-03 08:09:19 -05:00
Mariano Alvira 4b22b25e38 changed maca.c over to printf 2010-03-02 18:23:23 -05:00
Mariano Alvira d5b20ddce5 renamed libmc1322x to lib 2010-03-02 09:51:58 -05:00