Commit graph

104 commits

Author SHA1 Message Date
Mariano Alvira 43d23d4764 update ring_osc_on and _off to the new bit structs 2010-11-06 22:12:46 -04:00
Jim Paris 1b4de5d8e7 Add gpio_set and gpio_reset
Use them like gpio_set(GPIO_xx) and gpio_reset(GPIO_xx).
These macros efficiently set the DATA_SET and DATA_RESET bits without
reading the registers first, as a direct GPIO->DATA_SET.GPIO_xx would do
2010-10-16 13:28:20 -04:00
Jim Paris e6bd2a1318 Name the GPIO structure so we can set multiple bits at once 2010-10-16 13:28:20 -04:00
Jim Paris 76563958fe Add the disable_int({}) macro
This is similar to safe_irq_enable and disable
2010-10-16 13:27:20 -04:00
Jim Paris 03293b60ad Fix a makefile dependency with libraries
Using the implicit rules for libraries leads to problems if one of the
objects fails to build, but the others are still OK.  Just make all
library rules explicit to avoid this.
2010-09-28 16:01:15 -04:00
Jim Paris 6b4d6a9ade Use a variable for all target objects
Instead of specifying them individually.  This lets included makefiles
(like my audio/Makefile.include) append objects.
2010-09-28 02:54:23 -04:00
Jim Paris c7c79fc9b4 Add TMR_ADDR helper 2010-09-27 19:32:10 -04:00
Jim Paris 9cd46dfd4a Add some useful timer macros 2010-09-27 17:30:02 -04:00
Jim Paris ac2cac1e1d Register definitions: get rid of some macro magic that doesn't help much
Instead of e.g. GPIO.DATA.GPIO_08, you now use GPIO->DATA.GPIO_08.
2010-09-26 16:05:12 -04:00
Jim Paris bf94b6d3bd Add structure-based ITC access 2010-09-26 15:59:11 -04:00
Jim Paris 920954f398 REF_OSC is a 32-bit number, not 64-bit number 2010-09-25 23:16:59 -04:00
Jim Paris 2f52fdd156 Add cal_isr() support 2010-09-25 22:51:19 -04:00
Jim Paris 6c93b8fb0b Add structure-based CRM definitions 2010-09-25 22:40:40 -04:00
Jim Paris 9b6f648efb Add macro to help compute TMR.ENBL values (useful when using #defined
values to represent timers)
2010-09-25 17:16:12 -04:00
Jim Paris d6adce955c Add pin definitions for each timer, they're fixed 2010-09-25 15:33:53 -04:00
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