If pinInit(); function is called after the pins bit configurations the MCU can't start anymore after a reset or power off as he will try to configure the resiters but without having a Clk source

interrupts
key 4 years ago
parent aeda7542d3
commit 8c67198b08

@ -0,0 +1,16 @@
#ifndef _USART_H_
#define _USART_H_
#ifdef __cplusplus
extern "C" {
#endif
void usartTxInit();
void usartRxInit();
#ifdef __cplusplus
}
#endif
#endif // _USART_H_

@ -80,11 +80,11 @@ void pinSetSpeed(pinNo_t pinNo, speed speed)
void pinConfig(pinNo_t pinNo, mode mode, state state, pullUpDown resistance, speed speed)
{
pinInit(pinNo);
pinSetMode(pinNo, mode);
pinSetOutputState(pinNo, state);
pinSetPullUpDonw(pinNo, resistance);
pinSetSpeed(pinNo,speed);
pinInit(pinNo);
}
uint8_t pinRead(pinNo_t pinNo)

Loading…
Cancel
Save