Skip to content

Commit

Permalink
Test rx only modification in fdserial
Browse files Browse the repository at this point in the history
Remove rxOnly variable from fdserial structure and use mode bits that the PASM ignores.
  • Loading branch information
AndyLindsay committed Dec 18, 2017
1 parent bc7ff15 commit b3f5a30
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
Binary file modified Learn/Simple Libraries/TextDevices/libfdserial/cmm/libfdserial.a
Binary file not shown.
15 changes: 8 additions & 7 deletions Learn/Simple Libraries/TextDevices/libfdserial/fdserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ fdserial *fdserial_open(int rxpin, int txpin, int mode, int baudrate)
{
fdptr->tx_pin = fdptr->rx_pin;
fdptr->mode |= FDSERIAL_MODE_OPENDRAIN_TX;
fdptr->mode &= (~FDSERIAL_MODE_RX_ONLY);
fdptr->rxOnly = 1;
//fdptr->mode &= (~FDSERIAL_MODE_RX_ONLY);
//fdptr->rxOnly = 1;
}
else
{
fdptr->rxOnly = 0;
}
//else
//{
// fdptr->rxOnly = 0;
//}

/* now start the kernel */
#if defined(__PROPELLER_USE_XMM__)
Expand Down Expand Up @@ -142,7 +142,8 @@ int fdserial_txChar(fdserial *term, int txbyte)
{
int rc = -1;
fdserial_st *fdptr = (fdserial_st *) term->devst;
if(!fdptr->rxOnly)
//if(!fdptr->rxOnly)
if(fdptr->mode & FDSERIAL_MODE_RX_ONLY)
{
volatile fdserial_st* fdp = (fdserial_st*) term->devst;
volatile char* txbuf = (volatile char*) fdp->buffptr + FDSERIAL_BUFF_MASK+1;
Expand Down
2 changes: 1 addition & 1 deletion Learn/Simple Libraries/TextDevices/libfdserial/fdserial.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ typedef struct fdserial_struct
/** interface mode */ int mode;
/** clkfreq / baud */ int ticks;
/** pointer to rx buffer */ char *buffptr;
/** rx-only mode */ char rxOnly;
/** rx-only mode */ //char rxOnly;
} fdserial_st;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fdserial_utils.c
pst.spin
fdserial.c
>compiler=C
>memtype=cmm main ram compact
>memtype=lmm main ram
>optimize=-Os
>-m32bit-doubles
>-Wall
Expand Down
Binary file modified Learn/Simple Libraries/TextDevices/libfdserial/lmm/libfdserial.a
Binary file not shown.
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.4.35
v1.4.36

0 comments on commit b3f5a30

Please sign in to comment.