• @Frida: Thanks for testing and sharing your results

    I try to catch up:

    List of addresses of JshUSARTInfo

       br:  0x3ffff970
       rx:  0x3ffff974
       tx:  0x3ffff975
       ck:  0x3ffff976
       cts: 0x3ffff977
       bs:  0x3ffff978
       pa:  0x3ffff979
       sb:  0x3ffff97a
       xx:  0x3ffff97b
       eh:  0x3ffff97c
    

    Now I am testing with some if defs in src/jsutils.h

    
    // # if defined(ESP8266)
    // [#define](https://forum.espruino.com/search/?q=%23define) PACKED_FLAGS_MAYBE  __attribute__ ((__aligned__(16)))   
    // [#else](https://forum.espruino.com/search/?q=%23else)
    // [#define](https://forum.espruino.com/search/?q=%23define) PACKED_FLAGS_MAYBE __attribute__ ((__packed__))
    // [#endif](https://forum.espruino.com/search/?q=%23endif)
    
    

    @Gordon is this how you would thought to use PACKED_FLAGS_MAYBE

    and use this flag for jshUSARTSetup

    /// Settings passed to jshUSARTSetup to set it the USART up
    typedef struct {
      int baudRate;            /// FIXME uint32_t ???
      Pin pinRX;
      Pin pinTX;
      Pin pinCK;               ///< Clock, or PIN_UNDEFINED
      Pin pinCTS;              ///< Clear to send, or PIN_UNDEFINED
      unsigned char bytesize;  ///< size of byte, 7 or 8
      unsigned char parity;    ///< 0=none, 1=odd, 2=even
      unsigned char stopbits;  ///< 1 or 2
      bool xOnXOff;            ///< XON XOFF flow control?
      bool errorHandling;      ///< Whether to forward parity/framing errors
    } PACKED_FLAGS_MAYBE JshUSARTInfo;
    
About

Avatar for MaBe @MaBe started