pull/10/head
Emilio Monti 2013-07-02 16:45:35 +01:00
commit a19e99621f
3 changed files with 7 additions and 13 deletions

View File

@ -55,19 +55,13 @@ public:
void queue(T k) void queue(T k)
{ {
mtx.lock(); mtx.lock();
while (((write + 1) % size) == read) //if (isFull())
{
/*while((((write + 1) % size) == read))
{*/
mtx.unlock();
Thread::wait(10);
mtx.lock();
/*}*/
//read++;
//read %= size;
}
buf[write++] = k; buf[write++] = k;
write %= size; write %= size;
if (isFull())
{
read++;
read %= size;
}
mtx.unlock(); mtx.unlock();
} }

View File

@ -167,7 +167,7 @@ class CortexM(Target):
while True: while True:
r = self.transport.readDP(DP_REG['CTRL_STAT']) r = self.transport.readDP(DP_REG['CTRL_STAT'])
if (r & (CDBGPWRUPACK | CSYSPWRUPACK)) != (CSYSPWRUPREQ | CDBGPWRUPREQ): if (r & (CDBGPWRUPACK | CSYSPWRUPACK)) != (CDBGPWRUPACK | CSYSPWRUPACK):
break break
self.transport.writeDP(DP_REG['CTRL_STAT'], CSYSPWRUPREQ | CDBGPWRUPREQ | TRNNORMAL | MASKLANE) self.transport.writeDP(DP_REG['CTRL_STAT'], CSYSPWRUPREQ | CDBGPWRUPREQ | TRNNORMAL | MASKLANE)

View File

@ -23,7 +23,7 @@ setup(
description="CMSIS-DAP debugger for python", description="CMSIS-DAP debugger for python",
author="samux", author="samux",
author_email="samuel.mokrani@gmail.com", author_email="samuel.mokrani@gmail.com",
license="MIT", license="Apache 2.0",
classifiers = [ classifiers = [
"Development Status :: 4 - Beta", "Development Status :: 4 - Beta",
"License :: Apache 2.0", "License :: Apache 2.0",