Commit Graph

5 Commits (97e2d4a8c55ac8959f66cd1cb60529708ff7a830)

Author SHA1 Message Date
Kevin Bracey b18332cb4d Avoid wait_ms() spin
System's wait_ms() spins to achieve a precise delay - we don't want this.
Call Thread::wait directly.
2017-09-28 10:45:57 +03:00
Jimmy Brisson c1e455c594 Merge pull request #4615 from u-blox/uart_serial_set_baud
Add set_baud() method to UARTSerial().
2017-07-24 10:50:43 -05:00
Rob Meades 89ddfc5beb Add set_baud() method to UARTSerial(). 2017-06-22 12:26:48 +01:00
Hasnain Virk 64a92df455 Avoid lock collision b/w SerialBase & UARTSerial
Fixes issue #4537. SerialBase and UARTSerial happened to have same names
for the mutex locking that confused the system of holding a mutex in interrupt context.
UARTSerial has to change so as to provide empty implementations for lock() and unlock()
becuase it uses SerialBase from interrupt context only or from its own critical section,
so no extra locks required.
Private locks for UARTSerial itself are renamed to api_lock() and api_unlock().
2017-06-13 16:28:31 +03:00
Hasnain Virk 24de27c989 Major Refactoring & extensions
For keep supporting external APIs with the same name (supposedly there are a larger
number of users of those APIs), BufferedSerial and ATParser are being renamed.
BufferedSerial becomes UARTSerial, will complement a  future USBSerial etc.
ATParser becomes ATCmdParser.

* UARTSerial moves to /drivers

* APN_db.h is moved from platform to cellular/util/.

* Original CellularInterface is restored for backward compatability (again, supposedly there
  are users of that).

* A new file, CellularBase is added which will now servce as the base class for all
  upcoming drivers.

* Special restructuring for the driver has been undertaken. This makes a clear cut distinction
  between an on-board or an off-board implementation.
  	- PPPCellularInterface is a generic network interface that works with a generic FileHandle
          and PPP. A derived class is needed to pass that FileHandle.
        - PPPCellularInterface provides some base functionality like network registration, AT setup,
          PPP connection etc. Lower level job is delegated to the derived classes and various modem
          specific APIs are provided which are supposed to be overridden.
        - UARTCellularInterface is derived from PPPCellularInterface. It constructs a FileHandle and
          passes it back to PPPCellularInterface as well as provides modem hangupf functionality.
          In future we could proive a USBInterface that would derive from PPPCellularInterface and could
          pass the FileHandle back.
	- OnboardCellularInterface is derived from UARTCellularInterfae and provides hooks to
          the target provided implementation of onbard_modem_api.h. An off-board modem, i.e, a modem on
          a shield has to override the modem_init(), modem_power_up() etc as it cannot use
          onboard_modem_api.h.
2017-05-31 15:02:11 +03:00