Skip to content

Commit 2234248

Browse files
committed
Merge pull request #3 from mbedmicro/master
Update my fork with original
2 parents 0601957 + 8902229 commit 2234248

File tree

253 files changed

+40610
-2164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+40610
-2164
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ NXP:
3030
* [mbed LPC11U24](http://developer.mbed.org/platforms/mbed-LPC11U24/) (Cortex-M0)
3131
* [EA LPC11U35](http://developer.mbed.org/platforms/EA-LPC11U35/) (Cortex-M0)
3232
* mbed LPC2368 (ARM7TDMI-S)
33+
* LPC2460 (ARM7TDMI-S)
3334
* LPC810 (Cortex-M0+)
3435
* [LPC812](http://developer.mbed.org/platforms/NXP-LPC800-MAX/) (Cortex-M0+)
3536
* [EA LPC4088](http://developer.mbed.org/platforms/EA-LPC4088/) (Cortex-M4F)

libraries/USBDevice/USBDevice/USBEndpoints.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef enum {
3737
} EP_STATUS;
3838

3939
/* Include configuration for specific target */
40-
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC4088_DM)
40+
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC2460) || defined(TARGET_LPC4088_DM)
4141
#include "USBEndpoints_LPC17_LPC23.h"
4242
#elif defined(TARGET_LPC11UXX) || defined(TARGET_LPC1347) || defined (TARGET_LPC11U6X) || defined (TARGET_LPC1549)
4343
#include "USBEndpoints_LPC11U.h"

libraries/USBDevice/USBDevice/USBEndpoints_Maxim.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585
#define EPINT_IN (EP4IN)
8686
#define EPINT_OUT_callback EP3_OUT_callback
8787
#define EPINT_IN_callback EP4_IN_callback
88+
/* Isochronous endpoints */
89+
/* NOT SUPPORTED - use invalid endpoint number to prevent built errors */
90+
#define EPISO_OUT (EP0OUT)
91+
#define EPISO_IN (EP0IN)
8892

8993
#define MAX_PACKET_SIZE_EPBULK (64)
9094
#define MAX_PACKET_SIZE_EPINT (64)

libraries/USBDevice/USBDevice/USBHAL_LPC17.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1717
*/
1818

19-
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
19+
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC2460)
2020

2121
#include "USBHAL.h"
2222

libraries/USBDevice/USBSerial/CircBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class CircBuffer {
5757
volatile uint16_t write;
5858
volatile uint16_t read;
5959
static const int size = Size+1; //a modern optimizer should be able to remove this so it uses no ram.
60-
T buf[Size];
60+
T buf[Size+1];
6161
};
6262

6363
#endif

libraries/USBHost/USBHost/USBHALHost_LPC17.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
#if defined(TARGET_LPC1768)
17+
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2460)
1818

1919
#include "mbed.h"
2020
#include "USBHALHost.h"

libraries/mbed/api/CircularBuffer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ class CircularBuffer {
8888

8989
private:
9090
T _pool[BufferSize];
91-
CounterType _head;
92-
CounterType _tail;
93-
bool _full;
91+
volatile CounterType _head;
92+
volatile CounterType _tail;
93+
volatile bool _full;
9494
};
9595

9696
}

libraries/mbed/api/SPI.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,21 @@ namespace mbed {
4545
*
4646
* #include "mbed.h"
4747
*
48+
* // hardware ssel (where applicable)
49+
* //SPI device(p5, p6, p7, p8); // mosi, miso, sclk, ssel
50+
*
51+
* // software ssel
4852
* SPI device(p5, p6, p7); // mosi, miso, sclk
53+
* DigitalOut cs(p8); // ssel
4954
*
5055
* int main() {
56+
* // hardware ssel (where applicable)
57+
* //int response = device.write(0xFF);
58+
*
59+
* // software ssel
60+
* cs = 0;
5161
* int response = device.write(0xFF);
62+
* cs = 1;
5263
* }
5364
* @endcode
5465
*/
@@ -57,17 +68,15 @@ class SPI {
5768
public:
5869

5970
/** Create a SPI master connected to the specified pins
60-
*
61-
* Pin Options:
62-
* (5, 6, 7) or (11, 12, 13)
6371
*
6472
* mosi or miso can be specfied as NC if not used
6573
*
6674
* @param mosi SPI Master Out, Slave In pin
6775
* @param miso SPI Master In, Slave Out pin
6876
* @param sclk SPI Clock pin
77+
* @param ssel SPI chip select pin
6978
*/
70-
SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused=NC);
79+
SPI(PinName mosi, PinName miso, PinName sclk, PinName ssel=NC);
7180

7281
/** Configure the data transmission format
7382
*

libraries/mbed/api/SPISlave.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,13 @@ class SPISlave {
5353
public:
5454

5555
/** Create a SPI slave connected to the specified pins
56-
*
57-
* Pin Options:
58-
* (5, 6, 7i, 8) or (11, 12, 13, 14)
5956
*
6057
* mosi or miso can be specfied as NC if not used
6158
*
6259
* @param mosi SPI Master Out, Slave In pin
6360
* @param miso SPI Master In, Slave Out pin
6461
* @param sclk SPI Clock pin
6562
* @param ssel SPI chip select pin
66-
* @param name (optional) A string to identify the object
6763
*/
6864
SPISlave(PinName mosi, PinName miso, PinName sclk, PinName ssel);
6965

libraries/mbed/api/Ticker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Ticker : public TimerEvent {
6060
Ticker() : TimerEvent() {
6161
}
6262

63-
Ticker(const ticker_data_t *const data) : TimerEvent(data) {
63+
Ticker(const ticker_data_t *data) : TimerEvent(data) {
6464
}
6565

6666
/** Attach a function to be called by the Ticker, specifiying the interval in seconds

libraries/mbed/api/Timer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Timer {
4646

4747
public:
4848
Timer();
49-
Timer(const ticker_data_t *const data);
49+
Timer(const ticker_data_t *data);
5050

5151
/** Start the timer
5252
*/
@@ -83,7 +83,7 @@ class Timer {
8383
int _running; // whether the timer is running
8484
unsigned int _start; // the start time of the latest slice
8585
int _time; // any accumulated time from previous slices
86-
const ticker_data_t *const _ticker_data;
86+
const ticker_data_t *_ticker_data;
8787
};
8888

8989
} // namespace mbed

libraries/mbed/api/TimerEvent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class TimerEvent {
4747

4848
ticker_event_t event;
4949

50-
const ticker_data_t *const _ticker_data;
50+
const ticker_data_t *_ticker_data;
5151
};
5252

5353
} // namespace mbed

libraries/mbed/api/mbed.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#ifndef MBED_H
1717
#define MBED_H
1818

19-
#define MBED_LIBRARY_VERSION 99
19+
#define MBED_LIBRARY_VERSION 100
2020

2121
#include "platform.h"
2222

libraries/mbed/common/SPI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace mbed {
2323
CircularBuffer<Transaction<SPI>, TRANSACTION_QUEUE_SIZE_SPI> SPI::_transaction_buffer;
2424
#endif
2525

26-
SPI::SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused) :
26+
SPI::SPI(PinName mosi, PinName miso, PinName sclk, PinName ssel) :
2727
_spi(),
2828
#if DEVICE_SPI_ASYNCH
2929
_irq(this),
@@ -32,7 +32,7 @@ SPI::SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused) :
3232
_bits(8),
3333
_mode(0),
3434
_hz(1000000) {
35-
spi_init(&_spi, mosi, miso, sclk, NC);
35+
spi_init(&_spi, mosi, miso, sclk, ssel);
3636
spi_format(&_spi, _bits, _mode, 0);
3737
spi_frequency(&_spi, _hz);
3838
}

libraries/mbed/common/Timer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Timer::Timer() : _running(), _start(), _time(), _ticker_data(get_us_ticker_data(
2323
reset();
2424
}
2525

26-
Timer::Timer(const ticker_data_t *const data) : _running(), _start(), _time(), _ticker_data(data) {
26+
Timer::Timer(const ticker_data_t *data) : _running(), _start(), _time(), _ticker_data(data) {
2727
reset();
2828
}
2929

0 commit comments

Comments
 (0)