Skip to content

Commit

Permalink
HW test projects using embot environment: ems, mc4plus and amc (
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoaccame authored Nov 3, 2023
1 parent dc484be commit f431a0e
Show file tree
Hide file tree
Showing 74 changed files with 14,222 additions and 434 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

/*
* Copyright (C) 2022 iCub Tech - Istituto Italiano di Tecnologia
* Author: Marco Accame
* email: [email protected]
*/

// - include guard ----------------------------------------------------------------------------------------------------

#ifndef _EMBOT_HW_BSP_AMC_H_
#define _EMBOT_HW_BSP_AMC_H_

#include "embot_core.h"
#include "embot_hw_types.h"

namespace embot { namespace hw { namespace bsp { namespace amc {

// adds in here constants or functions specific to the board
constexpr embot::hw::LED blinkLED {embot::hw::LED::one};

struct OnSpecialize
{
enum class CM4MODE { donothing = 0, activateandhold = 1, release = 2};

CM4MODE cm4mode {CM4MODE::donothing};
bool enableJ5powersupply_at_startup {false};
bool enableJ5spi_123_at_startup {false};
constexpr OnSpecialize() = default;
constexpr OnSpecialize(CM4MODE cm4m, bool j5pow, bool j5spi) :
cm4mode(cm4m),
enableJ5powersupply_at_startup(j5pow),
enableJ5spi_123_at_startup(j5spi)
{}
};

constexpr OnSpecialize OnSpecLoader
{
OnSpecialize::CM4MODE::activateandhold, false, false
};

constexpr OnSpecialize OnSpecUpdater
{
OnSpecialize::CM4MODE::donothing, false, false
};

constexpr OnSpecialize OnSpecApplication
{
OnSpecialize::CM4MODE::release, true, false
};

void set(const OnSpecialize& onsp);

}}}}

#endif // include-guard


// - end-of-file (leave a blank line after)----------------------------------------------------------------------------



Loading

0 comments on commit f431a0e

Please sign in to comment.