nesC

1 program Added 2025-11-12T09:21:27Z Model: x-ai/grok-4-fastTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit 8071b4f8ff · authored 2025-11-12T10:21:27+01:00 · model x-ai/grok-4-fast

Sources mentioning this language

7 sources · pl_id: pl/nesc
LLM (this repo) · 1PldbLinguistPygmentsWikipediaHyperpolyglotWikidata · Q286443

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsevent-driven · component-based software engineering
Typingstatic typing
Designed byTinyOS community
Influenced byC
LicenseOpen-source
Implemented inC
Homepagehttp://nescc.sourceforge.net

Extensions claimed by this language

2 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.nclinguistprimary1.1M files
.ncpygmentsprimary1.1M files

Related languages

Nesl (0.33)Neat (0.20)Neko (0.20)Neon (0.20)Neut (0.20)

LLM-contributed programs

Blink Application

Provenance: commit 8071b4f8ff · authored 2025-11-12T10:21:27+01:00 · model x-ai/grok-4-fast · Temp 0.4
code.nc · license: BSD · added: 2025-11-12T09:21:27Z
// $Id: Blink.nc,v 1.5 2006/12/12 18:22:56 vlahan Exp $

/*
/* Copyright (c) 2005-2006 Arch Rock Corporation
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * - Redistributions of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 * - Redistributions in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in the
 *   documentation and/or other materials provided with the
 *   distribution.
 * - Neither the name of the Arch Rock Corporation nor the names of
 *   its contributors may be used to endorse or promote products derived
 *   from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
 * ARCH ROCK OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

/**
 * Implementation for Blink application.  Puts the mote into a sleep
 * and wakes it up once per second to toggle the red led connected to
 * the mote.
 *
 * @author Phil Buonadonna
 * @author August 2005
 */

#include "Timer.h"

module BlinkC @safe()
{
  uses interface Boot;
  uses interface Leds;
  uses interface Timer<TMilli>;
}

implementation
{
  event void Boot.booted()
  {
    call Leds.led0On();
    call Timer.startPeriodic(1000);
  }

  event void Timer.fired()
  {
    call Leds.led0Toggle();
  }
}

Real programs from Software Heritage

1 sample mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
HplPXA27xDMAInfoC.nc · 2137 B · ext .nc · seen 36× in SWH
via unique-primary
swh:1:cnt:27edccc8bdd6d670418e32819385abb44809c6e4;origin=https://github.com/jmattsson/tinyos-arduino;anchor=swh:1:rev:11e80511993c2aaaef79b5ffa1deb8700355262a;path=/tos/chips/pxa27x/dma/HplPXA27xDMAInfoC.nc
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
/*
 * Copyright (c) 2005 Arch Rock Corporation 
 * All rights reserved. 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *	Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *	Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 *  
 *   Neither the name of the Arch Rock Corporation nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ARCHED
 * ROCK OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 */
/**
 *
 *
 * @author Kaisen Lin
 * @author Phil Buonadonna
 */

// Example (STUART RX):
// peripheral = 19 (Request to Channel Map register in PXA Dev Manual)
// baseAddr = &STRBR (DMA address)

// Example (STUART TX):
// peripheral = 20
// baseAddr = &STTHR

generic module HplPXA27xDMAInfoC(uint8_t peripheral, uint32_t baseAddr) {
  provides interface HplPXA27xDMAInfo;
}

implementation {
  async command uint32_t HplPXA27xDMAInfo.getAddr() {
    return baseAddr;
  }

  async command uint8_t HplPXA27xDMAInfo.getMapIndex() {
    return peripheral;
  }
}

Contribute — propose a file extension

Tell us where to find evidence about nesC (mapped to pl/nesc). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/nesC/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← neralie-format Nesl →