Skip to content

Commit

Permalink
Ensure .cpp files are using namespace codal.
Browse files Browse the repository at this point in the history
And headerfiles declare new clases in the codal namespace.

This is part of:
lancaster-university/codal-microbit-v2#240
  • Loading branch information
microbit-carlos committed Jul 23, 2024
1 parent c46d629 commit 09627de
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 0 additions & 2 deletions inc/driver-models/Pin.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ DEALINGS IN THE SOFTWARE.

namespace codal
{
using namespace codal;

/**
* Pin capabilities enum.
* Used to determine the capabilities of each Pin as some can only be digital, or can be both digital and analogue.
Expand Down
5 changes: 5 additions & 0 deletions inc/types/Matrix4.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ DEALINGS IN THE SOFTWARE.

#include "CodalConfig.h"

namespace codal
{

/**
* Class definition for a simple matrix, that is optimised for nx4 or 4xn matrices.
*
Expand Down Expand Up @@ -198,4 +201,6 @@ inline Matrix4 Matrix4::multiplyT(Matrix4 &matrix)
return multiply(matrix, true);
}

} // namespace codal

#endif
2 changes: 2 additions & 0 deletions source/driver-models/CodalUSB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ DEALINGS IN THE SOFTWARE.
#include "CodalDmesg.h"
#include "codal_target_hal.h"

using namespace codal;

#define send(p, l) ctrlIn->write(p, l)

CodalUSB *CodalUSB::usbInstance = NULL;
Expand Down
2 changes: 2 additions & 0 deletions source/types/Matrix4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ DEALINGS IN THE SOFTWARE.
#include "CodalConfig.h"
#include "Matrix4.h"

using namespace codal;

/**
* Class definition for a simple matrix, optimised for n x 4 or 4 x n matrices.
*
Expand Down

0 comments on commit 09627de

Please sign in to comment.