Skip to content

Commit

Permalink
Add support for ti minidev board
Browse files Browse the repository at this point in the history
  • Loading branch information
ps2 committed Mar 26, 2016
1 parent a79eabf commit d2f96a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
#define GREEN_LED P1_7
#define BLUE_LED P1_6
#define SYSTEM_CLOCK_MHZ 24
#elif TI_MINIDEV
#define HARDWARE_FLOW_CONTROL_CONFIG 0xc0; /* 8N1, hw flow control, high stop bit */
#define HARDWARE_LED_INIT P1DIR |= BIT0|BIT1;
#define GREEN_LED P1_0
#define BLUE_LED P1_1
#define SYSTEM_CLOCK_MHZ 26
#endif


Expand Down
8 changes: 6 additions & 2 deletions uart1_alt2/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ void configure_serial()
P0SEL &= ~0x3c;

///////////////////////////////////////////////////////////////
// Initialize bitrate (U0BAUD.BAUD_M, U0GCR.BAUD_E)
// Initialize bitrate (U1BAUD.BAUD_M, U1GCR.BAUD_E)
// Bitrate 19200
U1BAUD = 163;
#if SYSTEM_CLOCK_MHZ == 26
U1BAUD = 131;
#else
U1BAUD = 163;
#endif
U1GCR = (U0GCR&~0x1F) | 9;
U1UCR |= HARDWARE_FLOW_CONTROL_CONFIG; // Flush, and configure hw flow control

Expand Down

0 comments on commit d2f96a0

Please sign in to comment.