pub struct Bg77Hal<'a, PIN0, PIN1, PIN2, TX, RX, CLOCK>{
pub pin_enable: PIN0,
pub pin_reset_n: PIN1,
pub pin_pwrkey: PIN2,
pub tx: TX,
pub rx: RX,
pub clock: &'a CLOCK,
}Expand description
Hardware abstraction for the BG77
-
pin_enableis used to physically power-up and power-down the modem, e.g. via a FET. If this feature should not be used, just mock the pin :) -
pin_reset_nandpin_pwrkeycorrespond to the respective BG77 input pins. If those are inverted on your PCB (with an n-channel or npn transistor), do not forget to invert the software pins, too.Note:
pin_pwrkeyis referred to as just PWRKEY in the Quectel documentation although it is an active-low pin which is pulled up internally. -
txandrxcorrespond to the serial uart which connects to the BG77. It is advisable thatrxis backed by a sufficiently large buffer because depending on your setting (MCU speed, optimization level, type of input buffering), data handling could be slower than the physical data transmission. If so, the input buffer will run quite full when receiving large chunks of data. Concretely: Choose an input buffer size of at least 1460 bytes plus safety margin, 1460 bytes is the biggest data chunk that can be received/read in a single AT command. -
Timers
at_timerandmodem_timerfor delays and timeouts
Fields§
§pin_enable: PIN0§pin_reset_n: PIN1§pin_pwrkey: PIN2§tx: TX§rx: RX§clock: &'a CLOCK