add nrf_set_strength() - openbeacon needs it :-)

This commit is contained in:
Stefan `Sec` Zehl 2011-07-17 20:01:07 +02:00
parent 462d9f3a32
commit 093370587f
2 changed files with 8 additions and 0 deletions

View File

@ -283,6 +283,12 @@ void nrf_config_get(nrfconfig config){
};
void nrf_set_strength(unsigned char strength){
if(strength>3)
strength=3;
nrf_write_reg(R_RF_SETUP,DEFAULT_SPEED|(strength<<1));
};
void nrf_init() {
// Enable SPI correctly
sspInit(0, sspClockPolarity_Low, sspClockPhase_RisingEdge);

View File

@ -155,6 +155,8 @@ void nrf_set_channel(int channel);
void nrf_config_set(nrfconfig config);
void nrf_config_get(nrfconfig config);
void nrf_set_strength(unsigned char strength);
/* END */
#endif /* _NRF24L01P_H */