add radio_on and radio_off.
This commit is contained in:
parent
05bd6c897c
commit
ebee1f67d7
|
@ -412,6 +412,8 @@ void init_phy(void);
|
||||||
void vreg_init(void);
|
void vreg_init(void);
|
||||||
void ResumeMACASync(void);
|
void ResumeMACASync(void);
|
||||||
void radio_init(void);
|
void radio_init(void);
|
||||||
|
void radio_off(void);
|
||||||
|
void radio_on(void);
|
||||||
uint32_t init_from_flash(uint32_t addr);
|
uint32_t init_from_flash(uint32_t addr);
|
||||||
void set_power(uint8_t power);
|
void set_power(uint8_t power);
|
||||||
void set_channel(uint8_t chan);
|
void set_channel(uint8_t chan);
|
||||||
|
|
13
src/maca.c
13
src/maca.c
|
@ -146,6 +146,19 @@ void vreg_init(void) {
|
||||||
*(volatile uint32_t *)(0x80003048) = 0x00000ff8; /* start the regulators */
|
*(volatile uint32_t *)(0x80003048) = 0x00000ff8; /* start the regulators */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void radio_off(void) {
|
||||||
|
/* turn off the radio regulators */
|
||||||
|
reg(0x80003048) = 0x00000f00;
|
||||||
|
/* hold the maca in reset */
|
||||||
|
maca_reset = maca_reset_rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
void radio_on(void) {
|
||||||
|
/* turn the radio regulators back on */
|
||||||
|
reg(0x80003048) = 0x00000f78;
|
||||||
|
/* reinitialize the phy */
|
||||||
|
init_phy();
|
||||||
|
}
|
||||||
|
|
||||||
/* radio_init has been tested to be good */
|
/* radio_init has been tested to be good */
|
||||||
void radio_init(void) {
|
void radio_init(void) {
|
||||||
|
|
Loading…
Reference in a new issue