mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
baudrate for usart: use define and limit to 115200 only for WITH_FPC_HOST
This commit is contained in:
parent
85f67006e4
commit
3cba736841
2 changed files with 5 additions and 3 deletions
|
@ -27,6 +27,7 @@
|
||||||
#include "cmdhw.h"
|
#include "cmdhw.h"
|
||||||
#include "whereami.h"
|
#include "whereami.h"
|
||||||
#include "comms.h"
|
#include "comms.h"
|
||||||
|
#include "usart.h"
|
||||||
|
|
||||||
static void showBanner(void) {
|
static void showBanner(void) {
|
||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
|
@ -422,8 +423,9 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
// default speed for USB 460800, USART(FPC serial) 115200 baud
|
// default speed for USB 460800, USART(FPC serial) 115200 baud
|
||||||
if (speed == 0)
|
if (speed == 0)
|
||||||
#ifdef WITH_FPC
|
#ifdef WITH_FPC_HOST
|
||||||
speed = 115200;
|
// Let's assume we're talking by default to pm3 over usart in this mode
|
||||||
|
speed = AT91_BAUD_RATE;
|
||||||
#else
|
#else
|
||||||
speed = 460800;
|
speed = 460800;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -180,7 +180,7 @@ void usart_init(void) {
|
||||||
// all interrupts disabled
|
// all interrupts disabled
|
||||||
pUS1->US_IDR = 0xFFFF;
|
pUS1->US_IDR = 0xFFFF;
|
||||||
|
|
||||||
pUS1->US_BRGR = 48054841 / (115200 << 3);
|
pUS1->US_BRGR = 48054841 / (AT91_BAUD_RATE << 3);
|
||||||
// Need speed?
|
// Need speed?
|
||||||
//pUS1->US_BRGR = 48054841 / (460800 << 3);
|
//pUS1->US_BRGR = 48054841 / (460800 << 3);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue