aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/ch.txt5
-rw-r--r--ports/ARM7-AT91SAM7X/sam7x_emac.c16
2 files changed, 9 insertions, 12 deletions
diff --git a/docs/ch.txt b/docs/ch.txt
index 833e2d2c2..8b00be5d7 100644
--- a/docs/ch.txt
+++ b/docs/ch.txt
@@ -24,6 +24,10 @@
* Win32 process and the application code does not need to be aware of it.
* MinGW and VS demos available and ready to go, use them as templates for
* your application.</li>
+ * <li>Preemptive scheduling.</li>
+ * <li>128 priority levels.</li>
+ * <li>Multiple threads at the same priorily level allowed.</li>
+ * <li>Round robin scheduling for threads at the same priority level.</li>
* <li>Unlimited number of threads.</li>
* <li>Unlimited number of virtual timers.</li>
* <li>Unlimited number of semaphores.</li>
@@ -40,7 +44,6 @@
* runtime.</li>
* <li>Blocking and non blocking I/O channels with timeout and events generation
* capability.</li>
- * <li>Pre-emptive scheduling.</li>
* <li>Minimal system requirements: about 8KiB ROM with all options enabled and
* speed optimizations on. The size can shrink under 2KiB by disabling the
* the unused subsystems and optimizing for size.</li>
diff --git a/ports/ARM7-AT91SAM7X/sam7x_emac.c b/ports/ARM7-AT91SAM7X/sam7x_emac.c
index a8f7bf0a8..e651c411e 100644
--- a/ports/ARM7-AT91SAM7X/sam7x_emac.c
+++ b/ports/ARM7-AT91SAM7X/sam7x_emac.c
@@ -38,13 +38,13 @@ static bool_t link_up; /* Last from EMACGetLinkStatus()*/
static uint8_t default_mac[] = {0xAA, 0x55, 0x13, 0x37, 0x01, 0x10};
-BufDescriptorEntry rent[EMAC_RECEIVE_BUFFERS] __attribute__((aligned(8)));
+static BufDescriptorEntry rent[EMAC_RECEIVE_BUFFERS] __attribute__((aligned(8)));
static uint8_t rbuffers[EMAC_RECEIVE_BUFFERS * EMAC_RECEIVE_BUFFERS_SIZE] __attribute__((aligned(8)));
-BufDescriptorEntry *rxptr;
+static BufDescriptorEntry *rxptr;
-BufDescriptorEntry tent[EMAC_TRANSMIT_BUFFERS] __attribute__((aligned(8)));
+static BufDescriptorEntry tent[EMAC_TRANSMIT_BUFFERS] __attribute__((aligned(8)));
static uint8_t tbuffers[EMAC_TRANSMIT_BUFFERS * EMAC_TRANSMIT_BUFFERS_SIZE] __attribute__((aligned(8)));
-BufDescriptorEntry *txptr;
+static BufDescriptorEntry *txptr;
#define PHY_ADDRESS 1
#define AT91C_PB15_ERXDV AT91C_PB15_ERXDV_ECRSDV
@@ -199,9 +199,7 @@ void InitEMAC(int prio) {
AT91C_BASE_EMAC->EMAC_RSR = AT91C_EMAC_OVR |
AT91C_EMAC_REC |
AT91C_EMAC_BNA; // Clears RSR
- AT91C_BASE_EMAC->EMAC_NCFGR |= AT91C_EMAC_CAF |
- AT91C_EMAC_NBC |
- AT91C_EMAC_DRFCS; // Initial NCFGR settings
+ AT91C_BASE_EMAC->EMAC_NCFGR |= AT91C_EMAC_DRFCS; // Initial NCFGR settings
AT91C_BASE_EMAC->EMAC_NCR |= AT91C_EMAC_TE |
AT91C_EMAC_RE |
AT91C_EMAC_CLRSTAT; // Initial NCR settings
@@ -218,10 +216,6 @@ void InitEMAC(int prio) {
/*
* Waits for auto-negotiation to end and then detects the link status.
*/
-/* while (!(phy_get(MII_BMSR) & BMSR_ANEGCOMPLETE))
- ;
- if (!EMACGetLinkStatus())
- chDbgPanic("no link");*/
AT91C_BASE_EMAC->EMAC_NCR &= ~AT91C_EMAC_MPE;
/*