Updated constructor to take parameters

This commit is contained in:
sam_grove 2014-01-09 16:41:15 +00:00
parent d16bc537fd
commit 552de461fb
2 changed files with 3 additions and 3 deletions

View file

@ -35,7 +35,7 @@ void nRF51822::uartCallback(void)
@brief Constructor
*/
/**************************************************************************/
nRF51822::nRF51822() : uart(p9, p10)
nRF51822::nRF51822(PinName tx, PinName rx, PinName rts, PinName cts) : uart(tx, rx)
{
/* Setup the nRF UART interface */
uart.baud(9600);
@ -44,7 +44,7 @@ nRF51822::nRF51822() : uart(p9, p10)
uart.attach(this, &nRF51822::uartCallback);
/* Add flow control for UART (required by the nRF51822) */
uart.set_flow_control(RawSerial::RTSCTS, p30, p29);
uart.set_flow_control(RawSerial::RTSCTS, rts, cts);
/* Reset the service and characteristic counters */
serviceCount = 0;

View file

@ -32,7 +32,7 @@
class nRF51822 : public BLERadio
{
public:
nRF51822();
nRF51822(PinName tx, PinName rx, PinName rts, PinName cts);
virtual ~nRF51822(void);
/* Functions that mus be implemented from BLERadio */