The MWX Library

revision history

About the MWX library

  The design policy
  License
  Terms

Install and Build

  Environment (OS, etc.)
  Installing the TWELITE SDK
  Building ACT
  Creating a new project
  Installing VSCode
  Build definition Makefile
  Other platforms

Sample ACTs

  act0 .. 4
  BRD_APPTWELITE
  BRD_ARIA
  BRD_I2C_TEMPHUMID
  PAL_AMB-bhv
  PAL_AMB-usenap
  PAL_AMB
  PAL_MAG
  PAL_MOT-single
  PAL_MOT-fifo
  Parent_MONOSTICK
  PingPong
  PulseCounter
  Rcv_Unvsl (Universal Reciever)
  Scratch
  Slp_Wk_and_Tx
  SM_SIMPLE state machine
  Unit_???
  WirelessUART

API

  BEHAVIOR
   PAL_AMB-behavior
  Class
   alloc
   axis_xyzt
   MWX_APIRET
   packet_rx
   packet_tx
   pktparser
    E_PKT
    idenify_packet_type()
    TwePacket
     TwePacketIO
     TwePacketPAL
     TwePacketTwelite
     TwePacketUART
   serparser
   smplbuf
    .get_stream_helper()
    smplbuf_strm_u8
   smplque
   SM_SIMPLE state machine
   mwx::stream
    stream_helper
    mwx::bigendian
    mwx::crlf
    mwx::flush
    format (mwx::mwx_format)
  Definition.
  External Libraries
   EASTL
  Functions
   DIO General-purpose digital IO
    attachIntDio()
    detachIntDio()
    digitalRead()
    digitalReadBitmap()
    digitalWrite()
    pinMode()
   System function
    delay()
    delayMicroseconds()
    millis()
    random()
   Utility functions
    Byte array utils
    CRC8, XOR, LRC
    collect_bits()
    div100()
    expand_bytes()
    pack_bits()
    pack_bytes()
    pnew()
    Printf utils
    Scale utils
  Class Objects
   Analogue
   Buttons
   EEPROM
   PulseCounter
   Serial
   SerialParser
   SPI
    SPI access (using helper class)
    SPI access (using member functions)
   the_twelite
   TickTimer
   Timer0 .. 4
   Wire
    Wire (using helper class)
    Wire (using member function)
  Callback functions
   begin()
   init_coldboot()
   init_warmboot()
   loop()
   on_rx_packet()
   on_tx_comp()
   setup()
   wakeup()

Board (BRD)

  <ARIA>
  <BRD_APPTWELITE>
  <CUE>
  <MONOSTICK>
  PAL
   <PAL_AMB>
   <PAL_MAG>
   <PAL_MOT>
   <PAL_NOTICE>

Sensor Devices (SNS)

  BMx280 - Environmental Sensors
  LTR-308ALS - Illuminance sensor
  MC3630 - Accelerometer
  PCA9632 - LED Driver
  SHT3x - Temperature and humidity sensor
  SHT4x - Temperature and humidity sensor
  SHTC3 - Temperature and humidity sensor

Network (NWK)

  layered tree network <NWK_LAYERED>
  simple relay network <NWK_SIMPLE>

Settings (STG) - Interactive settings mode

  <STG_STD>