ntdisp 

ntdisp Commit Details

Date:2013-11-17 11:22:34 (6 years 11 months ago)
Author:Nicola Fontana
Branch:master
Commit:ca83b61cfa96d40dd6845d8aeb6226c5b24511ef
Parents: 4e482abd7c79eb7fd5eaa240071e2bb380c16a2d
Message:lib: add Stellaris/Tiva support

This is a preliminary (hence *not working*) implementation of the
back-end for the serial flash bootloader preprogrammed on the LM3S
Stellaris/Tiva boards provided by Texas Instruments.
Changes:
Csrc/lib/ntd-isp-private.h → src/lib/ntd-stellaris-private.h
Asrc/lib/ntd-stellaris.c (full)
Asrc/lib/ntd-stellaris.h (full)
Mconfigure.ac (1 diff)
Mdocs/lib/Makefile.am (1 diff)
Msrc/lib/Makefile.am (1 diff)
Msrc/lib/ntd-isp.c (1 diff)

File differences

configure.ac
112112
113113
114114
115
116
117
118
119
120
115121
116122
117123
AM_CONDITIONAL([ENABLE_STM],test "x$enable_stm" = "xyes")
AS_IF([test "x${enable_stm}" = "xyes"],[backends="$backends stm"])
AC_ARG_ENABLE([stellaris],
AS_HELP_STRING([--disable-stellaris], [Do not include the Stellaris serial flash loader (Texas Instruments)]),
[],[enable_stellaris="no"])
AM_CONDITIONAL([ENABLE_STELLARIS],test "x$enable_stellaris" = "xyes")
AS_IF([test "x${enable_stellaris}" = "xyes"],[backends="$backends stellaris"])
# Checks for external dependencies
docs/lib/Makefile.am
1919
2020
2121
22
2223
2324
2425
ntd-isp-private.h \
ntd-lpc-private.h \
ntd-serial-private.h \
ntd-stellaris-private.h \
ntd-stm-private.h \
ntdisp-intl.h \
ntdisp-builtins.h \
src/lib/Makefile.am
7878
7979
8080
81
82
83
84
85
86
87
8188
8289
8390
c_sources+=ntd-stm.c
endif
if ENABLE_STELLARIS
backends+=stellaris
h_sources+=ntd-stellaris.h
private_h_sources+=ntd-stellaris-private.h
c_sources+=ntd-stellaris.c
endif
ntdisp.h: ntdisp.h.in $(top_builddir)/config.log
$(AM_V_GEN)nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
src/lib/ntd-isp.c
101101
102102
103103
104
105
106
104107
105108
106109
#ifdef NTD_TYPE_STM
NTD_TYPE_STM,
#endif
#ifdef NTD_TYPE_STELLARIS
NTD_TYPE_STELLARIS,
#endif
G_TYPE_INVALID
};
types = g_memdup(list, sizeof(list));
src/lib/ntd-stellaris-private.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* ntdisp - NtD In System Programming.
*
* Copyright (C) 2012, 2013 Nicola Fontana <ntd at entidi.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __NTD_STELLARIS_PRIVATE_H__
#define __NTD_STELLARIS_PRIVATE_H__
G_BEGIN_DECLS
typedef struct _NtdStellarisPrivate NtdStellarisPrivate;
typedef struct _NtdStellarisPacket NtdStellarisPacket;
struct _NtdStellarisPrivate {
guint32 flash_base;
};
struct _NtdStellarisPacket {
guint8 size;
guint8 check_sum;
guint8* data;
};
G_END_DECLS
#endif /* __NTD_STELLARIS_PRIVATE_H__ */
src/lib/ntd-stellaris.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
/* ntdisp - NtD In System Programming.
*
* Copyright (C) 2012, 2013 Nicola Fontana <ntd at entidi.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* SECTION:ntd-stellaris
* @short_description: TI Stellaris serial flash loader protocol
*
**/
/**
* NtdStellaris:
*
* All fields are private and should not be used directly.
* Use its public methods instead.
**/
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <config.h>
#include "ntdisp-intl.h"
#include "ntdisp-utils.h"
#include "ntdisp-builtins.h"
#include "ntdisp-enums.h"
#include "ntd-device.h"
#include "ntd-serial.h"
#include "ntd-isp.h"
#include "ntd-stellaris.h"
#include "ntd-stellaris-private.h"
#define MAX_ATTEMPTS 3
G_DEFINE_TYPE(NtdStellaris, ntd_stellaris, NTD_TYPE_ISP);
enum {
PROP_0,
PROP_FLASH_BASE
};
static void _ntd_set_property (GObject* object,
guint prop_id,
const GValue* value,
GParamSpec* pspec);
static void _ntd_get_property (GObject* object,
guint prop_id,
GValue* value,
GParamSpec* pspec);
static void _ntd_set_defaults (NtdIsp* isp);
static const gchar* _ntd_status_to_message (gint status);
static void _ntd_connect (NtdIsp* isp);
static void _ntd_disconnect (NtdIsp* isp);
static gboolean _ntd_probe (NtdIsp* isp);
static gboolean _ntd_download (NtdIsp* isp,
const gchar* address,
gconstpointer buffer,
gsize nbytes);
static gboolean _ntd_run (NtdIsp* isp,
const gchar* address);
static NtdDevice * _ntd_get_device (NtdStellaris* stellaris);
static guint8 _ntd_checksum (gconstpointer data,
guint8 size);
static void
ntd_stellaris_class_init(NtdStellarisClass *klass)
{
GObjectClass *gobject_class;
NtdIspClass *isp_class;
GParamSpec *param;
gobject_class = (GObjectClass *) klass;
isp_class = (NtdIspClass *) klass;
g_type_class_add_private(klass, sizeof(NtdStellarisPrivate));
gobject_class->set_property = _ntd_set_property;
gobject_class->get_property = _ntd_get_property;
isp_class->set_defaults = _ntd_set_defaults;
isp_class->status_to_message = _ntd_status_to_message;
isp_class->connect = _ntd_connect;
isp_class->disconnect = _ntd_disconnect;
isp_class->probe = _ntd_probe;
isp_class->download = _ntd_download;
isp_class->run = _ntd_run;
param = g_param_spec_uint("flash-base",
P_("Flash Base"),
P_("Starting address of the flash memory"),
0, G_MAXUINT32, 0,
G_PARAM_READWRITE);
g_object_class_install_property(gobject_class, PROP_FLASH_BASE, param);
ntdisp_set_protocol_description(isp_class,
"Stellaris serial flash loader (Texas Instruments)");
}
static void
ntd_stellaris_init(NtdStellaris *stellaris)
{
NtdStellarisPrivate *data = G_TYPE_INSTANCE_GET_PRIVATE(stellaris,
NTD_TYPE_STELLARIS,
NtdStellarisPrivate);
data->flash_base = 0;
stellaris->data = data;
}
static void
_ntd_set_property(GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
NtdStellarisPrivate *data = ((NtdStellaris *) object)->data;
switch (prop_id) {
case PROP_FLASH_BASE:
data->flash_base = g_value_get_uint(value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
}
}
static void
_ntd_get_property(GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
NtdStellarisPrivate *data;
data = ((NtdStellaris *) object)->data;
switch (prop_id) {
case PROP_FLASH_BASE:
g_value_set_uint(value, data->flash_base);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
}
}
/**
* ntd_stellaris_new:
*
* Creates a new generic #NtdStellaris instance.
*
* Returns: the newly created object
*/
NtdStellaris *
ntd_stellaris_new(void)
{
return (NtdStellaris *) g_object_new(NTD_TYPE_STELLARIS, NULL);
}
/**
* ntd_stellaris_new_with_device:
* @device: path to the device to use
*
* Creates a new default #NtdStellaris instance and binds it to a
* #NtdSerial device automatically configured with sensible defaults.
*
* Returns: the newly created object
*/
NtdStellaris *
ntd_stellaris_new_with_device(const gchar *device)
{
NtdStellaris *stellaris = ntd_stellaris_new();
ntd_isp_set_device(NTD_ISP(stellaris), device);
return stellaris;
}
/**
* ntd_stellaris_set_flash_base:
* @stellaris: an #NtdStellaris instance
* @flash_base: the new address
*
* Sets the start address of the flash on @stellaris to @flash_base.
*
* This number will be the default start address used by download
* operations.
**/
void
ntd_stellaris_set_flash_base(NtdStellaris *stellaris, guint32 flash_base)
{
g_return_if_fail(NTD_IS_STELLARIS(stellaris));
g_object_set(stellaris, "flash-base", flash_base, NULL);
}
/**
* ntd_stellaris_get_flash_base:
* @stellaris: an #NtdStellaris instance
*
* Gets the base flash address of @stellaris.
*
* Returns: the base flash address
**/
guint32
ntd_stellaris_get_flash_base(NtdStellaris *stellaris)
{
NtdStellarisPrivate *data;
g_return_val_if_fail(NTD_IS_STELLARIS(stellaris), 0);
data = stellaris->data;
return data->flash_base;
}
/**
* ntd_stellaris_send_packet:
* @stellaris: an #NtdStellaris instance
* @data: the packet data (max 253 bytes)
* @size: the size of @data
*
* Sends a packet to @stellaris with the first @size bytes of @data.
*
* Returns: %TRUE on success, %FALSE otherwise
**/
gboolean
ntd_stellaris_send_packet(NtdStellaris *stellaris,
gconstpointer data, guint8 size)
{
NtdDevice *device;
guint8 preamble[2];
device = _ntd_get_device(stellaris);
if (device == NULL) {
return FALSE;
}
g_return_val_if_fail(data != NULL, FALSE);
g_return_val_if_fail(size <= G_MAXUINT8-2, FALSE);
preamble[0] = size + 2;
preamble[1] = _ntd_checksum(data, size);
return ntd_device_write(device, 2, preamble) &&
ntd_device_write(device, size, data);
}
/**
* ntd_stellaris_receive_packet:
* @stellaris: an #NtdStellaris instance
* @p_size: (out) (allow-none): the size of the returned data
*
* Gets a packed from @stellaris and returns the read data or %NULL on
* errors or timeout. The number of significative bytes in the returned
* buffer will be stored in @p_size, if it is not %NULL.
*
* Returns: (transfer full): the newly allocated buffer of data read or
* %NULL on errors. Dispose with g_free() when
* no longer needed.
**/
gpointer
ntd_stellaris_receive_packet(NtdStellaris *stellaris, guint8 *p_size)
{
NtdDevice *device;
gpointer buffer;
gboolean done;
guint8 size, checksum, expected_checksum;
device = _ntd_get_device(stellaris);
if (device == NULL) {
return NULL;
}
/* Wait until a valid length is got */
done = FALSE;
while (! done && (buffer = ntd_device_read(device, 1)) != NULL) {
size = * (guint8 *) buffer;
g_free(buffer);
done = size != 0;
}
if (done)
--size;
/* Read the checksum byte */
if (done && size > 0) {
buffer = ntd_device_read(device, 1);
done = buffer != NULL;
if (done) {
checksum = * (guint8 *) buffer;
g_free(buffer);
--size;
}
}
/* Read the data */
if (done && size > 0) {
buffer = ntd_device_read(device, size);
done = buffer != NULL;
}
if (! done) {
g_warning("Timeout while reading a packet");
return NULL;
}
expected_checksum = _ntd_checksum(buffer, size);
if (checksum != expected_checksum) {
g_free(buffer);
g_warning("Checksums do not match: got 0x%02x but expected 0x%02x",
checksum, expected_checksum);
return NULL;
}
if (p_size != NULL)
*p_size = size;
return buffer;
}
/**
* ntd_stellaris_ack:
* @stellaris: an #NtdStellaris instance
*
* Checks if @stellaris received the previous packet. This is done by
* checking for ACK (0xCC) or NAK (0x33) byte. If a byte different from
* ACK or NAK or NUL is received (0x00 bytes, AKA NUL, are skipped),
* this function return FALSE and outputs a warning message to stderr.
*
* Returns: %TRUE on ACK, %FALSE NAK or errors.
**/
gboolean
ntd_stellaris_ack(NtdStellaris *stellaris)
{
NtdIsp *isp;
NtdDevice *device;
gpointer buffer;
guint8 byte;
g_return_val_if_fail(NTD_IS_STELLARIS(stellaris), FALSE);
isp = (NtdIsp *) stellaris;
device = (NtdDevice *) ntd_isp_get_serial(isp);
g_return_val_if_fail(NTD_IS_SERIAL(device), FALSE);
g_return_val_if_fail(ntd_isp_is_connected(isp), FALSE);
while ((buffer = ntd_device_read(device, 1)) != NULL) {
byte = * (guint8 *) buffer;
g_free(buffer);
switch (byte) {
case 0xCC:
return TRUE;
case 0x33:
return FALSE;
case 0x00:
break;
default:
g_warning("Unexpected byte encountered while waiting for ACK (0x%02x)",
(guint) byte);
return FALSE;
}
}
g_warning("Timeout while waiting for ACK");
return FALSE;
}
/**
* ntd_stellaris_reset:
* @stellaris: an #NtdStellaris instance
*
* Tells the flash loader device to reset. This is useful when
* downloading a new image that overwrote the flash loader and wants to
* start from a full reset. Unlike the run command, this allows the
* initial stack pointer to be read by the hardware and set up for the
* new code. It can also be used to reset the flash loader if a critical
* error occurs and the host device wants to restart communication with
* the flash loader.
*
* Returns: %TRUE on successful reset, %FALSE or errors.
**/
gboolean
ntd_stellaris_reset(NtdStellaris *stellaris)
{
gboolean done;
g_return_val_if_fail(NTD_IS_STELLARIS(stellaris), FALSE);
g_debug("Sending RESET command");
done = ntd_stellaris_send_packet(stellaris, "\x25", 1) &&
ntd_stellaris_ack(stellaris);
g_debug(done ? "reset() successful" : "reset() failed");
return done;
}
static void
_ntd_set_defaults(NtdIsp *isp)
{
NtdSerial *serial = ntd_isp_get_serial(isp);
ntd_serial_set(serial, NTD_BAUD_115200, NTD_PARITY_NONE,
NTD_DATA_BITS_8, NTD_STOP_BITS_1);
}
static const gchar *
_ntd_status_to_message(gint status)
{
switch (status) {
case 0:
return "";
default:
return "Unkwnow error";
}
}
static void
_ntd_connect(NtdIsp *isp)
{
NtdDevice *device;
gint n;
gpointer buffer;
guint8 response;
/* Undefined error by default */
ntd_isp_set_status(isp, -1);
device = (NtdDevice *) ntd_isp_get_serial(isp);
g_return_if_fail(NTD_IS_SERIAL(device));
ntd_device_open(device);
for (n = 0; n < MAX_ATTEMPTS; ++n) {
g_debug("Automatic synchronization (attempt %d)", n);
ntd_device_clear_error(device);
if (ntd_device_write(device, 2, "\x55\x55")) {
buffer = ntd_device_read(device, 1);
if (buffer != NULL) {
response = * (guint8 *) buffer;
g_free(buffer);
if (response == 0xCC) {
g_debug("connect() successful: device returned ACK");
return;
}
}
}
/* A note on page 716 of SPMS 144H says we must wait at least
* 0.35 ms with 115200 baud (our the default baud rate).
* We will wait until timeout that by default is 2 sec */
}
g_debug("connect() failed");
ntd_device_close(device);
}
static void
_ntd_disconnect(NtdIsp *isp)
{
NtdDevice *device;
device = (NtdDevice *) ntd_isp_get_serial(isp);
g_return_if_fail(NTD_IS_SERIAL(device));
ntd_device_close(device);
}
static gboolean
_ntd_probe(NtdIsp *isp)
{
NtdStellaris *stellaris;
gboolean done;
stellaris = (NtdStellaris *) isp;
/* A successful ping is considered a successful probe */
g_debug("Sending PING command");
done = ntd_stellaris_send_packet(stellaris, "\x20", 1) &&
ntd_stellaris_ack(stellaris);
g_debug(done ? "probe() successful" : "probe() failed");
return done;
}
static gboolean
_ntd_download(NtdIsp *isp, const gchar *address,
gconstpointer buffer, gsize nbytes)
{
//NtdStellaris *stellaris;
//stellaris = (NtdStellaris *) isp;
// TODO
return FALSE;
}
static gboolean
_ntd_run(NtdIsp *isp, const gchar *address)
{
NtdStellaris *stellaris;
guint8 data[5];
guint32 raw_address;
gboolean done;
stellaris = (NtdStellaris *) isp;
raw_address = atol(address);
data[0] = 0x22;
data[1] = (raw_address >> 24) & 0xFF;
data[2] = (raw_address >> 16) & 0xFF;
data[3] = (raw_address >> 8) & 0xFF;
data[4] = raw_address & 0xFF;
g_debug("Sending RUN command");
done = ntd_stellaris_send_packet(stellaris, data, 5) &&
ntd_stellaris_ack(stellaris);
g_debug(done ? "run() successful" : "run() failed");
return done;
}
static NtdDevice *
_ntd_get_device(NtdStellaris *stellaris)
{
NtdIsp *isp;
NtdDevice *device;
g_return_val_if_fail(NTD_IS_STELLARIS(stellaris), NULL);
isp = (NtdIsp *) stellaris;
device = (NtdDevice *) ntd_isp_get_serial(isp);
g_return_val_if_fail(NTD_IS_SERIAL(device), NULL);
g_return_val_if_fail(ntd_isp_is_connected(isp), NULL);
return device;
}
static guint8
_ntd_checksum(gconstpointer data, guint8 size)
{
guint8 checksum = 0;
while (size--) {
checksum += ((const guint8 *) data) [size];
}
return checksum;
}
src/lib/ntd-stellaris.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* ntdisp - NtD In System Programming.
*
* Copyright (C) 2012, 2013 Nicola Fontana <ntd at entidi.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __NTD_STELLARIS_H__
#define __NTD_STELLARIS_H__
G_BEGIN_DECLS
#define NTD_TYPE_STELLARIS (ntd_stellaris_get_type())
#define NTD_STELLARIS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NTD_TYPE_STELLARIS, NtdStellaris))
#define NTD_STELLARIS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NTD_TYPE_STELLARIS, NtdStellarisClass))
#define NTD_IS_STELLARIS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NTD_TYPE_STELLARIS))
#define NTD_IS_STELLARIS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NTD_TYPE_STELLARIS))
#define NTD_STELLARIS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NTD_TYPE_STELLARIS, NtdStellarisClass))
typedef struct _NtdStellaris NtdStellaris;
typedef struct _NtdStellarisClass NtdStellarisClass;
struct _NtdStellaris {
/*< private >*/
NtdIsp parent;
gpointer data;
};
struct _NtdStellarisClass {
/*< private >*/
NtdIspClass parent_class;
/*< public >*/
/* Signals */
};
GType ntd_stellaris_get_type (void) G_GNUC_CONST;
NtdStellaris* ntd_stellaris_new (void);
NtdStellaris* ntd_stellaris_new_with_device (const gchar* device);
void ntd_stellaris_set_flash_base (NtdStellaris* stellaris,
guint32 flash_base);
guint32 ntd_stellaris_get_flash_base (NtdStellaris* stellaris);
gboolean ntd_stellaris_send_packet (NtdStellaris* stellaris,
gconstpointer data,
guint8 size);
gpointer ntd_stellaris_receive_packet (NtdStellaris* stellaris,
guint8* p_size);
gboolean ntd_stellaris_ack (NtdStellaris* stellaris);
gboolean ntd_stellaris_reset (NtdStellaris* stellaris);
G_END_DECLS
#endif /* __NTD_STELLARIS_H__ */

Archive Download the corresponding diff file

Branches

Tags