Skip to content

Fix within/writable spelling in .\src\USBHost and .\src\USBHost3GModule #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/USBHost/USBDeviceConnected.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class USBDeviceConnected
* @param intf_nb the interface on which to lookup the USBEndpoint
* @param type type of the USBEndpoint looked for
* @param dir direction of the USBEndpoint looked for
* @param index the index of the USBEndpoint whitin the interface
* @param index the index of the USBEndpoint within the interface
* @returns pointer on the USBEndpoint if found, NULL otherwise
*/
USBEndpoint * getEndpoint(uint8_t intf_nb, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir, uint8_t index = 0);
Expand Down
4 changes: 2 additions & 2 deletions src/USBHost3GModule/IUSBHostSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class IUSBHostSerial {
*
* @returns the number of bytes available
*/
virtual int writeable() = 0;
virtual int writable() = 0;

/**
* Attach a handler to call when a packet is received / when a packet has been transmitted.
Expand All @@ -84,7 +84,7 @@ class IUSBHostSerial {
virtual void attach(IUSBHostSerialListener* pListener) = 0;

/**
* Enable or disable readable/writeable callbacks
* Enable or disable readable/writable callbacks
*/
virtual void setupIrq(bool en, IrqType irq = RxIrq) = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/USBHost3GModule/IUSBHostSerialListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class IUSBHostSerialListener
{
public:
virtual void readable() = 0; //Called when new data is available
virtual void writeable() = 0; //Called when new space is available
virtual void writable() = 0; //Called when new space is available
};

#endif /* USBHOST_3GMODULE */
Expand Down
6 changes: 3 additions & 3 deletions src/USBHost3GModule/WANDongleSerialPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ int WANDongleSerialPort::readable()
return res;
}

int WANDongleSerialPort::writeable()
int WANDongleSerialPort::writable()
{
tx_mtx.lock();
if (lock_tx)
Expand Down Expand Up @@ -246,7 +246,7 @@ void WANDongleSerialPort::setupIrq(bool en, IrqType irq /*= RxIrq*/)
{
cb_tx_pending = false;
tx_mtx.unlock();
listener->writeable(); //Process the interrupt that was raised
listener->writable(); //Process the interrupt that was raised
}
else
{
Expand Down Expand Up @@ -321,7 +321,7 @@ void WANDongleSerialPort::txHandler()
if(cb_tx_en)
{
tx_mtx.unlock();
listener->writeable(); //Call handler from the IRQ context
listener->writable(); //Call handler from the IRQ context
//writePacket() should be called by the handler subsequently once the buffer has been filled
}
else
Expand Down
4 changes: 2 additions & 2 deletions src/USBHost3GModule/WANDongleSerialPort.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class WANDongleSerialPort : public IUSBHostSerial {
*
* @returns the number of bytes available
*/
virtual int writeable();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cristidragomir97, Just wanted to point out that I changed the writeable() methods to writable() across the entire repository. This change shouldn't create any problems, should it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the implications of this on other libraries/examples. Let's ask @facchinm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

virtual int writable();

/**
* Attach a handler to call when a packet is received / when a packet has been transmitted.
Expand All @@ -91,7 +91,7 @@ class WANDongleSerialPort : public IUSBHostSerial {
virtual void attach(IUSBHostSerialListener* pListener);

/**
* Enable or disable readable/writeable callbacks
* Enable or disable readable/writable callbacks
*/
virtual void setupIrq(bool en, IrqType irq = RxIrq);

Expand Down