Prusa MINI Firmware overview
filament.cpp File Reference
#include "new_eeprom.h"
#include "st25dv64k.h"
#include "assert.h"
#include "dbg.h"
#include "marlin_client.h"
#include "filament.h"
#include "gui.h"
#include "../Marlin/src/gcode/gcode.h"
#include "../Marlin/src/module/planner.h"
#include "../Marlin/src/lcd/extensible_ui/ui_api.h"

Macros

#define FILAMENT_ADDRESS   0x400
 

Functions

void set_filament (FILAMENT_t filament)
 
FILAMENT_t get_filament ()
 

Variables

const filament_t filaments [FILAMENTS_END]
 
static FILAMENT_t filament_selected = FILAMENTS_END
 

Macro Definition Documentation

◆ FILAMENT_ADDRESS

#define FILAMENT_ADDRESS   0x400

Function Documentation

◆ set_filament()

void set_filament ( FILAMENT_t  filament)
32  {
33  assert(filament < FILAMENTS_END);
34  if (filament == filament_selected) {
35  return;
36  }
37  filament_selected = filament;
39 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_filament()

FILAMENT_t get_filament ( )
41  {
44  if (fil >= FILAMENTS_END)
45  fil = 0;
47  }
48  return filament_selected;
49 }
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ filaments

Initial value:
= {
{ "---", "---", 0, 0 },
{ "PLA", "PLA 215/ 60", 215, 60 },
{ "PETG", "PETG 230/ 85", 230, 85 },
{ "ASA", "ASA 260/100", 260, 100 },
{ "FLEX", "FLEX 240/ 50", 240, 50 },
}

◆ filament_selected

FILAMENT_t filament_selected = FILAMENTS_END
static
FILAMENTS_END
Definition: filament.h:31
filament_selected
static FILAMENT_t filament_selected
Definition: filament.cpp:30
FILAMENT_ADDRESS
#define FILAMENT_ADDRESS
Definition: filament.cpp:28
fil
FIL fil
Definition: pngview.c:11
st25dv64k_user_write
void st25dv64k_user_write(uint16_t address, uint8_t data)
Definition: st25dv64k.c:103
uint8_t
const uint8_t[]
Definition: 404_html.c:3
FILAMENT_t
FILAMENT_t
Definition: filament.h:25
st25dv64k_user_read
uint8_t st25dv64k_user_read(uint16_t address)
Definition: st25dv64k.c:93